[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Gist: get output of an external program on region

From: Ian Zimmerman
Subject: Re: Gist: get output of an external program on region
Date: Tue, 25 Aug 2015 23:59:21 -0700
User-agent: Mutt/1.5.21 (2010-09-15)

On 2015-08-26 08:11 +0200, Pascal J. Bourguignon wrote:

> > There is shell-command-on-region and shell-command-as-string, but
> > nothing that combines the input marshalling and the output marshalling.

> You mean, just like C-u M-| ?


  M-| runs the command shell-command-on-region, which is an interactive
  compiled Lisp function in `simple.el'.

  It is bound to M-|, <menu-bar> <tools> <shell-on-region>.

  (shell-command-on-region START END COMMAND &optional OUTPUT-BUFFER

  Execute string COMMAND in inferior shell with region as input.
  Normally display output (if any) in temp buffer `*Shell Command
  Prefix arg means replace the region with it.  Return the exit code of

1. I need the output _as a string_.  Not in some " *itz-temp-buffer*" which
I then have to messily kill.

2. I need to pass the region to the program _as stdin_.

and also

3. I need to avoid the interactive side-effects of
shell-command-on-region, such as its tendency to create a new window to
view the output buffer.

Please *no* private copies of mailing list or newsgroup messages.
Rule 420: All persons more than eight miles high to leave the court.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]