help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: copy visible text with some lines hidden with hide-lines


From: Rupert Swarbrick
Subject: Re: copy visible text with some lines hidden with hide-lines
Date: Sun, 24 Feb 2008 06:05:16 -0600
User-agent: Pan/0.132 (Waxed in Black)

On Thu, 21 Feb 2008 16:46:20 -0800, jdzhang wrote:

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

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]