From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#48471: 28.0.50; Incorrect handling of `project-ignores' on macOS (BSD find?) if project root is a directory name Date: Sun, 30 May 2021 00:44:40 +0300 Message-ID: <7ea80286-b72c-7318-4b68-f10f62007907@yandex.ru> References: <7f9e984c-bea9-f55f-526a-680a9bb3f66b@yandex.ru> <53E1AC7F-1D49-4845-8DF6-4CB24BC15E6A@gmail.com> <92AAB1AE-0D8C-4C2B-99E9-E790F4BE5330@gmail.com> <79c2002a-e404-3837-f2d8-c760ed48cdc0@yandex.ru> <3B1E8678-E36E-4A30-A067-D9A5C3E7711A@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6681"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 Cc: Lars Magne Ingebrigtsen , 48471@debbugs.gnu.org, Stefan Monnier To: Philipp Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 29 23:45:17 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ln6lg-0001ca-Sq for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 29 May 2021 23:45:16 +0200 Original-Received: from localhost ([::1]:45492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ln6lf-0007Ae-Vk for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 29 May 2021 17:45:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34034) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ln6lT-00071J-0T for bug-gnu-emacs@gnu.org; Sat, 29 May 2021 17:45:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46310) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ln6lS-0001aY-Om for bug-gnu-emacs@gnu.org; Sat, 29 May 2021 17:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ln6lS-0004Lf-Nf for bug-gnu-emacs@gnu.org; Sat, 29 May 2021 17:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 May 2021 21:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48471 X-GNU-PR-Package: emacs Original-Received: via spool by 48471-submit@debbugs.gnu.org id=B48471.162232469116673 (code B ref 48471); Sat, 29 May 2021 21:45:02 +0000 Original-Received: (at 48471) by debbugs.gnu.org; 29 May 2021 21:44:51 +0000 Original-Received: from localhost ([127.0.0.1]:57855 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ln6lH-0004Kr-7W for submit@debbugs.gnu.org; Sat, 29 May 2021 17:44:51 -0400 Original-Received: from mail-wm1-f42.google.com ([209.85.128.42]:38448) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ln6lE-0004Kb-Vp for 48471@debbugs.gnu.org; Sat, 29 May 2021 17:44:50 -0400 Original-Received: by mail-wm1-f42.google.com with SMTP id u4-20020a05600c00c4b02901774b80945cso6493727wmm.3 for <48471@debbugs.gnu.org>; Sat, 29 May 2021 14:44:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=nMNKzAsFyQ3BY7Ymb1QUk71IDzyfCST2fw4HI7skXXs=; b=QUmHT2NNf7yNuL0SZCOtEP5PbGN557VPLi91plVMpRcaMdAvta6GrwXXuo9UmPCqGy iCbezmHJQkTaAqWzO/3HkhqO070+i+ZCsOUaCDOwXj8M3S9dDovE7lsbPfEgTqRc+P68 v0SqBR6v5qRGPdwvgCzWCUD1Lrnyvh6AlBPXdWBF7KDLtcHnJnZMsdoWK9f/3wpqSvWO YIPsYI1PCMyXj3E/DULryRfIR9CjYzt+SvCrSg74kEgjImfGbHjTBEAIxzLHL6fo/lNl e28ZS0RmwtR9PfC5KWCxQA2B4KGMlync+xktfPnu9eMzpNBUCi9am+5mnfxbr27XYNyg FZpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=nMNKzAsFyQ3BY7Ymb1QUk71IDzyfCST2fw4HI7skXXs=; b=t8RJ1LhavnUYlt3SCNG0VknJ0qkd/KYMDkRxLWoi9OKBvmIQ4ny80vtDdp5OqjMh7o 62AU0KJe+Ap4IAJyGfvAF8L5gsyjh75nSrFgyJiKh/LaJvb6Lr1j+Hg73t6r1yC6zBwB 2aIvYmA/uzOqz5hEdLof1tG7jS4/SyYAlqxqcsaH2N7M+1Dtt9bADaLDA7BDpoQ57Fi/ OooEWDgv+adGppbMKInbkod/wwrSinmMorazJmNDR1YYM/gLtJSVBacnh8f+Kh6iJEgt C0DSyfdEEoyDE38/6c+I1C76dmmYi2Q9prMyAJll1LXlYJLA8vYeicvwOCabI/JMiQGA ul1g== X-Gm-Message-State: AOAM532CWhG7BcqofZXBg3wq5XryECl05vrxHLR3+a/tZEurfh8r4MAE JTB7u3n2ogZGbDv8o1uPgIM= X-Google-Smtp-Source: ABdhPJyKkKuyNpq4tgKDyxyBqPhIzK/MHlY2eq1PLU0LrZCfvXFAMq0vye5Iobsz/EP/20yBad+P2g== X-Received: by 2002:a1c:e40b:: with SMTP id b11mr19267182wmh.123.1622324682936; Sat, 29 May 2021 14:44:42 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id b135sm9497547wmb.5.2021.05.29.14.44.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 29 May 2021 14:44:42 -0700 (PDT) In-Reply-To: <3B1E8678-E36E-4A30-A067-D9A5C3E7711A@gmail.com> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:207550 Archived-At: On 23.05.2021 14:08, Philipp wrote: >> though it would be better to use a version of it which fixes the same behavior in two other related functions as well. The previous patch for that approach is here:https://lists.gnu.org/archive/html/emacs-devel/2021-01/txtDduOxGoiGz.txt >> >> (From the messagehttps://lists.gnu.org/archive/html/emacs-devel/2021-01/msg00345.html). >> >> Also, since it will fix the double-slash problem, we can undo the change from 331e40a8fd491ceb35c08a3345785dab61bc60d9, the one that made our comparisons lax (to match both single and double slashes). > I'm also fine with either of those, but we should first make sure that the code in question is well-covered by unit tests to avoid regressions. Tests are good to have, yes. Speaking of the implementation, any chance we would want to have "-H" inside grep-find-template by default? Has that been considered in the past perhaps? Eli, Lars, Stefan? The simplest change to that effect should look like this: diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index e9fbcbbfcd..9956ba79d0 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -777,19 +777,19 @@ grep-compute-defaults (format "%s " (null-device)) ""))) (cond ((eq grep-find-use-xargs 'gnu) - (format "%s -type f -print0 | \"%s\" -0 %s" + (format "%s -H -type f -print0 | \"%s\" -0 %s" find-program xargs-program gcmd)) ((eq grep-find-use-xargs 'gnu-sort) - (format "%s -type f -print0 | sort -z | \"%s\" -0 %s" + (format "%s -H -type f -print0 | sort -z | \"%s\" -0 %s" find-program xargs-program gcmd)) ((eq grep-find-use-xargs 'exec) - (format "%s -type f -exec %s %s %s%s" + (format "%s -H -type f -exec %s %s %s%s" find-program gcmd quot-braces null quot-scolon)) ((eq grep-find-use-xargs 'exec-plus) - (format "%s -type f -exec %s %s%s +" + (format "%s -H -type f -exec %s %s%s +" find-program gcmd null quot-braces)) (t - (format "%s -type f -print | \"%s\" %s" + (format "%s -H -type f -print | \"%s\" %s" find-program xargs-program gcmd)))))))) ;; Save defaults for this host.