all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Oleksandr Gavenko <gavenkoa@gmail.com>
To: 9414@debbugs.gnu.org
Subject: bug#9414: Use of 'grep-find-ignored-directories' exclude files from search.
Date: Thu, 01 Sep 2011 00:44:11 +0300	[thread overview]
Message-ID: <4E5EAB2B.3080404@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 823 bytes --]

GNU Emacs 23.3.1 (i386-mingw-nt6.1.7601) of 2011-03-10 on 3249CTO

If set:

   (add-to-list 'grep-find-ignored-directories "build" t)

and try search M-x rgrep in hierarchy:

   build/xxx
   src/yyy
   src/build
   build

   $ mkdir  build src;
   $ touch  build/xxx src/yyy src/build

'find' part of 'rgrep' print only (I simplify expression of 'rgrep'):

   $ find . '(' -path '*/build' -o -path '*/lib' ')' \
      -prune -o  -type f  -print
./src/yyy

Correct one is:

   $ find . '(' -type d -path '*/build' -o -path '*/lib' ')' \
      -prune -o  -type f  -print
./src/build
./src/yyy

So any dir added to 'grep-find-ignored-directories' also affected to
*regular* file names...

I previously file bug to findutils, but I am wrong:

   http://savannah.gnu.org/bugs/?34159

This is Emacs bug.

I suggest fix in patch.

[-- Attachment #2: grep-find-ignored-directories.patch --]
[-- Type: text/plain, Size: 436 bytes --]

=== modified file 'lisp/progmodes/grep.el'
--- lisp/progmodes/grep.el	2011-02-10 19:13:31 +0000
+++ lisp/progmodes/grep.el	2011-08-31 21:35:14 +0000
@@ -958,7 +958,7 @@
 		       (and grep-find-ignored-directories
 			    (concat (shell-quote-argument "(")
 				    ;; we should use shell-quote-argument here
-				    " -path "
+				    " -type d -path "
 				    (mapconcat
 				     #'(lambda (ignore)
 					 (cond ((stringp ignore)


             reply	other threads:[~2011-08-31 21:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-31 21:44 Oleksandr Gavenko [this message]
2011-08-31 22:33 ` bug#9414: Fixed patch Oleksandr Gavenko
2011-09-05  9:55   ` Juri Linkov

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=4E5EAB2B.3080404@gmail.com \
    --to=gavenkoa@gmail.com \
    --cc=9414@debbugs.gnu.org \
    /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.