From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Friedrich Dominicus Newsgroups: gmane.emacs.help Subject: Re: Piped insert-file? Date: 14 Nov 2002 18:26:47 +0100 Organization: Q Software Solutions GmbH Sender: help-gnu-emacs-admin@gnu.org Message-ID: <87znscdpuw.fsf@fbigm.here> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1037299595 12867 80.91.224.249 (14 Nov 2002 18:46:35 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 14 Nov 2002 18:46:35 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18CP0Y-0003KV-00 for ; Thu, 14 Nov 2002 19:46:30 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 18CP1U-00022M-00; Thu, 14 Nov 2002 13:47:28 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!news.tu-darmstadt.de!news.belwue.de!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 30 Original-X-Trace: news.t-online.com 1037294727 07 26934 MVRTE2kGSqYDxg 021114 17:25:27 Original-X-Complaints-To: abuse@t-online.com X-Sender: 320004655587-0001@t-dialin.net User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp) Original-Xref: shelby.stanford.edu gnu.emacs.help:107045 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:3590 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:3590 ginak writes: > Is there a way (without creating a temporary file) to insert into a > buffer the results of running a file's contents through a Unix pipe? Some more words would be helpful. you can run M-x shell-command-on-region line-1 line-2 line-4 line-10 line-5 Making it in a region and run sort on it yields line-1 line-10 line-2 line-4 line-5 other option you may have run (shell-command-to-string "ls -l /tmp/*") C-u C-x C-e insert that stuff at point here If you want it interactive you have to write a wrapper for it and than there is with-output-to-temp-buffer which may of some use too Regards Friedrich