emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-bug-tracker] bug#9278: closed (rgrep fails on grep-find-command)


From: GNU bug Tracking System
Subject: [Emacs-bug-tracker] bug#9278: closed (rgrep fails on grep-find-command)
Date: Wed, 17 Aug 2011 17:17:02 +0000

Your message dated Wed, 17 Aug 2011 20:12:47 +0300
with message-id <address@hidden>
and subject line Re: bug#9278: rgrep fails on grep-find-command
has caused the GNU bug report #9278,
regarding rgrep fails on grep-find-command
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
9278: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9278
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: rgrep fails on grep-find-command Date: Wed, 10 Aug 2011 22:38:05 +0300 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu)
Tags: patch

With some grep default values, typing `C-u C-u M-x rgrep RET M-p RET'
fails with:

(wrong-type-argument stringp ("find . -type f -exec grep -inH -e  {} +" . 35))

because `grep-compute-defaults' computes the default value of
`grep-find-command' to ("find . -type f -exec grep -inH -e {} +" . 35)
i.e. a cons of (STRING . POSITION) for INITIAL-CONTENTS
of `read-from-minibuffer' in `rgrep' and `grep-find'.

I don't know why `grep-find-command' has such a format (that also
is not documented in its docstring), but currently I don't see
a better solution.

So unless someone can propose a better fix, I'd like to install:

=== modified file 'lisp/progmodes/grep.el'
--- lisp/progmodes/grep.el      2011-08-10 18:15:32 +0000
+++ lisp/progmodes/grep.el      2011-08-10 19:30:02 +0000
@@ -965,7 +965,9 @@ (defun rgrep (regexp &optional files dir
     (unless (and dir (file-directory-p dir) (file-readable-p dir))
       (setq dir default-directory))
     (if (null files)
-       (if (not (string= regexp grep-find-command))
+       (if (not (string= regexp (if (consp grep-find-command)
+                                    (car grep-find-command)
+                                  grep-find-command)))
            (compilation-start regexp 'grep-mode))
       (setq dir (file-name-as-directory (expand-file-name dir)))
       (require 'find-dired)            ; for `find-name-arg'




--- End Message ---
--- Begin Message --- Subject: Re: bug#9278: rgrep fails on grep-find-command Date: Wed, 17 Aug 2011 20:12:47 +0300 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu)
Fixed.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]