GNU bug report logs - #10351
24.0.92; [PATCH] rgrep prunes too much

Previous Next

Package: emacs;

Reported by: Wolfgang Jenkner <wjenkner <at> inode.at>

Date: Thu, 22 Dec 2011 19:37:02 UTC

Severity: normal

Tags: fixed, patch

Merged with 12201

Found in versions 24.0.92, 24.1

Fixed in version 24.3

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 10351 in the body.
You can then email your comments to 10351 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#10351; Package emacs. (Thu, 22 Dec 2011 19:37:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Wolfgang Jenkner <wjenkner <at> inode.at>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 22 Dec 2011 19:37:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Wolfgang Jenkner <wjenkner <at> inode.at>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.92; [PATCH] rgrep prunes too much
Date: Thu, 22 Dec 2011 06:00:07 +0100
In the shell, type:

$ rm -rf /tmp/foo/
$ mkdir -p /tmp/foo/usr.bin
$ echo xxx >/tmp/foo/bad.bin
$ echo xxx >/tmp/foo/usr.bin/good

Now, in emacs -Q, rgrep /tmp/foo for `xxx':

M-x r g r e p <return> x x x <return> <return> / t m p / f o o <return>

It will report "Grep finished with no matches found".

However, I expect it to find the match in /tmp/foo/usr.bin/good because
the way the defcustom of grep-find-ignored-files computes the default
value clearly shows that it is not meant to exclude directories.

(By the way, the FreeBSD base system source directory actually contains
a usr.bin sub-directory.)

See also bug#9414.  For a somewhat different proposal, Colin Fraizer's
message in bug#6665, but see Andreas Schwab's response.

2011-12-20  Wolfgang Jenkner  <wjenkner <at> inode.at>

	* lisp/progmodes/grep.el (rgrep): Tweak the find command line so
	that directories matching `grep-find-ignored-files' won't be
	pruned.


=== modified file 'lisp/progmodes/grep.el'
--- lisp/progmodes/grep.el	2011-12-12 05:32:49 +0000
+++ lisp/progmodes/grep.el	2011-12-20 20:40:02 +0000
@@ -1018,7 +1018,8 @@
 				    (shell-quote-argument ")")
 				    " -prune -o "))
 		       (and grep-find-ignored-files
-			    (concat (shell-quote-argument "(")
+			    (concat (shell-quote-argument "!") " -type d "
+				    (shell-quote-argument "(")
 				    ;; we should use shell-quote-argument here
 				    " -name "
 				    (mapconcat





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10351; Package emacs. (Thu, 22 Dec 2011 21:10:01 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#10351: 24.0.92; [PATCH] rgrep prunes too much
Date: Thu, 22 Dec 2011 23:05:51 +0200
> However, I expect it to find the match in /tmp/foo/usr.bin/good because
> the way the defcustom of grep-find-ignored-files computes the default
> value clearly shows that it is not meant to exclude directories.

Yes, `grep-find-ignored-files' removes directories from the original
value of `completion-ignored-extensions'.  But I think that
these directories should be added to `grep-find-ignored-directories'.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10351; Package emacs. (Wed, 11 Apr 2012 11:43:01 GMT) Full text and rfc822 format available.

Message #11 received at 10351 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Wolfgang Jenkner <wjenkner <at> inode.at>
Cc: 10351 <at> debbugs.gnu.org
Subject: Re: bug#10351: 24.0.92; [PATCH] rgrep prunes too much
Date: Wed, 11 Apr 2012 13:41:01 +0200
Wolfgang Jenkner <wjenkner <at> inode.at> writes:

> However, I expect it to find the match in /tmp/foo/usr.bin/good because
> the way the defcustom of grep-find-ignored-files computes the default
> value clearly shows that it is not meant to exclude directories.

Makes sense.

I've now applied your patch to the Emacs trunk.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Added tag(s) fixed. Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 11 Apr 2012 11:43:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 24.2, send any further explanations to 10351 <at> debbugs.gnu.org and Wolfgang Jenkner <wjenkner <at> inode.at> Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 11 Apr 2012 11:43:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10351; Package emacs. (Wed, 11 Apr 2012 16:41:01 GMT) Full text and rfc822 format available.

Message #18 received at 10351 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Wolfgang Jenkner <wjenkner <at> inode.at>
Cc: 10351 <at> debbugs.gnu.org
Subject: Re: bug#10351: 24.0.92; [PATCH] rgrep prunes too much
Date: Wed, 11 Apr 2012 12:39:03 -0400
We have a couple of changes from you in Emacs now, and should probably
get an FSF copyright assignment. Is that something you are willing to
do? The process is straightforward, I can send you the form to get
started if you like.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10351; Package emacs. (Wed, 11 Apr 2012 16:54:01 GMT) Full text and rfc822 format available.

Message #21 received at 10351 <at> debbugs.gnu.org (full text, mbox):

From: Wolfgang Jenkner <wjenkner <at> inode.at>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 10351 <at> debbugs.gnu.org
Subject: Re: bug#10351: 24.0.92; [PATCH] rgrep prunes too much
Date: Wed, 11 Apr 2012 18:52:45 +0200
On Wed, Apr 11 2012, Glenn Morris wrote:

> We have a couple of changes from you in Emacs now, and should probably
> get an FSF copyright assignment. Is that something you are willing to
> do? The process is straightforward, I can send you the form to get
> started if you like.

Thanks, that has already happened a couple of months ago... anyway, I've
just signed and sent the assignment paper.

Wolfgang




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10351; Package emacs. (Wed, 11 Apr 2012 17:58:02 GMT) Full text and rfc822 format available.

Message #24 received at 10351 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Wolfgang Jenkner <wjenkner <at> inode.at>
Cc: 10351 <at> debbugs.gnu.org
Subject: Re: bug#10351: 24.0.92; [PATCH] rgrep prunes too much
Date: Wed, 11 Apr 2012 13:56:43 -0400
Wolfgang Jenkner wrote:

> Thanks, that has already happened a couple of months ago... anyway, I've
> just signed and sent the assignment paper.

Great; thank you.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 10 May 2012 11:24:04 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 14 Aug 2012 18:08:02 GMT) Full text and rfc822 format available.

bug Marked as fixed in versions 24.3. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 14 Aug 2012 18:08:02 GMT) Full text and rfc822 format available.

bug No longer marked as fixed in versions 24.2. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 14 Aug 2012 18:08:02 GMT) Full text and rfc822 format available.

Forcibly Merged 10351 12201. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 14 Aug 2012 18:09:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 12 Sep 2012 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 250 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.