From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: tyler Newsgroups: gmane.emacs.help Subject: Re: editing output in shell mode Date: Fri, 09 Jan 2009 17:45:09 -0400 Message-ID: <87r63cyx0a.fsf@blackbart.sedgenet> References: <20524da70901091312y4b016693p15be5e93eec3f4f9@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1231537553 15521 80.91.229.12 (9 Jan 2009 21:45:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 9 Jan 2009 21:45:53 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 09 22:47:04 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LLPC1-0003fN-V9 for geh-help-gnu-emacs@m.gmane.org; Fri, 09 Jan 2009 22:47:02 +0100 Original-Received: from localhost ([127.0.0.1]:54882 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LLPAm-0008IM-3U for geh-help-gnu-emacs@m.gmane.org; Fri, 09 Jan 2009 16:45:44 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LLPAT-0008IH-Uu for help-gnu-emacs@gnu.org; Fri, 09 Jan 2009 16:45:25 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LLPAR-0008I5-J5 for help-gnu-emacs@gnu.org; Fri, 09 Jan 2009 16:45:24 -0500 Original-Received: from [199.232.76.173] (port=57307 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LLPAR-0008I2-CE for help-gnu-emacs@gnu.org; Fri, 09 Jan 2009 16:45:23 -0500 Original-Received: from main.gmane.org ([80.91.229.2]:44395 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LLPAR-0004Ci-1u for help-gnu-emacs@gnu.org; Fri, 09 Jan 2009 16:45:23 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LLPAQ-00036D-F8 for help-gnu-emacs@gnu.org; Fri, 09 Jan 2009 21:45:22 +0000 Original-Received: from hlfxns0169w-142177062234.pppoe-dynamic.ns.aliant.net ([142.177.62.234]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 09 Jan 2009 21:45:22 +0000 Original-Received: from tyler.smith by hlfxns0169w-142177062234.pppoe-dynamic.ns.aliant.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 09 Jan 2009 21:45:22 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 32 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: hlfxns0169w-142177062234.pppoe-dynamic.ns.aliant.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:I4+Zkd3NRdxicdjxd7B+M662wvQ= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:61225 Archived-At: "Samuel Wales" 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 after. HTH, Tyler