[Top][All Lists]

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

Re: Changes to emacs/lisp/progmodes/grep.el

From: Daniel Pfeiffer
Subject: Re: Changes to emacs/lisp/progmodes/grep.el
Date: Mon, 28 Jun 2004 10:40:13 +0200


David Kastrup <address@hidden> skribis:

> Richard Stallman <address@hidden> 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++

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 <C> 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:

reply via email to

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