From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [mange@freemail.hu: grep-tree doesn't shell-quote-argument] Date: Tue, 18 Apr 2006 17:44:58 +0300 Message-ID: References: Reply-To: Eli Zaretskii NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1145371557 25062 80.91.229.2 (18 Apr 2006 14:45:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 18 Apr 2006 14:45:57 +0000 (UTC) Cc: mange@freemail.hu, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 18 16:45:54 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FVrSJ-0001Jf-Du for ged-emacs-devel@m.gmane.org; Tue, 18 Apr 2006 16:45:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FVrSI-0004PF-Us for ged-emacs-devel@m.gmane.org; Tue, 18 Apr 2006 10:45:26 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FVrS6-0004NK-Pj for emacs-devel@gnu.org; Tue, 18 Apr 2006 10:45:14 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FVrS5-0004N7-Vn for emacs-devel@gnu.org; Tue, 18 Apr 2006 10:45:14 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FVrS5-0004N4-Qe for emacs-devel@gnu.org; Tue, 18 Apr 2006 10:45:13 -0400 Original-Received: from [192.114.186.20] (helo=nitzan.inter.net.il) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FVrSz-0003pe-8p for emacs-devel@gnu.org; Tue, 18 Apr 2006 10:46:09 -0400 Original-Received: from HOME-C4E4A596F7 (IGLD-80-230-43-119.inter.net.il [80.230.43.119]) by nitzan.inter.net.il (MOS 3.7.3-GA) with ESMTP id DDV02466 (AUTH halo1); Tue, 18 Apr 2006 17:44:59 +0300 (IDT) Original-To: storm@cua.dk (Kim F. Storm) In-reply-to: (storm@cua.dk) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:53010 Archived-At: > From: storm@cua.dk (Kim F. Storm) > Date: Tue, 18 Apr 2006 16:02:44 +0200 > Cc: Magnus Henoch , emacs-devel@gnu.org > > Richard Stallman writes: > > > 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? > > M-x grep prompts for the entire command line, so the user can easily > add the necessary quoting of the regexp. How easily is that is not very important in this case, IMO. What is important is that "M-x grep" prompts for _a_shell_command_, and the user should type there a command that she would type at a shell's prompt. Which means the _user_ is responsible for any quoting that's required, especially since "M-x grep" has no real understanding of the command's semantics; it is just reading a string that it will pass to Grep. > M-x grep-tree prompts individually for the regexp, files, and directory, > so I think it makes good sense to quote the regexp automatically. In this case, grep-tree does know what is the semantics of each part of the command, since it prompts for them individually. So I agree. Btw, isn't it confusing that we have no less than 3 different commands (find-grep-dired, grep-find, and grep-tree) to do the same job?