From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: [mange@freemail.hu: grep-tree doesn't shell-quote-argument] Date: Wed, 19 Apr 2006 14:23:20 +0200 Message-ID: <85u08phhzb.fsf@lola.goethe.zz> References: <874q0qudex.fsf@blarg.net> <4445033A.2030002@student.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1145449438 10243 80.91.229.2 (19 Apr 2006 12:23:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 19 Apr 2006 12:23:58 +0000 (UTC) Cc: offby1@blarg.net, lennart.borgman.073@student.lu.se, Eli Zaretskii , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 19 14:23:55 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 1FWBik-0005fk-Ae for ged-emacs-devel@m.gmane.org; Wed, 19 Apr 2006 14:23:46 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FWBij-0006i0-QX for ged-emacs-devel@m.gmane.org; Wed, 19 Apr 2006 08:23:45 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FWBiX-0006hJ-Ft for emacs-devel@gnu.org; Wed, 19 Apr 2006 08:23:33 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FWBiW-0006gz-VD for emacs-devel@gnu.org; Wed, 19 Apr 2006 08:23:33 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FWBiW-0006gn-R2 for emacs-devel@gnu.org; Wed, 19 Apr 2006 08:23:32 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FWBjd-0002Ik-7G for emacs-devel@gnu.org; Wed, 19 Apr 2006 08:24:41 -0400 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1FWBiV-0006Kt-3M; Wed, 19 Apr 2006 08:23:31 -0400 Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id D68D01C3DB49; Wed, 19 Apr 2006 14:23:20 +0200 (CEST) Original-To: storm@cua.dk (Kim F. Storm) In-Reply-To: (Kim F. Storm's message of "Wed, 19 Apr 2006 13:41:49 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:53066 Archived-At: storm@cua.dk (Kim F. Storm) writes: > Eli Zaretskii writes: > >>> IMO, grep-tree is much more user >>> friendly than grep and grep-find (I use grep-tree all the time), >>> while others obviously prefer the power of grep and grep-find. >> >> Then making one a variant of the other should save us from having to >> remember another command name. >> >> The normal Emacs way: use the prefix argument. > > So what you suggest is that the current grep-tree should replace > grep-find/find-grep as the default interface, and the current > grep-find functionality should be selected if a prefix arg is > specified. This is somewhat radical and might surprise people. And it might be a good idea if previous non-interactive calls kept their API (which basically means clever use of &optional or similar). How about making a configurable "grep-find-prompt" option that is a list or string with possible elements "p" and "c". The old default would be "c" (prompting with command), the new default "p" (prompting for parts), and an interactive argument would temporarily give "pc", where the parts are queried first, and then the finished command is offered again with point at a convenient location for adding `find' conditions. Something like that. That way, people can easily reconfigure the old behavior if they want to. And use C-u M-x grep-find RET for being able to post-edit the command, and maybe C-u C-u M-x grep-find RET for getting the inverse than the default behavior. > That would be ok with me, and I will make the changes if people > agree. > > This should be done before the release as grep-tree is new in 22.x, > and there are several defcustoms which should be renamed as part of > this rework. Likely. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum