[Top][All Lists]

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

Re: editing output in shell mode

From: tyler
Subject: Re: editing output in shell mode
Date: Fri, 09 Jan 2009 17:45:09 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

"Samuel Wales" <address@hidden> writes:

> Let's say you do something in shell mode that produces a lot of
> output. Normally, you'd use less(1), but that is not possible in shell
> mode.
> Ideally, you'd view the output in an emacs buffer, perhaps in text
> mode, so that you can edit it and navigate it.
> Is there a way to pipe this output to, say, emacsclient?

When I'm in shell mode, I just leave long output right there. For ex.,
you can issue 'cat README.txt' to dump the contents of a big file, then
C-c C-p to put you at the top of the output, and navigate through as
per usual.

You can delete the output when you're done a few different ways. You can
get to the following prompt with C-c C-n, from where C-c C-o will delete
the previous output (usually). Sometimes the contents of the file will
screw this up, in which case C-c C-p to back up to the previous prompt,
then use M-h C-w to select and kill the 'cat' command and the
associated output.

As an alternative, you could ignore the fact that you're in shell mode,
and issue the command using M-!, which will dump the output into a new
buffer named *Shell Command Output*, which might be more what you're



reply via email to

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