[Top][All Lists]

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

address@hidden: grep-tree doesn't shell-quote-argument]

From: Richard Stallman
Subject: address@hidden: grep-tree doesn't shell-quote-argument]
Date: Tue, 18 Apr 2006 08:57:34 -0400

Since M-x grep does not do this, I am not sure it is desirable
to make M-x grep-tree incompatible with it.  But I don't use
grep-tree.  What do others think?

------- Start of forwarded message -------
Mail-Followup-To: address@hidden
To: address@hidden
From: Magnus Henoch <address@hidden>
Date: Mon, 17 Apr 2006 23:17:14 +0200
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Mail-Copies-To: never
Jabber-Id: address@hidden
Subject: grep-tree doesn't shell-quote-argument
X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=failed 

- --=-=-=

grep-tree doesn't quote its regexp argument to protect it from the
shell.  This makes it harder to use * and ? in regexps.  I propose
this patch:

2006-04-17  Magnus Henoch  <address@hidden>

        * progmodes/grep.el (grep-tree): Call shell-quote-argument on

- --=-=-=
Content-Type: text/x-patch
Content-Disposition: inline

*** orig/lisp/progmodes/grep.el
- --- mod/lisp/progmodes/grep.el
*** 631,637 ****
          (setq files (cdr mf)))))
    (let ((command-args (grep-expand-command-macros
!                      (setq grep-tree-last-regexp regexp)
                       (and files (concat "-name '" files "'"))
                       (if subdirs
                           (if (stringp subdirs)
- --- 632,638 ----
          (setq files (cdr mf)))))
    (let ((command-args (grep-expand-command-macros
!                      (shell-quote-argument (setq grep-tree-last-regexp 
                       (and files (concat "-name '" files "'"))
                       (if subdirs
                           (if (stringp subdirs)

- --=-=-=
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

emacs-pretest-bug mailing list

- --=-=-=--
------- End of forwarded message -------

reply via email to

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