bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#52367: 27.2; lgrep and grep-files-aliases


From: Maxence Dutielt
Subject: bug#52367: 27.2; lgrep and grep-files-aliases
Date: Wed, 8 Dec 2021 01:54:26 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.2

emacs -Q
M-x lgrep
Search for: foo
Search for "foo" in files matching wildcard (default all): all
In directory: ~/foobar

will always output this error if you don't have any filename starting
with two dots:

grep: ..?*: No such file or directory
Grep exited abnormally with code 2

I noticed "..?*" was introduced here:
commit ref: 856cd948d1a5a016ad36721246a049d33451902f
after reviewing bug #22577 (archived):
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=22577

Now that Emacs is smarter at quoting shell commands (at least on 27.2),
"* .[!.]* ..?*" seems overcomplicated and no longer necessary.

I couldn't reproduce bug #22577 with vc-git-grep as mentioned, using
both BSD and GNU grep on Linux, Windows and macOS.

Since "* .*" works as expected again, and doesn't produce the error of
"..?*", I think it should be reverted back into grep-files-aliases.

Lastly, to avoid such messages when using lgrep:

grep: foobar: Is a directory

We could add the parameter --directories=skip by default, since lgrep is
not for recursive search.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]