GNU bug report logs -
#9226
23.3; [rgrep]; (matches found) ?
Previous Next
Reported by: Dave Abrahams <dave <at> boostpro.com>
Date: Wed, 3 Aug 2011 01:42:02 UTC
Severity: normal
Found in version 23.3
Done: Juri Linkov <juri <at> jurta.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Dave Abrahams wrote:
> 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.
This bug report was last modified 13 years and 307 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.