[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: |
Sun, 27 Jun 2004 12:33:40 +0200 |
Saluton, Moin,
Richard Stallman <address@hidden> skribis:
> Would you please say precisely what job this Perl script does,
> and what purpose people would use it for? Those details are
> not clear to me, so I don't understand what question we are
> discussing.
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.
=head1 NAME
plgrep -- Perl grep specially useful within Emacs
=head1 SYNOPSIS
plgrep -n3 'regexp spanning\n upto\n 3 lines' file ...
plgrep -R -c 'regexp looked for in C sources in and recursively under dir'
dir ...
plgrep --eval 'script "perl"' 'regexp looked for only in all perl scripts in
pwd'
plgrep --eval 'script "perl"; $_ = 0 if /^=/../^=cut/ or /^\s*#/' 'same,
excluding POD or comment lines'
Unlike other greps, this prints out only the name of the file. Instead of
prepending the directory on every line, it outputs "Entering directory"
messages as necessary. It also outputs column numbers. Emacs M-x grep picks
up this information.
The regexps are in Perl syntax, giving you very rich possibilities.
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/
- Re: Changes to emacs/lisp/progmodes/grep.el, Juri Linkov, 2004/06/24
- Re: Changes to emacs/lisp/progmodes/grep.el, Daniel Pfeiffer, 2004/06/25
- Re: Changes to emacs/lisp/progmodes/grep.el, Juri Linkov, 2004/06/25
- Re: Changes to emacs/lisp/progmodes/grep.el, Richard Stallman, 2004/06/26
- Re: Changes to emacs/lisp/progmodes/grep.el,
Daniel Pfeiffer <=
- Re: Changes to emacs/lisp/progmodes/grep.el, Adrian Aichner, 2004/06/27
- Re: Changes to emacs/lisp/progmodes/grep.el, Richard Stallman, 2004/06/27
- Re: Changes to emacs/lisp/progmodes/grep.el, Miles Bader, 2004/06/27
- Re: Changes to emacs/lisp/progmodes/grep.el, David Kastrup, 2004/06/28
- Re: Changes to emacs/lisp/progmodes/grep.el, Daniel Pfeiffer, 2004/06/28
- Re: Changes to emacs/lisp/progmodes/grep.el, Eli Zaretskii, 2004/06/28
- Re: Changes to emacs/lisp/progmodes/grep.el, Daniel Pfeiffer, 2004/06/28
- Re: Changes to emacs/lisp/progmodes/grep.el, Eli Zaretskii, 2004/06/29
- Re: Changes to emacs/lisp/progmodes/grep.el, Daniel Pfeiffer, 2004/06/29
- Re: Changes to emacs/lisp/progmodes/grep.el, Eli Zaretskii, 2004/06/29