[Top][All Lists]

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

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

From: Kim F. Storm
Subject: Re: address@hidden: grep-tree doesn't shell-quote-argument]
Date: Wed, 19 Apr 2006 14:51:38 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

David Kastrup <address@hidden> 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 <address@hidden> http://www.cua.dk

reply via email to

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