unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Adrian Aichner <adrian@xemacs.org>
Subject: Re: Changes to emacs/lisp/progmodes/grep.el
Date: Sun, 27 Jun 2004 13:58:30 +0200	[thread overview]
Message-ID: <brj5i55l.fsf@smtpmail.t-online.de> (raw)
In-Reply-To: 20040627123340.5d3354cd@pfdabpc.inhouse.start.de

dapfy@t-online.de (Daniel Pfeiffer) writes:

> Saluton, Moin,
>
> Richard Stallman <rms@gnu.org> 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.

Hi Daniel,

I use
(setq igrep-options "-Pi")
and
(setq grep-command "grep -Pni ")
which gives me multi-line match capability with
grep (GNU grep) 2.5
under
CYGWIN_NT-5.1 D5DC120J 1.5.7(0.109/3/2) 2004-01-30 19:32 i686 unknown unknown Cygwin
in
XEmacs 21.5  (beta17) "chayote" (+CVS-20040611) [Lucid] (i586-pc-win32, Mule) of Sat Jun 12 2004 on D5DC120J

I guess if I had no grep, but only perl, your script could be useful.

Adrian

>
> =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

-- 
Adrian Aichner
 mailto:adrian@xemacs.org
 http://www.xemacs.org/

  reply	other threads:[~2004-06-27 11:58 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1BdGt8-0003Tg-Qb@lists.gnu.org>
2004-06-24 23:16 ` Changes to emacs/lisp/progmodes/grep.el Juri Linkov
2004-06-25 20:03   ` Daniel Pfeiffer
2004-06-26  0:03     ` Juri Linkov
2004-06-27 10:43       ` Daniel Pfeiffer
2004-06-26  6:03     ` Richard Stallman
2004-06-27 10:33       ` Daniel Pfeiffer
2004-06-27 11:58         ` Adrian Aichner [this message]
2004-06-28  2:23         ` Richard Stallman
2004-06-28  2:37           ` Miles Bader
2004-06-28  4:44           ` David Kastrup
2004-06-28  8:40             ` Daniel Pfeiffer
2004-06-28 18:00               ` Eli Zaretskii
2004-06-28 21:22                 ` Daniel Pfeiffer
2004-06-29  5:10                   ` Eli Zaretskii
2004-06-29 20:08                     ` Daniel Pfeiffer
2004-06-29 21:19                       ` Eli Zaretskii
2004-06-30  5:16                         ` Juri Linkov
2004-07-01 22:20                         ` Daniel Pfeiffer
2004-06-30  5:08                       ` Juri Linkov
2004-07-02 21:58                         ` Daniel Pfeiffer
2004-07-01 23:31                           ` Stefan
2004-07-01 23:38                             ` David Kastrup
2004-07-01 23:46                               ` Stefan
2004-07-03 18:20                               ` Richard Stallman
2004-07-04 10:47                                 ` Mark handling (Was: Changes to emacs/lisp/progmodes/grep.el) Daniel Pfeiffer
2004-07-05 16:56                                   ` Richard Stallman
2004-07-05 19:57                                     ` Daniel Pfeiffer
2004-07-06 22:00                                       ` Richard Stallman
2004-07-07 19:47                                         ` Daniel Pfeiffer
2004-07-08 23:18                                           ` Richard Stallman
2004-07-10 19:54                                             ` Daniel Pfeiffer
2004-07-06 22:00                                       ` Richard Stallman
2004-07-07 20:58                                         ` Richard Stallman
2004-07-02  0:20                             ` Transient mark mode (was: " Paul Pogonyshev
2004-07-03  8:28                             ` Changes to emacs/lisp/progmodes/grep.el Daniel Pfeiffer
2004-07-02  9:07                               ` Juri Linkov
2004-07-03 11:35                                 ` Daniel Pfeiffer
2004-07-02  8:48                           ` Juri Linkov
2004-07-06 16:55                         ` Juri Linkov
2004-07-06 18:16                           ` Luc Teirlinck
2004-07-07 20:57                           ` Richard Stallman
2004-06-30 18:52                       ` Richard Stallman
2004-07-01  5:08                         ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=brj5i55l.fsf@smtpmail.t-online.de \
    --to=adrian@xemacs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).