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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 52367 in the body.
You can then email your comments to 52367 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#52367; Package emacs. (Wed, 08 Dec 2021 01:12:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Maxence Dutielt <m <at> dutielt.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 08 Dec 2021 01:12:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52367; Package emacs. (Wed, 08 Dec 2021 02:34:01 GMT) Full text and rfc822 format available.

Message #8 received at 52367 <at> debbugs.gnu.org (full text, mbox):

From: Óscar Fuentes <ofv <at> wanadoo.es>
To: 52367 <at> debbugs.gnu.org
Cc: Maxence Dutielt <m <at> dutielt.com>
Subject: Re: bug#52367: 27.2; lgrep and grep-files-aliases
Date: Wed, 08 Dec 2021 03:33:15 +0100
I would like to revert my 856cd948d1a5a016ad36721246a049d33451902f since
the problem it addresses is no longer such problem (thanks to
improvements on shell parameter quoting) and right now it is causing a
regression on lgrep.

Okay to revert it on emacs-28?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52367; Package emacs. (Wed, 08 Dec 2021 12:41:01 GMT) Full text and rfc822 format available.

Message #11 received at 52367 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Óscar Fuentes <ofv <at> wanadoo.es>
Cc: m <at> dutielt.com, 52367 <at> debbugs.gnu.org
Subject: Re: bug#52367: 27.2; lgrep and grep-files-aliases
Date: Wed, 08 Dec 2021 14:40:05 +0200
> From: Óscar Fuentes <ofv <at> wanadoo.es>
> Date: Wed, 08 Dec 2021 03:33:15 +0100
> Cc: Maxence Dutielt <m <at> dutielt.com>
> 
> I would like to revert my 856cd948d1a5a016ad36721246a049d33451902f since
> the problem it addresses is no longer such problem (thanks to
> improvements on shell parameter quoting) and right now it is causing a
> regression on lgrep.
> 
> Okay to revert it on emacs-28?

Yes, thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52367; Package emacs. (Wed, 08 Dec 2021 12:42:02 GMT) Full text and rfc822 format available.

Message #14 received at 52367 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Maxence Dutielt <m <at> dutielt.com>
Cc: ofv <at> wanadoo.es, 52367 <at> debbugs.gnu.org
Subject: Re: bug#52367: 27.2; lgrep and grep-files-aliases
Date: Wed, 08 Dec 2021 14:41:00 +0200
> Date: Wed, 8 Dec 2021 01:54:26 +0100
> From: Maxence Dutielt <m <at> dutielt.com>
> Cc: ofv <at> wanadoo.es
> 
> We could add the parameter --directories=skip by default, since lgrep is
> not for recursive search.

That's only supported by GNU Grep, right?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52367; Package emacs. (Wed, 08 Dec 2021 17:11:01 GMT) Full text and rfc822 format available.

Message #17 received at 52367 <at> debbugs.gnu.org (full text, mbox):

From: Maxence Dutielt <m <at> dutielt.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: ofv <at> wanadoo.es, 52367 <at> debbugs.gnu.org
Subject: Re: bug#52367: 27.2; lgrep and grep-files-aliases
Date: Wed, 8 Dec 2021 17:54:12 +0100
> That's only supported by GNU Grep, right?

It is supported by the BSD grep shipped with macOS:

grep --version
grep (BSD grep) 2.5.1-FreeBSD

But it is not by the BSD grep shipped with OpenBSD.

The grep variant in OpenBSD already skips directories by default if you 
don't provide the recursive option.




Reply sent to Óscar Fuentes <ofv <at> wanadoo.es>:
You have taken responsibility. (Wed, 08 Dec 2021 22:59:02 GMT) Full text and rfc822 format available.

Notification sent to Maxence Dutielt <m <at> dutielt.com>:
bug acknowledged by developer. (Wed, 08 Dec 2021 22:59:02 GMT) Full text and rfc822 format available.

Message #22 received at 52367-done <at> debbugs.gnu.org (full text, mbox):

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.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 06 Jan 2022 12:24:06 GMT) Full text and rfc822 format available.

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

Previous Next


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