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

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

Re: setevn PATH vs exec-path [was Re: Flyspell error]


From: Eli Zaretskii
Subject: Re: setevn PATH vs exec-path [was Re: Flyspell error]
Date: Wed, 05 Aug 2009 20:14:44 +0300

> From: Xah Lee <xahlee@gmail.com>
> Date: Tue, 4 Aug 2009 15:06:35 -0700 (PDT)
> 
> So, the system's PATH env var and emacs exec-path needs not to be the
> same, and ideally their values probably shouldn't be identical if one
> is a control freak, since they serve different purposes.

Actually, my advice is to have them both identical (well, actually,
equivalent, not identical, because one is a list while the other is a
string).  That's because exec-path is used when Emacs invokes programs
directly (e.g., via `call-process') while PATH is used indirectly when
Emacs invokes programs via the shell, like in "M-x compile" or "M-x grep".
In the latter case, the shell will look for programs along PATH.
If your values are not equivalent, some Emacs commands that invoke
subsidiary programs will mysteriously fail, and unless you know very
well which Emacs command uses the shell and which does not, you will
have hard time figuring out how to set them correctly.

Of course, if PATH is modified before Emacs is started, then exec-path
will be automatically equivalent to PATH, because it's computed from
PATH's value.




reply via email to

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