all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#52367: 27.2; lgrep and grep-files-aliases
@ 2021-12-08  0:54 Maxence Dutielt
  2021-12-08  2:33 ` Óscar Fuentes
  2021-12-08 12:41 ` Eli Zaretskii
  0 siblings, 2 replies; 6+ messages in thread
From: Maxence Dutielt @ 2021-12-08  0:54 UTC (permalink / raw)
  To: 52367; +Cc: ofv

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.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#52367: 27.2; lgrep and grep-files-aliases
  2021-12-08  0:54 bug#52367: 27.2; lgrep and grep-files-aliases Maxence Dutielt
@ 2021-12-08  2:33 ` Óscar Fuentes
  2021-12-08 12:40   ` Eli Zaretskii
  2021-12-08 12:41 ` Eli Zaretskii
  1 sibling, 1 reply; 6+ messages in thread
From: Óscar Fuentes @ 2021-12-08  2:33 UTC (permalink / raw)
  To: 52367; +Cc: Maxence Dutielt

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?





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#52367: 27.2; lgrep and grep-files-aliases
  2021-12-08  2:33 ` Óscar Fuentes
@ 2021-12-08 12:40   ` Eli Zaretskii
  2021-12-08 22:58     ` Óscar Fuentes
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2021-12-08 12:40 UTC (permalink / raw)
  To: Óscar Fuentes; +Cc: m, 52367

> From: Óscar Fuentes <ofv@wanadoo.es>
> Date: Wed, 08 Dec 2021 03:33:15 +0100
> Cc: Maxence Dutielt <m@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.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#52367: 27.2; lgrep and grep-files-aliases
  2021-12-08  0:54 bug#52367: 27.2; lgrep and grep-files-aliases Maxence Dutielt
  2021-12-08  2:33 ` Óscar Fuentes
@ 2021-12-08 12:41 ` Eli Zaretskii
  2021-12-08 16:54   ` Maxence Dutielt
  1 sibling, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2021-12-08 12:41 UTC (permalink / raw)
  To: Maxence Dutielt; +Cc: ofv, 52367

> Date: Wed, 8 Dec 2021 01:54:26 +0100
> From: Maxence Dutielt <m@dutielt.com>
> Cc: ofv@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?





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#52367: 27.2; lgrep and grep-files-aliases
  2021-12-08 12:41 ` Eli Zaretskii
@ 2021-12-08 16:54   ` Maxence Dutielt
  0 siblings, 0 replies; 6+ messages in thread
From: Maxence Dutielt @ 2021-12-08 16:54 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: ofv, 52367

> 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.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#52367: 27.2; lgrep and grep-files-aliases
  2021-12-08 12:40   ` Eli Zaretskii
@ 2021-12-08 22:58     ` Óscar Fuentes
  0 siblings, 0 replies; 6+ messages in thread
From: Óscar Fuentes @ 2021-12-08 22:58 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: m, 52367-done

Eli Zaretskii <eliz@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.





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-12-08 22:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-08  0:54 bug#52367: 27.2; lgrep and grep-files-aliases Maxence Dutielt
2021-12-08  2:33 ` Óscar Fuentes
2021-12-08 12:40   ` Eli Zaretskii
2021-12-08 22:58     ` Óscar Fuentes
2021-12-08 12:41 ` Eli Zaretskii
2021-12-08 16:54   ` Maxence Dutielt

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.