* bug#10351: 24.0.92; [PATCH] rgrep prunes too much
@ 2011-12-22 5:00 Wolfgang Jenkner
2011-12-22 21:05 ` Juri Linkov
2012-04-11 11:41 ` Lars Magne Ingebrigtsen
0 siblings, 2 replies; 6+ messages in thread
From: Wolfgang Jenkner @ 2011-12-22 5:00 UTC (permalink / raw)
To: 10351
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@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
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#10351: 24.0.92; [PATCH] rgrep prunes too much
2011-12-22 5:00 bug#10351: 24.0.92; [PATCH] rgrep prunes too much Wolfgang Jenkner
@ 2011-12-22 21:05 ` Juri Linkov
2012-04-11 11:41 ` Lars Magne Ingebrigtsen
1 sibling, 0 replies; 6+ messages in thread
From: Juri Linkov @ 2011-12-22 21:05 UTC (permalink / raw)
To: 10351
> 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'.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#10351: 24.0.92; [PATCH] rgrep prunes too much
2011-12-22 5:00 bug#10351: 24.0.92; [PATCH] rgrep prunes too much Wolfgang Jenkner
2011-12-22 21:05 ` Juri Linkov
@ 2012-04-11 11:41 ` Lars Magne Ingebrigtsen
2012-04-11 16:39 ` Glenn Morris
1 sibling, 1 reply; 6+ messages in thread
From: Lars Magne Ingebrigtsen @ 2012-04-11 11:41 UTC (permalink / raw)
To: Wolfgang Jenkner; +Cc: 10351
Wolfgang Jenkner <wjenkner@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/
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#10351: 24.0.92; [PATCH] rgrep prunes too much
2012-04-11 11:41 ` Lars Magne Ingebrigtsen
@ 2012-04-11 16:39 ` Glenn Morris
2012-04-11 16:52 ` Wolfgang Jenkner
0 siblings, 1 reply; 6+ messages in thread
From: Glenn Morris @ 2012-04-11 16:39 UTC (permalink / raw)
To: Wolfgang Jenkner; +Cc: 10351
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#10351: 24.0.92; [PATCH] rgrep prunes too much
2012-04-11 16:39 ` Glenn Morris
@ 2012-04-11 16:52 ` Wolfgang Jenkner
2012-04-11 17:56 ` Glenn Morris
0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Jenkner @ 2012-04-11 16:52 UTC (permalink / raw)
To: Glenn Morris; +Cc: 10351
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#10351: 24.0.92; [PATCH] rgrep prunes too much
2012-04-11 16:52 ` Wolfgang Jenkner
@ 2012-04-11 17:56 ` Glenn Morris
0 siblings, 0 replies; 6+ messages in thread
From: Glenn Morris @ 2012-04-11 17:56 UTC (permalink / raw)
To: Wolfgang Jenkner; +Cc: 10351
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-04-11 17:56 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-22 5:00 bug#10351: 24.0.92; [PATCH] rgrep prunes too much Wolfgang Jenkner
2011-12-22 21:05 ` Juri Linkov
2012-04-11 11:41 ` Lars Magne Ingebrigtsen
2012-04-11 16:39 ` Glenn Morris
2012-04-11 16:52 ` Wolfgang Jenkner
2012-04-11 17:56 ` Glenn Morris
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).