GNU bug report logs - #42704
Documentation of call-process

Previous Next

Package: emacs;

Reported by: Gregory Heytings <ghe <at> sdf.org>

Date: Tue, 4 Aug 2020 09:30:01 UTC

Severity: minor

Tags: fixed

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 42704 in the body.
You can then email your comments to 42704 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#42704; Package emacs. (Tue, 04 Aug 2020 09:30:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Gregory Heytings <ghe <at> sdf.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 04 Aug 2020 09:30:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Gregory Heytings <ghe <at> sdf.org>
To: bug-gnu-emacs <at> gnu.org
Subject: Documentation of call-process
Date: Tue, 4 Aug 2020 11:29:26 +0200 (CEST)
The documentation of 'call-process' doe not make reference to the variable 
'exec-path'.  It should.

Using '(setenv "PATH" "...")' does not have the expected effect for 
'call-process'.  The environment variable "PATH" is correctly updated, the 
variable 'process-environment' is also updated, but what 'call-process' 
actually uses to locate the executable is the variable 'exec-path'.  This 
should be clearly stated in the documentation.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#42704; Package emacs. (Tue, 04 Aug 2020 14:33:02 GMT) Full text and rfc822 format available.

Message #8 received at 42704 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Gregory Heytings <ghe <at> sdf.org>
Cc: 42704 <at> debbugs.gnu.org
Subject: Re: bug#42704: Documentation of call-process
Date: Tue, 04 Aug 2020 17:32:25 +0300
> Date: Tue, 4 Aug 2020 11:29:26 +0200 (CEST)
> From: Gregory Heytings via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> The documentation of 'call-process' doe not make reference to the variable 
> 'exec-path'.  It should.

The ELisp manual says that, see the node "Subprocess Creation".  This
isn't specific to call-process, that variable is used by all the
functions that create subprocesses.

> Using '(setenv "PATH" "...")' does not have the expected effect for 
> 'call-process'.  The environment variable "PATH" is correctly updated, the 
> variable 'process-environment' is also updated, but what 'call-process' 
> actually uses to locate the executable is the variable 'exec-path'.

The changes to the environment variables only affect the environment
passed to subprocesses, they don't affect the environment of the Emacs
process itself.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#42704; Package emacs. (Tue, 04 Aug 2020 17:49:02 GMT) Full text and rfc822 format available.

Message #11 received at 42704 <at> debbugs.gnu.org (full text, mbox):

From: Gregory Heytings <ghe <at> sdf.org>
To: 42704 <at> debbugs.gnu.org
Subject: Re: bug#42704: Documentation of call-process
Date: Tue, 4 Aug 2020 19:47:55 +0200 (CEST)
>
>> The documentation of 'call-process' doe not make reference to the 
>> variable 'exec-path'.  It should.
>
> The ELisp manual says that, see the node "Subprocess Creation".  This 
> isn't specific to call-process, that variable is used by all the 
> functions that create subprocesses.
>

Indeed.  I still believe that adding the sentence "If PROGRAM is not an 
absolute file name, the variable exec-path contains a list of directories 
to search." in the docstring of call-process (and a similar sentence in 
the docstrings of make-process and call-process-region) would be useful.

>
>> Using '(setenv "PATH" "...")' does not have the expected effect for 
>> 'call-process'.  The environment variable "PATH" is correctly updated, 
>> the variable 'process-environment' is also updated, but what 
>> 'call-process' actually uses to locate the executable is the variable 
>> 'exec-path'.
>
> The changes to the environment variables only affect the environment 
> passed to subprocesses, they don't affect the environment of the Emacs 
> process itself.
>

Indeed.  Creating a subprocess is in between the two (Emacs and the 
subprocess), and I at least would have expected that setting "PATH" would 
have changed the path in which the program executable is searched.

Gregory




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#42704; Package emacs. (Fri, 21 Aug 2020 14:17:02 GMT) Full text and rfc822 format available.

Message #14 received at 42704 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Gregory Heytings <ghe <at> sdf.org>
Cc: 42704 <at> debbugs.gnu.org
Subject: Re: bug#42704: Documentation of call-process
Date: Fri, 21 Aug 2020 16:15:57 +0200
Gregory Heytings <ghe <at> sdf.org> writes:

> Indeed.  I still believe that adding the sentence "If PROGRAM is not
> an absolute file name, the variable exec-path contains a list of
> directories to search." in the docstring of call-process (and a
> similar sentence in the docstrings of make-process and
> call-process-region) would be useful.

Makes sense to me, so I've now added a sentence about exec-path to those
three doc strings.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 21 Aug 2020 14:17:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 42704 <at> debbugs.gnu.org and Gregory Heytings <ghe <at> sdf.org> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 21 Aug 2020 14:17:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 19 Sep 2020 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 191 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.