From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.help Subject: Re: Piping output to a buffer Date: Mon, 25 Feb 2008 07:56:53 +0100 Organization: Organization?!? Message-ID: <853arhy156.fsf@lola.goethe.zz> References: <877igtho8a.fsf@celephais.home.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1203925341 9354 80.91.229.12 (25 Feb 2008 07:42:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 Feb 2008 07:42:21 +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 Feb 25 08:42:46 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 1JTXyz-0005WU-AZ for geh-help-gnu-emacs@m.gmane.org; Mon, 25 Feb 2008 08:42:41 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JTXyT-0002Og-Kq for geh-help-gnu-emacs@m.gmane.org; Mon, 25 Feb 2008 02:42:09 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!t-online.de!storethat.news.telefonica.de!telefonica.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help X-Face: 2FEFf>]>q>2iw=B6, xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN; i"; /yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:HnvG6dMQi/LBDdCZSC0BOv7fgV4= Original-Lines: 24 Original-NNTP-Posting-Date: 25 Feb 2008 07:56:53 CET Original-NNTP-Posting-Host: 0b7cffc7.newsspool4.arcor-online.net Original-X-Trace: DXC=DPTC8X?iKMLAa; :RKVJ>LE4IUK\BH3YB2U:in^GQOMG1_LiI6ENVaM3>5MOK`; S:bhJL5hg`_@T 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:51838 Archived-At: Barry Margolin writes: > In article <877igtho8a.fsf@celephais.home.net>, > cothrige wrote: > >> I have noticed that in vim one can invoke an external command and pipe >> the output into the current buffer via the `!!` or `:r!` commands. >> While I have not made a habit of really using this command in vim, as I >> have also not made a habit of using vim, I did realize that this could >> be a really useful capability. So, how might one do this in emacs? > > C-u M-! !! pipes the current line through the external command. The Emacs equivalent to that would be marking the line and then using C-u M-| I consider it more likely that your variant will be needed, however: more often than not, !! eating the current line is a nuisance rather than a benefit in vi. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum