From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Wolfgang Jenkner Newsgroups: gmane.emacs.bugs Subject: bug#10351: 24.0.92; [PATCH] rgrep prunes too much Date: Thu, 22 Dec 2011 06:00:07 +0100 Message-ID: <85zkekwgct.fsf@iznogoud.viz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1324582502 16375 80.91.229.12 (22 Dec 2011 19:35:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 22 Dec 2011 19:35:02 +0000 (UTC) To: 10351@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Dec 22 20:34:59 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RdoPo-0006pX-Gc for geb-bug-gnu-emacs@m.gmane.org; Thu, 22 Dec 2011 20:34:56 +0100 Original-Received: from localhost ([::1]:57666 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RdoPo-0007yr-02 for geb-bug-gnu-emacs@m.gmane.org; Thu, 22 Dec 2011 14:34:56 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:51502) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RdoPk-0007sB-Iz for bug-gnu-emacs@gnu.org; Thu, 22 Dec 2011 14:34:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RdoPj-0008NS-AT for bug-gnu-emacs@gnu.org; Thu, 22 Dec 2011 14:34:52 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49017) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RdoPj-0008NO-8x for bug-gnu-emacs@gnu.org; Thu, 22 Dec 2011 14:34:51 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RdoRq-00019k-7t for bug-gnu-emacs@gnu.org; Thu, 22 Dec 2011 14:37:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Wolfgang Jenkner Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Dec 2011 19:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 10351 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13245825954403 (code B ref -1); Thu, 22 Dec 2011 19:37:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 22 Dec 2011 19:36:35 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RdoRN-00018x-Hd for submit@debbugs.gnu.org; Thu, 22 Dec 2011 14:36:34 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RdoRL-00018p-4f for submit@debbugs.gnu.org; Thu, 22 Dec 2011 14:36:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RdoPC-0008KA-Vj for submit@debbugs.gnu.org; Thu, 22 Dec 2011 14:34:19 -0500 Original-Received: from lists.gnu.org ([140.186.70.17]:44831) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RdoPC-0008K6-UI for submit@debbugs.gnu.org; Thu, 22 Dec 2011 14:34:18 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:35560) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RdoPC-0007jJ-1V for bug-gnu-emacs@gnu.org; Thu, 22 Dec 2011 14:34:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RdoPA-0008Jk-L9 for bug-gnu-emacs@gnu.org; Thu, 22 Dec 2011 14:34:18 -0500 Original-Received: from mx11.lb01.inode.at ([62.99.145.13]:32716 helo=mx.inode.at) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RdoPA-0008JG-FP for bug-gnu-emacs@gnu.org; Thu, 22 Dec 2011 14:34:16 -0500 Original-Received: from [85.127.157.168] (port=4521 helo=iznogoud.viz) by smartmx-11.inode.at with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1RdoP6-0005xE-7W for bug-gnu-emacs@gnu.org; Thu, 22 Dec 2011 20:34:12 +0100 Original-Received: from wolfgang by iznogoud.viz with local (Exim 4.77 (FreeBSD)) (envelope-from ) id 1RdoP4-0000Wd-OS for bug-gnu-emacs@gnu.org; Thu, 22 Dec 2011 20:34:10 +0100 Mail-Followup-To: bug-gnu-emacs@gnu.org User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.92 (berkeley-unix) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 22 Dec 2011 14:37:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:55116 Archived-At: 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 x x x / t m p / f o o 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 * 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