GNU bug report logs - #52367
27.2; lgrep and grep-files-aliases

Previous Next

Package: emacs;

Reported by: Maxence Dutielt <m <at> dutielt.com>

Date: Wed, 8 Dec 2021 01:12:01 UTC

Severity: normal

Found in version 27.2

Done: Óscar Fuentes <ofv <at> wanadoo.es>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Óscar Fuentes <ofv <at> wanadoo.es>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#52367: closed (27.2; lgrep and grep-files-aliases)
Date: Wed, 08 Dec 2021 22:59:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Wed, 08 Dec 2021 23:58:10 +0100
with message-id <87v8zy901p.fsf <at> telefonica.net>
and subject line Re: bug#52367: 27.2; lgrep and grep-files-aliases
has caused the debbugs.gnu.org bug report #52367,
regarding 27.2; lgrep and grep-files-aliases
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
52367: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=52367
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Maxence Dutielt <m <at> dutielt.com>
To: bug-gnu-emacs <at> gnu.org
Cc: ofv <at> wanadoo.es
Subject: 27.2; lgrep and grep-files-aliases
Date: Wed, 8 Dec 2021 01:54:26 +0100
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.


[Message part 3 (message/rfc822, inline)]
From: Óscar Fuentes <ofv <at> wanadoo.es>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: m <at> dutielt.com, 52367-done <at> debbugs.gnu.org
Subject: Re: bug#52367: 27.2; lgrep and grep-files-aliases
Date: Wed, 08 Dec 2021 23:58:10 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> Okay to revert it on emacs-28?
>
> Yes, thanks.

Done.

@ Maxence Dutielt : please open a new issue for discussing the
--directories=skip change you propose. Thank you.


This bug report was last modified 3 years and 249 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.