unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Missing simple way to call external process in Emacs?
@ 2023-03-11 13:02 Thomas Koch
  2023-03-11 14:54 ` Michael Albinus
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Koch @ 2023-03-11 13:02 UTC (permalink / raw)
  To: emacs-devel@gnu.org

This is a sidenote from my previous email on continuations passing[1].

[1] https://lists.gnu.org/archive/html/emacs-devel/2023-03/msg00430.html

It seems to me, that shell-command is used a lot from elisp code also in Emacs core, although its docstring says:

"""In Elisp, you will often be better served by calling call-process or
   start-process directly, since they offer more control and do not
   impose the use of a shell (with its need to quote arguments)."""

Apparently, shell-command is the most convenient way in Emacs core to just run an external process and consume its output. However as https://debbugs.gnu.org/12145 shows it can quickly lead to problems.

Pfuture[2] might be a better alternative, however it is not on Elpa. I put the pfuture author in BCC.

[2] https://github.com/Alexander-Miller/pfuture



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Missing simple way to call external process in Emacs?
  2023-03-11 13:02 Missing simple way to call external process in Emacs? Thomas Koch
@ 2023-03-11 14:54 ` Michael Albinus
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Albinus @ 2023-03-11 14:54 UTC (permalink / raw)
  To: Thomas Koch; +Cc: emacs-devel@gnu.org

Thomas Koch <thomas@koch.ro> writes:

Hi Thomas,

> This is a sidenote from my previous email on continuations passing[1].
>
> [1] https://lists.gnu.org/archive/html/emacs-devel/2023-03/msg00430.html
>
> It seems to me, that shell-command is used a lot from elisp code also
> in Emacs core, although its docstring says:
>
> """In Elisp, you will often be better served by calling call-process or
>    start-process directly, since they offer more control and do not
>    impose the use of a shell (with its need to quote arguments)."""
>
> Apparently, shell-command is the most convenient way in Emacs core to
> just run an external process and consume its output. However as
> https://debbugs.gnu.org/12145 shows it can quickly lead to problems.

What about `process-lines'? It uses `call-process'.

Best regards, Michael.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-11 14:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-11 13:02 Missing simple way to call external process in Emacs? Thomas Koch
2023-03-11 14:54 ` Michael Albinus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).