[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: copy visible text with some lines hidden with hide-lines
From: |
jdzhang |
Subject: |
Re: copy visible text with some lines hidden with hide-lines |
Date: |
Tue, 26 Feb 2008 11:54:12 -0800 (PST) |
User-agent: |
G2/1.0 |
On Feb 25, 8:22 pm, Kevin Rodgers <kevin.d.rodg...@gmail.com> wrote:
> Rupert Swarbrick wrote:
> > On Thu, 21 Feb 2008 16:46:20 -0800,jdzhangwrote:
>
> >> I need looking at large (10s of MB) log files regularly. I use hide-
> >> lines to filter out the lines I don't care. However, I was able to
> >> figure out how to copy only the text being displayed. Any suggestions
> >> are welcome.
>
> >> Thanks.
>
> >> Jason Zhang
>
> > One thing I've done in the past was to use C-M-! and run a grep command
> > which will give me the lines I want (and not too much cruft). Then you
> > get a temporary buffer, with which you can't accidentally blat your log
> > file by saving (so you needn't be scared of deleting lots more stuff) and
> > which is hopefully small enough the Emacs won't get upset about buffer
> > size.
>
> I think you meant `M-!'. Have you tried `M-x occur'?
>
> > If it's a regular job, I suspect one could write a short elisp function
> > to get the relevant bits in this way, and maybe rename the buffer to
> > something more informative than the standard thing with ** in it.
>
> > Rupert
>
> --
> Kevin Rodgers
> Denver, Colorado, USA
M-x occur works great. Thanks.
Jason.