[Top][All Lists]

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

bug#7923: 23.2; Shell PATH environment variable problem

From: Alan Third
Subject: bug#7923: 23.2; Shell PATH environment variable problem
Date: Tue, 24 May 2016 19:36:59 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.93 (darwin)

John McHugh <address@hidden> writes:

> Stefan
> I don't think this is the problem
> In OS X, Leopard, the initial $PATH setting comes from a property list file
> ~/.MacOSX/environment.plist  
> This file contains a list of properties and their initial values.  In this 
> case, the properties are environment variables.
> The value for the PATH is 
> /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
> According to the OS X Leopard documentation, the contents of files in
> /etc/paths.d is then added to PATH. This allows software packages to
> add their specific bin directories without consideration of the
> specific shell to be used, or the user using the machine. Installing
> X11 adds a file to this directory containing the path to X11 binaries.
> Now, if I issue the emacs command "shell-command echo $PATH" I get the PATH 
> value that is in the plist file.  If I change the plist file, output of that 
> command changes, as well.
> What is not happening is that the additional files in /etc/paths.d are not 
> being added to the path.
> Since my shell for shell windows in emacs is bash, my .bashrc file is being 
> executed since, they appear in the PATH echoed from a shell window in emacs.
> Is there an explanation of how emacs sets the path for shell commands?

PATH handling on OS X is rather broken and seems to change with each new
release. GUI apps don't inherit the same PATH as terminal applications.
I've found the simplest solution for Emacs is to use the
exec-path-from-shell package.

I wrote up a wee bit about how zsh generates it's PATH on OS X, and it
may give you some pointers for bash:


Ultimately this isn't an Emacs problem, but a general issue with OS X,
so I'm going to close this bug report.

Sorry I can't be more help.

Alan Third

reply via email to

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