[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grep command doc - point out that you can chain now
From: |
David Kastrup |
Subject: |
Re: grep command doc - point out that you can chain now |
Date: |
Mon, 17 Jul 2006 09:26:57 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
"Drew Adams" <address@hidden> writes:
> I just found out from Le Wang that you can now chain grep commands within
> the Emacs `grep' command. I mean that you can now do `M-x grep foo *.el |
> grep bar | grep toto'.
>
> This is absolutely wonderful. I don't know when it was added (I suspect
> Emacs 22) - it wasn't available in Emacs 20, in any case. (In Emacs 20, I've
> been using `M-!' to chain greps, or doing it outside Emacs. BTW,
> `flush-lines' doesn't work in *grep*, because it throws off the `next-error'
> index.)
>
> Chaining this way, in my experience, represents how most programmers use
> grep. Instead of trying to come up with a complex regexp, they just use two
> or three chained greps. The technique is so useful that I've applied it to
> the use of regexps generally (e.g. regexp searching) in my own libraries.
>
> So, I'm disappointed to see that this is not pointed out in the Emacs manual
> presentation of `grep'. I really think this is worth pointing out
> explicitly, with a simple example, especially since it was not possible
> before.
Why wouldn't it have been possible before?
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
- grep command doc - point out that you can chain now, Drew Adams, 2006/07/16
- Re: grep command doc - point out that you can chain now,
David Kastrup <=
- Re: grep command doc - point out that you can chain now, Richard Stallman, 2006/07/17
- Re: grep command doc - point out that you can chain now, Nick Roberts, 2006/07/17
- RE: grep command doc - point out that you can chain now, Drew Adams, 2006/07/18
- RE: grep command doc - point out that you can chain now, Nick Roberts, 2006/07/18
- RE: grep command doc - point out that you can chain now, Drew Adams, 2006/07/18
- Re: grep command doc - point out that you can chain now, Richard Stallman, 2006/07/18