From: Ian Zimmerman <itz@buug.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Gist: get output of an external program on region
Date: Tue, 25 Aug 2015 23:59:21 -0700 [thread overview]
Message-ID: <20150826065432.19832.0393CFDE@ahiker.mooo.com> (raw)
In-Reply-To: <87y4gy4m13.fsf@kuiper.lan.informatimago.com>
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-| ?
No:
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
REPLACE ERROR-BUFFER DISPLAY-ERROR-BUFFER)
Execute string COMMAND in inferior shell with region as input.
Normally display output (if any) in temp buffer `*Shell Command
Output*';
Prefix arg means replace the region with it. Return the exit code of
COMMAND.
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.
next prev parent reply other threads:[~2015-08-26 6:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.112.1440564636.28410.help-gnu-emacs@gnu.org>
2015-08-26 6:11 ` Gist: get output of an external program on region Pascal J. Bourguignon
2015-08-26 6:59 ` Ian Zimmerman [this message]
2015-08-26 15:18 ` Stefan Monnier
2015-08-26 4:50 Ian Zimmerman
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150826065432.19832.0393CFDE@ahiker.mooo.com \
--to=itz@buug.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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.