unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#42704: Documentation of call-process
@ 2020-08-04  9:29 Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2020-08-04 14:32 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-08-04  9:29 UTC (permalink / raw)
  To: 42704


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.





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

* bug#42704: Documentation of call-process
  2020-08-04  9:29 bug#42704: Documentation of call-process Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2020-08-04 14:32 ` Eli Zaretskii
  2020-08-04 17:47   ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2020-08-04 14:32 UTC (permalink / raw)
  To: Gregory Heytings; +Cc: 42704

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





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

* bug#42704: Documentation of call-process
  2020-08-04 14:32 ` Eli Zaretskii
@ 2020-08-04 17:47   ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2020-08-21 14:15     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-08-04 17:47 UTC (permalink / raw)
  To: 42704


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





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

* bug#42704: Documentation of call-process
  2020-08-04 17:47   ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2020-08-21 14:15     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-21 14:15 UTC (permalink / raw)
  To: Gregory Heytings; +Cc: 42704

Gregory Heytings <ghe@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





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

end of thread, other threads:[~2020-08-21 14:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-04  9:29 bug#42704: Documentation of call-process Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-08-04 14:32 ` Eli Zaretskii
2020-08-04 17:47   ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-08-21 14:15     ` Lars Ingebrigtsen

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