unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* copy visible text with some lines hidden with hide-lines
@ 2008-02-22  0:46 jdzhang
  2008-02-24 11:39 ` Mathias Dahl
  2008-02-24 12:05 ` Rupert Swarbrick
  0 siblings, 2 replies; 6+ messages in thread
From: jdzhang @ 2008-02-22  0:46 UTC (permalink / raw)
  To: help-gnu-emacs; +Cc: jdzhang

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: copy visible text with some lines hidden with hide-lines
  2008-02-22  0:46 copy visible text with some lines hidden with hide-lines jdzhang
@ 2008-02-24 11:39 ` Mathias Dahl
  2008-02-24 12:05 ` Rupert Swarbrick
  1 sibling, 0 replies; 6+ messages in thread
From: Mathias Dahl @ 2008-02-24 11:39 UTC (permalink / raw)
  To: help-gnu-emacs

jdzhang@gmail.com writes:

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

You could try using `flush-lines' instead, it removes the lines (don't
save the buffer though, then they will be gone).


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: copy visible text with some lines hidden with hide-lines
  2008-02-22  0:46 copy visible text with some lines hidden with hide-lines jdzhang
  2008-02-24 11:39 ` Mathias Dahl
@ 2008-02-24 12:05 ` Rupert Swarbrick
  2008-02-26  4:22   ` Kevin Rodgers
       [not found]   ` <mailman.7946.1203999732.18990.help-gnu-emacs@gnu.org>
  1 sibling, 2 replies; 6+ messages in thread
From: Rupert Swarbrick @ 2008-02-24 12:05 UTC (permalink / raw)
  To: help-gnu-emacs

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: copy visible text with some lines hidden with hide-lines
  2008-02-24 12:05 ` Rupert Swarbrick
@ 2008-02-26  4:22   ` Kevin Rodgers
       [not found]   ` <mailman.7946.1203999732.18990.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 6+ messages in thread
From: Kevin Rodgers @ 2008-02-26  4:22 UTC (permalink / raw)
  To: help-gnu-emacs

Rupert Swarbrick wrote:
> 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.

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





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: copy visible text with some lines hidden with hide-lines
       [not found]   ` <mailman.7946.1203999732.18990.help-gnu-emacs@gnu.org>
@ 2008-02-26 19:54     ` jdzhang
  2008-02-27  0:05     ` Rupert Swarbrick
  1 sibling, 0 replies; 6+ messages in thread
From: jdzhang @ 2008-02-26 19:54 UTC (permalink / raw)
  To: help-gnu-emacs

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.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: copy visible text with some lines hidden with hide-lines
       [not found]   ` <mailman.7946.1203999732.18990.help-gnu-emacs@gnu.org>
  2008-02-26 19:54     ` jdzhang
@ 2008-02-27  0:05     ` Rupert Swarbrick
  1 sibling, 0 replies; 6+ messages in thread
From: Rupert Swarbrick @ 2008-02-27  0:05 UTC (permalink / raw)
  To: help-gnu-emacs

On Mon, 25 Feb 2008 21:22:14 -0700, Kevin Rodgers wrote:
>> 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'?
> 

Oops you're right. And no I hadn't tried M-x occur, but I have now thanks!

Rupert


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-02-27  0:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-22  0:46 copy visible text with some lines hidden with hide-lines jdzhang
2008-02-24 11:39 ` Mathias Dahl
2008-02-24 12:05 ` Rupert Swarbrick
2008-02-26  4:22   ` Kevin Rodgers
     [not found]   ` <mailman.7946.1203999732.18990.help-gnu-emacs@gnu.org>
2008-02-26 19:54     ` jdzhang
2008-02-27  0:05     ` Rupert Swarbrick

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