[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#9226: 23.3; [rgrep]; (matches found) ?
From: |
Stefan Monnier |
Subject: |
bug#9226: 23.3; [rgrep]; (matches found) ? |
Date: |
Wed, 10 Aug 2011 09:35:55 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
>> Why does emacs tell me "matches found" when none actually were?
> Because it uses the exit status of the "grep" command to decide whether
> matches were found. For standalone grep, an exit status of 0 means
> matches were found; but for "find -exec grep", an exit status of 0 just
> means "all files were processed successfully". There isn't any way to
> determine whether the grep in a "find -exec grep" succeeded based on
> exit status alone, therefore this Emacs feature as implemented cannot
> work for rgrep. With "find | xargs grep" it will do slightly better, but
> still report "exited abnormally" for the case of a grep that ran fine,
> but did not find any matches.
I suggest we remove this "matches found" thingy. It was meant to be
a feature, but in the case where it works (i.e. for `grep') the rest of
the output already gives the information anyway.
We can replace it with the exit status code instead: it's more cryptic
but at least it never lies.
Stefan
- bug#9226: 23.3; [rgrep]; (matches found) ?, Dave Abrahams, 2011/08/02
- bug#9226: 23.3; [rgrep]; (matches found) ?, Glenn Morris, 2011/08/10
- bug#9226: 23.3; [rgrep]; (matches found) ?,
Stefan Monnier <=
- bug#9226: 23.3; [rgrep]; (matches found) ?, Juri Linkov, 2011/08/10
- bug#9226: 23.3; [rgrep]; (matches found) ?, Dave Abrahams, 2011/08/17
- bug#9226: 23.3; [rgrep]; (matches found) ?, Lennart Borgman, 2011/08/17
- bug#9226: 23.3; [rgrep]; (matches found) ?, Juri Linkov, 2011/08/17
- bug#9226: 23.3; [rgrep]; (matches found) ?, Juri Linkov, 2011/08/22