[Top][All Lists]

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

Re: exec-path question

From: Mark Tran
Subject: Re: exec-path question
Date: Sat, 26 Feb 2011 01:48:34 -0800

Applications in OS X are not launched by your shell and therefore do not inherit it's environment variables. They're started through launchd.

If you want Emacs.app to inherit environment variables then you can set user session environment variables in ~/.MacOSX/environment.plist.

More information at:


On Fri, Feb 25, 2011 at 7:51 PM, Ben Key <address@hidden> wrote:

I have a question about the exec-path variable.  I am using the Nextstep build of Emacs on Mac OS X 10.6.6.  In both Emacs 23.2 and Emacs 24.0, the "/usr/local/bin" directory is not included in the list, even though it is included in my PATH environment variable.  In Emacs 23.2, the exec-path variable has the value ("/usr/bin" "/bin" "/usr/sbin" "/sbin" "/Applications/Emacs.app/Contents/MacOS/bin").  In Emacs 24, the exec-path variable has the value ("/usr/bin" "/bin" "/usr/sbin" "/sbin" "/Applications/Emacs24.app/Contents/MacOS/bin").  In Emacs 24 the following additional information is provided.

Original value was ("/usr/bin" "/bin" "/usr/sbin" "/sbin" "/usr/local/bin" "/usr/X11/bin" "/Users/bkey/src/emacs/trunk/lib-src" "/Users/bkey/src/emacs/trunk/nextstep/Emacs.app/Contents/MacOS//libexec/emacs/24.0.50/x86_64-apple-darwin10.6.0")

It looks like, at least in Emacs 24, the
"/usr/local/bin" directory is initially included in the exec-path but is latter removed for some reason.

In both versions of Emacs, the  "/usr/local/bin" directory is included in the path if I run Emacs from the command line using the full path to the Emacs executable.  It is also included in the path if am debugging Emacs using GDB so I at a loss as to how best to discover the cause of the problem.  I only get the problem if I start Emacs using the icon in the Applications menu, which is my preferred method of starting Emacs.

I need the "/usr/local/bin" directory to be included in my exec-path because I wish to use the ispell function and my hunspell executable is located there.  I know I can simply modify my .emacs file to add the "/usr/local/bin" directory to the exec-path, but I should not have to do that.  Emacs should not be removing this directory from the exec-path.

Does anyone have any idea how I should go about tracking down the cause of this problem?

reply via email to

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