From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: dapfy@t-online.de (Daniel Pfeiffer) Newsgroups: gmane.emacs.devel Subject: Re: Changes to emacs/lisp/progmodes/grep.el Date: Mon, 28 Jun 2004 10:40:13 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <20040628104013.5b4eb37e@pfdabpc.inhouse.start.de> References: <87isdgnzzi.fsf@mail.jurta.org> <20040625220304.0f1fd05a@pfdabpc.inhouse.start.de> <20040627123340.5d3354cd@pfdabpc.inhouse.start.de> Reply-To: Daniel Pfeiffer NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1088411980 522 80.91.224.253 (28 Jun 2004 08:39:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 28 Jun 2004 08:39:40 +0000 (UTC) Cc: juri@jurta.org, rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Jun 28 10:39:28 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Berfk-0002eV-00 for ; Mon, 28 Jun 2004 10:39:28 +0200 Original-Received: from lists.gnu.org ([199.232.76.165]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1Berfk-0000Xm-00 for ; Mon, 28 Jun 2004 10:39:28 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BerhL-0008Ce-8R for emacs-devel@quimby.gnus.org; Mon, 28 Jun 2004 04:41:07 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BerhH-0008Bj-7M for emacs-devel@gnu.org; Mon, 28 Jun 2004 04:41:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BerhF-0008BC-93 for emacs-devel@gnu.org; Mon, 28 Jun 2004 04:41:02 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BerhF-0008B9-5Y for emacs-devel@gnu.org; Mon, 28 Jun 2004 04:41:01 -0400 Original-Received: from [194.25.134.19] (helo=mailout06.sul.t-online.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Berf3-0007iV-FJ; Mon, 28 Jun 2004 04:38:45 -0400 Original-Received: from fwd08.aul.t-online.de by mailout06.sul.t-online.com with smtp id 1Berf0-00086B-02; Mon, 28 Jun 2004 10:38:42 +0200 Original-Received: from pfdabpc.inhouse.start.de (rSe25ZZSwefWPQs0LQhpMkE527ceBwfZ01+mjSUOtXivGeHWSa85Q-@[217.234.29.224]) by fwd08.sul.t-online.com with smtp id 1Bereq-203WzI0; Mon, 28 Jun 2004 10:38:32 +0200 Original-To: David Kastrup In-Reply-To: X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) X-Seen: false X-ID: rSe25ZZSwefWPQs0LQhpMkE527ceBwfZ01+mjSUOtXivGeHWSa85Q- X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:25290 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:25290 Saluton, David Kastrup skribis: > Richard Stallman writes: > > > I've written a little Perl script, which is not production > > quality yet. This serves two purposes I'm frequently confronted > > with: > > > > - easily deployable on machines without GNU grep > > - can match over several lines. > > > > If searching directory subtrees is useful, let's request > > the feature in grep. GNU grep has this with the -R as in my command. What GNU grep also claims to have is Perl regexps, but I have a hard time believing they can really keep pace with all that Perl can do with regexps. What GNU grep doesn't have (but could learn) is predefined file sets, like everything that smells of a C/C++ source. What GNU grep will hardly learn is deciding file treatment besed on content (other than binary) or doing something with the content, like ignoring certain parts (e.g. comments). This requires a builtin interpreter, which in my case is naturally Perl. Multiline matching would be a _very_ useful extension to GNU grep, but this collides with their (and Posix') specification of -F. Other than that, GNU grep has tons of features I've never used, which I'm not sure I'll emulate. > There is grep-find already. In my opinion, its main shortcoming is > its name. It took years for me to find it since I had expected it > under the name of find-grep (we also have find-grep-dired). When I redesigned compile, I was stunned at all the grep stuff that's in Emacs. Till today I've not fully understood all there is. Alas it's not consistent, e.g. M-x grep ignores the constructs it's brethren have. Since it works by generating varous complex commands, it's quite an art and requires being good at Unix to even understand what that command is. This is where my command makes things easier, because everything is just accessible with an option, of a fairly simple command. coralament / best Grötens / liebe Grüße / best regards / elkorajn salutojn Daniel Pfeiffer -- lerne / learn / apprends / lär dig / ucz się Esperanto: http://lernu.net/