From: Luca Ferrari <fluca1978@gmail.com>
To: Bruno Barbier <brubar.cs@gmail.com>
Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: shell-command-on-region but with command line arguments
Date: Wed, 9 Nov 2022 12:40:31 +0100 [thread overview]
Message-ID: <CAKoxK+5g0ojvvMvFCp0njurN+zvR98O19d4fpEs9Trv=hs48hw@mail.gmail.com> (raw)
In-Reply-To: <636b5b28.050a0220.b181b.e9bc@mx.google.com>
On Wed, Nov 9, 2022 at 8:47 AM Bruno Barbier <brubar.cs@gmail.com> wrote:
>
> Luca Ferrari <fluca1978@gmail.com> writes:
>
> > The problem is that I'm using (shell-command-on-region) that does not
> > allow me to insert arguments to the command, and I don't know how the
> > command is effectively invoked (e.g., piping the region to standard
> > input, using a temporary file) so I'm not able to "append" my
> > arguments.
>
> The command will receive the region as its standard input (see the help
> of the command shell-command-on-region):
> "Execute string COMMAND in inferior shell with region as input."
>
>
> Couldn't you just customize your own shell command string ?
Yes, and it works, thanks. I simply thought there was an embedded
function to invoke the shell command with arguments.
However, I've used this:
(perl (format "perl - %s"
argv)))
(shell-command-on-region b e perl)))
without the quoting around argv because otherwise multiple arguments
(all into argv) would have been seen as a single one on the Perl side.
Thanks.
Luca
prev parent reply other threads:[~2022-11-09 11:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-07 15:51 shell-command-on-region but with command line arguments Luca Ferrari
2022-11-07 17:22 ` Emanuel Berg
2022-11-07 19:21 ` Bruno Barbier
2022-11-08 0:13 ` Emanuel Berg
2022-11-09 7:21 ` Luca Ferrari
2022-11-09 7:53 ` Bruno Barbier
2022-11-09 10:37 ` Emanuel Berg
2022-11-09 11:40 ` Luca Ferrari [this message]
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='CAKoxK+5g0ojvvMvFCp0njurN+zvR98O19d4fpEs9Trv=hs48hw@mail.gmail.com' \
--to=fluca1978@gmail.com \
--cc=brubar.cs@gmail.com \
--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.