unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxence Dutielt <m@dutielt.com>
To: 52367@debbugs.gnu.org
Cc: ofv@wanadoo.es
Subject: bug#52367: 27.2; lgrep and grep-files-aliases
Date: Wed, 8 Dec 2021 01:54:26 +0100	[thread overview]
Message-ID: <c2696756-1436-8be0-2fdf-e5743cdb2ca3@dutielt.com> (raw)

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	other threads:[~2021-12-08  0:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-08  0:54 Maxence Dutielt [this message]
2021-12-08  2:33 ` bug#52367: 27.2; lgrep and grep-files-aliases Ó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

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=c2696756-1436-8be0-2fdf-e5743cdb2ca3@dutielt.com \
    --to=m@dutielt.com \
    --cc=52367@debbugs.gnu.org \
    --cc=ofv@wanadoo.es \
    /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).