From: Xah Lee <xahlee@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: setevn PATH vs exec-path [was Re: Flyspell error]
Date: Wed, 5 Aug 2009 16:51:03 -0700 (PDT) [thread overview]
Message-ID: <27a6743e-010a-4650-a7f9-823b099aff60@x25g2000prf.googlegroups.com> (raw)
In-Reply-To: mailman.3953.1249492495.2239.help-gnu-emacs@gnu.org
On Aug 5, 10:14 am, Eli Zaretskii <e...@gnu.org> wrote:
> > From: Xah Lee <xah...@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.
interesting and very informative.
For Windows emacs users who uses unix shell, won't there be
exceptions?
For example, i use emacs on windows, but right now predominately uses
unix shell cygwin
when i run “M-x shell” in emacs, i don't want my shell to touch any of
the Windows's executables if possible. e.g. i set PATH in emacs in a
way assuming i'm working in cygwin bash:
typical paths for unix shell:
"/usr/local/bin"
"/usr/bin"
"/bin"
"/usr/X11R6/bin"
"/cygdrive/c/Windows/Program Files (x86)/PHP/"
some Windows paths that are i think necessary in order for cygwin to
run.
"/cygdrive/c/Windows/system32"
"/cygdrive/c/Windows"
"/cygdrive/c/Windows/System32/Wbem"
but when i'm not in shell in emacs, i do want Windows emacs to be able
to access any normal Windows's executables, so my exec-path is like
this:
"C:/cygwin/bin/"
"C:/Program Files (x86)/Emacs/emacs/bin/"
"C:/Program Files (x86)/PHP/"
"C:/Windows/system32/"
"C:/Windows/"
"C:/Windows/System32/Wbem/"
if i just setenv PATH and just let emacs set exec-path, i think i ran
into some problems in emacs... that could be i messed something up in
my setenv PATH...
Xah
∑ http://xahlee.org/
☄
next prev parent reply other threads:[~2009-08-05 23:51 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-01 0:06 Flyspell error sam jesse
2009-08-01 7:29 ` Eli Zaretskii
2009-08-01 8:53 ` sam jesse
2009-08-01 10:01 ` Eli Zaretskii
[not found] ` <mailman.3634.1249120899.2239.help-gnu-emacs@gnu.org>
2009-08-01 10:13 ` Richard Riley
[not found] ` <mailman.3635.1249129213.2239.help-gnu-emacs@gnu.org>
2009-08-01 21:58 ` Xah Lee
2009-08-02 7:10 ` sam jesse
[not found] ` <mailman.3687.1249222316.2239.help-gnu-emacs@gnu.org>
2009-08-02 20:02 ` Xah Lee
2009-08-02 20:28 ` Richard Riley
2009-08-03 0:08 ` Xah Lee
2009-08-03 0:10 ` Xah Lee
2009-08-03 20:51 ` sam jesse
2009-08-03 20:54 ` sam jesse
2009-08-03 22:21 ` Xah Lee
2009-08-03 23:12 ` sam jesse
[not found] ` <mailman.3801.1249343719.2239.help-gnu-emacs@gnu.org>
2009-08-04 2:17 ` Xah Lee
2009-08-04 4:44 ` sam jesse
2009-08-04 17:34 ` suvayu ali
2009-08-04 18:10 ` Eli Zaretskii
[not found] ` <mailman.3862.1249407393.2239.help-gnu-emacs@gnu.org>
2009-08-04 18:57 ` Xah Lee
[not found] ` <mailman.3868.1249409494.2239.help-gnu-emacs@gnu.org>
2009-08-04 19:02 ` Xah Lee
2009-08-04 21:29 ` sam jesse
2009-08-04 22:06 ` setevn PATH vs exec-path [was Re: Flyspell error] Xah Lee
2009-08-05 5:52 ` Lennart Borgman
[not found] ` <mailman.3919.1249451575.2239.help-gnu-emacs@gnu.org>
2009-08-05 12:40 ` Xah Lee
2009-08-05 17:14 ` Eli Zaretskii
2009-08-05 17:25 ` Drew Adams
[not found] ` <mailman.3953.1249492495.2239.help-gnu-emacs@gnu.org>
2009-08-05 23:51 ` Xah Lee [this message]
2009-08-07 9:30 ` Eli Zaretskii
[not found] ` <mailman.4107.1249637430.2239.help-gnu-emacs@gnu.org>
2009-08-07 11:43 ` Xah Lee
[not found] ` <mailman.3916.1249445924.2239.help-gnu-emacs@gnu.org>
2009-08-05 7:03 ` Flyspell error Xah Lee
2009-08-05 7:07 ` Anselm Helbig
2009-08-05 17:46 ` sam jesse
2009-08-06 7:48 ` sam jesse
2009-08-02 21:21 ` Lennart Borgman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=27a6743e-010a-4650-a7f9-823b099aff60@x25g2000prf.googlegroups.com \
--to=xahlee@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.