all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kevin Rodgers <kevin.d.rodgers@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: M-x call with optional arg; call from Elisp
Date: Wed, 29 May 2013 23:44:01 -0600	[thread overview]
Message-ID: <ko6ot4$glf$1@ger.gmane.org> (raw)
In-Reply-To: <87fvx6ubkr.fsf@VLAN-3434.student.uu.se>

On 5/28/13 1:52 PM, Emanuel Berg wrote:
> Stefan Monnier<monnier@iro.umontreal.ca>  writes:
>> Don't use shell-command-on-region from Elisp. Use
>> call-process-region instead.
>
> The above function seems to work. shell-command-on-region and
> call-process-region are not syntactically interchangeable, but I'll
> do it if you care to tell me the advantage.

If you are not using shell features such as redirection, pipes, globbing (file
name expansion), variable expansion, conditional and iterative control flow
etc. then there is no need to invoke an additional/intermediary shell process
between emacs and the command you want to run.

-- 
Kevin Rodgers
Denver, Colorado, USA




      reply	other threads:[~2013-05-30  5:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-27 16:03 M-x call with optional arg; call from Elisp Emanuel Berg
2013-05-27 16:13 ` Emanuel Berg
2013-05-28 19:24   ` Emanuel Berg
2013-05-27 18:59 ` Stefan Monnier
     [not found] ` <mailman.476.1369681518.22516.help-gnu-emacs@gnu.org>
2013-05-28 19:52   ` Emanuel Berg
2013-05-30  5:44     ` Kevin Rodgers [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='ko6ot4$glf$1@ger.gmane.org' \
    --to=kevin.d.rodgers@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.