unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Philipp <p.stephani2@gmail.com>
Cc: Lars Magne Ingebrigtsen <larsi@gnus.org>,
	48471@debbugs.gnu.org, Stefan Monnier <monnier@IRO.UMontreal.CA>
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	[thread overview]
Message-ID: <7ea80286-b72c-7318-4b68-f10f62007907@yandex.ru> (raw)
In-Reply-To: <3B1E8678-E36E-4A30-A067-D9A5C3E7711A@gmail.com>

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 <D> <X> -type f <F> -print0 | \"%s\" -0 %s"
+			 (format "%s -H <D> <X> -type f <F> -print0 | \"%s\" -0 %s"
  				 find-program xargs-program gcmd))
  			((eq grep-find-use-xargs 'gnu-sort)
-			 (format "%s <D> <X> -type f <F> -print0 | sort -z | \"%s\" -0 %s"
+			 (format "%s -H <D> <X> -type f <F> -print0 | sort -z | \"%s\" -0 %s"
  				 find-program xargs-program gcmd))
  			((eq grep-find-use-xargs 'exec)
-			 (format "%s <D> <X> -type f <F> -exec %s %s %s%s"
+			 (format "%s -H <D> <X> -type f <F> -exec %s %s %s%s"
  				 find-program gcmd quot-braces null quot-scolon))
  			((eq grep-find-use-xargs 'exec-plus)
-			 (format "%s <D> <X> -type f <F> -exec %s %s%s +"
+			 (format "%s -H <D> <X> -type f <F> -exec %s %s%s +"
  				 find-program gcmd null quot-braces))
  			(t
-			 (format "%s <D> <X> -type f <F> -print | \"%s\" %s"
+			 (format "%s -H <D> <X> -type f <F> -print | \"%s\" %s"
  				 find-program xargs-program gcmd))))))))

      ;; Save defaults for this host.





  reply	other threads:[~2021-05-29 21:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-16 20:05 bug#48471: 28.0.50; Incorrect handling of `project-ignores' on macOS (BSD find?) if project root is a directory name Philipp
2021-05-17  0:23 ` Dmitry Gutov
2021-05-17 19:37   ` Philipp
2021-05-17 20:02     ` Philipp
2021-05-17 23:06       ` Dmitry Gutov
2021-05-23 11:08         ` Philipp
2021-05-29 21:44           ` Dmitry Gutov [this message]
2021-05-30  4:29             ` Lars Ingebrigtsen
2021-05-30 11:13               ` Dmitry Gutov
2021-05-31  5:33                 ` Lars Ingebrigtsen
2021-05-30  6:31             ` Eli Zaretskii
2021-05-30 11:14               ` Dmitry Gutov
2021-05-30 16:27               ` Paul Eggert
2021-05-30 16:36                 ` Eli Zaretskii
2021-06-07  1:58                   ` Dmitry Gutov
2021-06-07  8:51                     ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-06-07 18:48                     ` Philipp
     [not found]                 ` <ff528f00-ac80-4a84-fafb-076896793930@yandex.ru>
2021-10-09 22:14                   ` Paul Eggert
     [not found]                   ` <4de8fa95-e8f3-d07f-2f0c-8b06feff7190@cs.ucla.edu>
2021-10-09 22:29                     ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7ea80286-b72c-7318-4b68-f10f62007907@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=48471@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=monnier@IRO.UMontreal.CA \
    --cc=p.stephani2@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).