unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: David Kastrup <dak@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Piping output to a buffer
Date: Mon, 25 Feb 2008 07:56:53 +0100	[thread overview]
Message-ID: <853arhy156.fsf@lola.goethe.zz> (raw)
In-Reply-To: barmar-25CD87.01352025022008@comcast.dca.giganews.com

Barry Margolin <barmar@alum.mit.edu> writes:

> In article <877igtho8a.fsf@celephais.home.net>,
>  cothrige <cothrige@yahoo.com> 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


  reply	other threads:[~2008-02-25  6:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-25  0:30 Piping output to a buffer cothrige
2008-02-25  6:35 ` Barry Margolin
2008-02-25  6:56   ` David Kastrup [this message]
2008-02-26  3:11     ` Barry Margolin
2008-02-26  5:56     ` cothrige
2008-02-26  5:25   ` cothrige

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=853arhy156.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).