From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: Redirecting the output of a commend in "shell" into a buffer Date: Wed, 03 Sep 2014 18:35:36 +0200 Organization: Aioe.org NNTP Server Message-ID: <87iol4d5lz.fsf@debian.uxu> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1409762427 27805 80.91.229.3 (3 Sep 2014 16:40:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Sep 2014 16:40:27 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Sep 03 18:40:21 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XPDbY-0003k0-Lf for geh-help-gnu-emacs@m.gmane.org; Wed, 03 Sep 2014 18:40:20 +0200 Original-Received: from localhost ([::1]:46613 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPDbY-00077c-B5 for geh-help-gnu-emacs@m.gmane.org; Wed, 03 Sep 2014 12:40:20 -0400 Original-Path: usenet.stanford.edu!news.kjsl.com!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 34 Original-NNTP-Posting-Host: P0uMB9BthHuWo8+BJXB4Mw.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:glJhEDb9EVcL4rGwAyak4CIATK4= Mail-Copies-To: never Original-Xref: usenet.stanford.edu gnu.emacs.help:207349 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:99626 Archived-At: C K Kashyap writes: > Hi, While using shell, is it possible to redirect > output of commands into a buffer? Ofcourse, the shell > buffer itself is editable and all but it would be > nice if I could directly pipe the output of a command > into a new buffer. Regards, Kashyap Are you using the Emacs shell (within Emacs) or some other shell (bash, zsh) outside of Emacs? If you are in Emacs all along what you want already happens, and can be setup for specific purposes with some creativity. But I suspect you want this from outside of Emacs, in what case a poor man's solution is redirecting the output to a certain file; in Emacs, setup a keystroke to open a buffer from that file. (That is fast, if you have a shortcut to go from the shell to Emacs as well.) Otherwise, for the full-power solution, you must use IPC (perhaps a "named pipe" or FIFO) or Emacs as a server: https://www.gnu.org/software/emacs/manual/html_node/emacs/Emacs-Server.html I can't help you as I never did that, but if you get it right, be sure to tell us how you did it! Good luck! -- underground experts united