[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Run Shell Command on Buffer
From: |
reader |
Subject: |
Re: Run Shell Command on Buffer |
Date: |
Thu, 25 Jan 2007 00:47:41 -0600 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.92 (gnu/linux) |
super-nub <scame@fastmail.fm> writes:
> Hi Pete,
>
> for example I want to execute `grep' on my buffer/file to get a
> survey of the section headings in my document (that I keep in a
> special format for this purpose), e.g.:
>
> $ egrep '^\s*-[[:upper:]]+' myfile
> $ -INTRODUCTION
> $ -BLA BLA
> $ -BLA 2
> $ -MAIN PART
> $ -MISCELLANEOUS
> $ -ETC BLA BLA
It looks like `M-x occur' may be what you want. It will display all the
hits in a separate buffer.
Another nifty aspect is that you can use the hits provided as links to
jump to them in the parent buffer.
If I understood your usage M-x occur will be just the ticket.
If you like this tool... type M-x occur<spc><spc> to see other
formulations of using it.