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 10:59:44 +0200 Message-ID: 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 1145437322 2066 80.91.229.2 (19 Apr 2006 09:02:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 19 Apr 2006 09:02:02 +0000 (UTC) Cc: Eric Hanchrow , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 19 11:01:59 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 1FW8ZO-0006LD-Rt for ged-emacs-devel@m.gmane.org; Wed, 19 Apr 2006 11:01:55 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FW8ZO-00010L-HR for ged-emacs-devel@m.gmane.org; Wed, 19 Apr 2006 05:01:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FW8ZB-000108-Do for emacs-devel@gnu.org; Wed, 19 Apr 2006 05:01:41 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FW8Z9-0000zc-Gh for emacs-devel@gnu.org; Wed, 19 Apr 2006 05:01:40 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FW8Z9-0000zZ-AR for emacs-devel@gnu.org; Wed, 19 Apr 2006 05:01:39 -0400 Original-Received: from [195.41.46.236] (helo=pfepb.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FW8aD-00028r-Ab for emacs-devel@gnu.org; Wed, 19 Apr 2006 05:02:45 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (unknown [80.165.4.124]) by pfepb.post.tele.dk (Postfix) with SMTP id C5C92A50092; Wed, 19 Apr 2006 11:01:36 +0200 (CEST) Original-To: Lennart Borgman In-Reply-To: <4445033A.2030002@student.lu.se> (Lennart Borgman's message of "Tue, 18 Apr 2006 17:18:18 +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:53061 Archived-At: Eli Zaretskii writes: > 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? Why? They do it differently and each serves a different audience. Eric Hanchrow wrote: > Yes. I've been using Emacs for 20 years, more or less, and only knew > about grep-find until just now :-| So what? Lennart Borgman writes: > Too me it seems like merging them into one command could possibly save > a lot of time for many people. Huh? Have you actually looked at them and what they do? Command Input Output ---------------------------------------------------------------------- grep Shell Command List of matching lines grep ... grep-find Shell Command List of matching lines find ... | grep ... (recurses directories) grep-tree Regexp, Files, Dir List of matching lines (recurses directorires) find-grep-dired Dir, Regexp List of matching FILES (recurses directorires) So grep and grep-find are similar in the sense that they both prompts the user for a SHELL COMMAND -- which is flexible but low-level (IMO). Like grep-find, grep-tree recurses directories listing matching lines, but the interface it completely different, as grep-tree prompts individually for regexp, files, and starting directory (with normal directory name completion). It also remembers your previous choice for each parameter, so you can quickly repeat a previous search starting in a different directory. 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. find-grep-dired is completely different in the sense that it doesn't list the matches, but rather presents a dired buffer which lists the files which matches the regexp. So they all serve a different purpose, and I don't see any way to merge them ...or how doing so can "save a lot of time for many people". -- Kim F. Storm http://www.cua.dk