[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Inferior process mystery
From: |
Ivan Andrus |
Subject: |
Re: Inferior process mystery |
Date: |
Wed, 25 Apr 2012 21:15:47 +0200 |
On Apr 25, 2012, at 8:02 PM, Andreas Schwab wrote:
> Dave Abrahams <address@hidden> writes:
>
>> Yep, that is in fact the problem. But how do I discover what is changing my
>> exec-path?
>
> exec-path is initialized from $PATH as inherited by emacs, which appears
> to be different from the one set in your shell.
Since you're on a Mac, GUI applications don't inherit from your shell. Instead
you should set environment variables in ~/.MacOSX/environment.plist, or see [1]
for a number of other ways to set them and the different problems they have.
There are various ways to "fix" this automatically. The method I use is to
update environment.plist if .bashrc is newer [2]. Other methods include
setting exec-path by calling a shell-script which will inherit your .bashrc
setting.
This is a huge source of confusion and questions in places like StackOverflow.
I've been trying to think of a good way to bring this to people's attention
without being obnoxious. One idea is when, for example, a compilation buffer
get's a command not found error, create an overlay (only on OS X (or perhaps
not since it can happen in other desktop environments as well)) which explains
the problem. It wouldn't always apply of course, but it might save people some
headaches. I'm not sure if that sort of thing would be acceptable for
inclusion in Emacs, but I think it would only be useful if it were on by
default.
-Ivan
[1]
http://stackoverflow.com/questions/135688/setting-environment-variables-in-os-x
[2] http://use.perl.org/~brian_d_foy/journal/8915
Re: Inferior process mystery, Stefan Monnier, 2012/04/25