From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: [mange@freemail.hu: grep-tree doesn't shell-quote-argument] Date: Wed, 19 Apr 2006 14:51:38 +0200 Message-ID: References: <874q0qudex.fsf@blarg.net> <4445033A.2030002@student.lu.se> <85u08phhzb.fsf@lola.goethe.zz> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1145451240 16415 80.91.229.2 (19 Apr 2006 12:54:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 19 Apr 2006 12:54:00 +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:53:57 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 1FWCBu-0002cP-NX for ged-emacs-devel@m.gmane.org; Wed, 19 Apr 2006 14:53:55 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FWCBu-0007yB-Bg for ged-emacs-devel@m.gmane.org; Wed, 19 Apr 2006 08:53:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FWCBi-0007xw-Nq for emacs-devel@gnu.org; Wed, 19 Apr 2006 08:53:42 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FWCBh-0007xY-Jp for emacs-devel@gnu.org; Wed, 19 Apr 2006 08:53:42 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FWCBh-0007xV-HP for emacs-devel@gnu.org; Wed, 19 Apr 2006 08:53:41 -0400 Original-Received: from [195.41.46.235] (helo=pfepa.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FWCCk-0004je-LM; Wed, 19 Apr 2006 08:54:46 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (unknown [80.165.4.124]) by pfepa.post.tele.dk (Postfix) with SMTP id DC46EFAC04C; Wed, 19 Apr 2006 14:53:32 +0200 (CEST) Original-To: David Kastrup In-Reply-To: <85u08phhzb.fsf@lola.goethe.zz> (David Kastrup's message of "Wed, 19 Apr 2006 14:23:20 +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:53069 Archived-At: David Kastrup writes: >> 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. True, but that's how things evolve :-) I imagine to implement it with grep-find being just a front-end to two other commands grep-find-command and grep-find-template (corresponding to the old grep-find and grep-tree). So an easy way for a user to get the desired behaviour would be to defalias grep-find to either of these if the default doesn't suit him. > And it might be a > good idea if previous non-interactive calls kept their API (which > basically means clever use of &optional or similar). Yes, that would be easy (1 arg => command line, 3 args => grep-tree API) But currently there are no non-interactive calls to grep-find, find-grep or grep-tree in CVS emacs. And I doubt there are any at all, as there really isn't any logic in calling the existing grep-find non-interactively -- as there is no simple way to build the necessary command line (and running grep would do just as well). For non-interactive use, it seems like the grep-tree API would be much easier to use as the caller would not have to think about the low-level command line. > > How about making a configurable "grep-find-prompt" option that ... > ... 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. So we merge two commands into one (because people cannot remember which is which), and then we add a new cryptic customize option to configure what it should do by default, and a couple of prefix args to tweak things even further. -- Kim F. Storm http://www.cua.dk