From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Teemu Likonen Newsgroups: gmane.emacs.help Subject: Re: redirect stdout to emacs scratch Date: Mon, 08 Dec 2008 15:43:50 GMT Organization: Sonera Customer Message-ID: <87r64illjd.fsf@iki.fi> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1228755132 11624 80.91.229.12 (8 Dec 2008 16:52:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Dec 2008 16:52:12 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Dec 08 17:53:15 2008 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 1L9jM4-0007B0-Vv for geh-help-gnu-emacs@m.gmane.org; Mon, 08 Dec 2008 17:53:09 +0100 Original-Received: from localhost ([127.0.0.1]:50709 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L9jKu-0005GR-0y for geh-help-gnu-emacs@m.gmane.org; Mon, 08 Dec 2008 11:51:56 -0500 Original-Path: news.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!feeder.erje.net!feeder2.news.saunalahti.fi!newsfeed2.funet.fi!newsfeed1.funet.fi!newsfeeds.funet.fi!nntp.inet.fi!central1.inet.fi!inet.fi!read4.inet.fi.POSTED!53ab2750!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) Cancel-Lock: sha1:NQ1hABL8lHHaI8ewvpvudglp9ws= Original-Lines: 20 Original-NNTP-Posting-Host: 80.220.180.181 Original-X-Complaints-To: abuse@inet.fi Original-X-Trace: read4.inet.fi 1228751030 80.220.180.181 (Mon, 08 Dec 2008 17:43:50 EET) Original-NNTP-Posting-Date: Mon, 08 Dec 2008 17:43:50 EET Original-Xref: news.stanford.edu gnu.emacs.help:165133 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:60461 Archived-At: Chetan (2008-12-08 07:22 -0800) wrote: > pagod writes: >> pagod> echo "hello, world" | emacs I believe there is not any nice way to do this. > You can run it quite simply within the eshell prompt inside emacs. > M-x eshell > eshell$ echo "foo" >> # > eshell$ myprog >> # > echell$ echo "bar" >> # Another and perhaps more obvious solution is to run shell commands with M-1 M-! command while in the *scratch* buffer. For example: M-1 M-! echo "foo" It can actually be any prefix argument for M-!, not just number 1, but M-1 is a good choice when ! is in the same key as 1.