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

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

Re: emacs doesn't inherit PATH from environment


From: Larry Evans
Subject: Re: emacs doesn't inherit PATH from environment
Date: Wed, 14 Feb 2018 19:03:34 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 02/14/2018 05:18 PM, Robert Thorpe wrote:
Larry Evans <cppljevans@suddenlink.net> writes:

But why must I prepend the missing paths with that
(setenv "PATH"...) in my ~/.emacs.d/init.common.el?
After all, according to:

    The value of environment variable “PATH” is used by emacs when you are
    running a shell in emacs, similar to when you are using a shell in
    a terminal.

from here:

    https://www.emacswiki.org/emacs/ExecPath

that should be done automatically.

I think the answer is that I usually invoke emacs
from a pulldown menu in my window system, and I'm
guessing that doesn't use my bash environmnent.
However, when, in my ~/.profile, the PATH is exported,
then *that* PATH shows up in emacs; so, I'm guessing
the windowing system uses sh instead of bash and
therefore the PATH is taken from sh instead of bash.

I'm not sure I understand what your saying here

The point that Glenn Morris made is that the separator for path elements
is ":" on Unix-like systems.
I understand, and after changing ; to : in ~/.emacs.d/init.common.el
it worked; however, the point I was making is the setting of PATH
in ~/.emacs.d/init.common.el shouldn't be needed.  Indeed,
the setenv in ~/.emacs.d/init.common.el was deleted, but I also
moved the 'export PATH' from ~/.bashrc to ~/.profile. After that, the Makefile worked. The conclusion I reached was that somehow
emacs, when invoked from my windows interface, apparently just
runs the ~/.profile code but not the ~./bashrc code and that's
why emacs was not seeing the PATH (because, previously it was
set in ~/.bashrc).




reply via email to

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