help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Convert the shell command used in emacs init-file into its normal ve


From: tomas
Subject: Re: Convert the shell command used in emacs init-file into its normal version.
Date: Wed, 9 Jun 2021 10:50:52 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Jun 09, 2021 at 04:22:38PM +0800, Hongyi Zhao wrote:

[...]

> > The below is split into several strings (call-process takes a list
> > of arguments [...]

> Is this way more efficient than the original version?

Probably yes -- it calls directly curl instead of invoking a shell.

But efficiency is not very important here. The important thing is
what you are trying to achieve.

Calling a shell emulates more the environment you have when using
a shell (e.g. PATH, locales, variable expansion, etc). Sometimes
you want to achieve exactly that.

Calling the subprocess directly via exec is simpler, easier to understand,
but bypasses the services afforded by the shell. Sometimes this is
exactly what you want.

Cheers
 - t

Attachment: signature.asc
Description: Digital signature


reply via email to

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