From: Alex <agrambot@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: john.b.mastro@gmail.com, 23590@debbugs.gnu.org
Subject: bug#23590: 25.0.94; Errors in default lgrep command
Date: Sat, 23 Jul 2016 16:12:55 -0600 [thread overview]
Message-ID: <87twfg0zrs.fsf@gmail.com> (raw)
In-Reply-To: <838twsuskk.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 23 Jul 2016 21:18:03 +0300")
Eli Zaretskii <eliz@gnu.org> writes:
>> Date: Sat, 23 Jul 2016 21:00:37 +0300
>> From: Eli Zaretskii <eliz@gnu.org>
>> Cc: john.b.mastro@gmail.com, 23590@debbugs.gnu.org
>>
>> > Grep exited abnormally with code 2 at ...
>>
>> Because of this:
>>
>> > grep: ..?*: No such file or directory
>
> Actually, I see that "Is a directory" also caused exit code of 2. So
> I guess patches are welcome to add --directory=skip to the Grep
> command when a preliminary test reveals that Grep supports it.
Is the following patch acceptable?
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index f04a722..c696f75 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -573,10 +573,14 @@ This function is called from `compilation-filter-hook'."
grep-template grep-find-template)
(let ((grep-options
(concat (if grep-use-null-device "-n" "-nH")
- (if (grep-probe grep-program
- `(nil nil nil "-e" "foo" ,null-device)
- nil 1)
- " -e"))))
+ (when (grep-probe grep-program
+ `(nil nil nil "--directories=skip" "foo" ,null-device)
+ nil 1)
+ " --directories=skip")
+ (when (grep-probe grep-program
+ `(nil nil nil "-e" "foo" ,null-device)
+ nil 1)
+ " -e"))))
(unless grep-command
(setq grep-command
(format "%s %s %s " grep-program
next prev parent reply other threads:[~2016-07-23 22:12 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-21 0:11 bug#23590: 25.0.94; Errors in default lgrep command Alex
2016-07-23 2:16 ` John Mastro
2016-07-23 7:45 ` Eli Zaretskii
2016-07-23 16:57 ` John Mastro
2016-07-23 17:15 ` Eli Zaretskii
2016-07-23 17:23 ` John Mastro
2016-07-23 17:58 ` Eli Zaretskii
2016-07-23 19:52 ` Glenn Morris
2016-07-23 17:28 ` Alex
2016-07-23 18:00 ` Eli Zaretskii
2016-07-23 18:18 ` Eli Zaretskii
2016-07-23 22:12 ` Alex [this message]
2020-09-04 14:09 ` Lars Ingebrigtsen
2020-10-07 3:41 ` Lars Ingebrigtsen
2020-10-07 8:17 ` Eli Zaretskii
2020-10-09 4:15 ` Lars Ingebrigtsen
2020-10-13 20:09 ` Juri Linkov
2020-10-14 4:10 ` Lars Ingebrigtsen
2016-07-23 17:11 ` Alex
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87twfg0zrs.fsf@gmail.com \
--to=agrambot@gmail.com \
--cc=23590@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=john.b.mastro@gmail.com \
/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 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.