all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ivan Andrus <darthandrus@gmail.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: Emacs Dev <emacs-devel@gnu.org>
Subject: Re: Inferior process mystery
Date: Wed, 25 Apr 2012 21:15:47 +0200	[thread overview]
Message-ID: <6626E25F-B780-4773-AEAA-D9451BC0E9ED@gmail.com> (raw)
In-Reply-To: <m2mx5zy9jp.fsf@igel.home>

On Apr 25, 2012, at 8:02 PM, Andreas Schwab wrote:
> Dave Abrahams <dave@boostpro.com> 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


  reply	other threads:[~2012-04-25 19:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-25 14:46 Inferior process mystery Dave Abrahams
2012-04-25 15:21 ` Andreas Schwab
2012-04-25 17:20   ` Dave Abrahams
2012-04-25 18:02     ` Andreas Schwab
2012-04-25 19:15       ` Ivan Andrus [this message]
2012-04-26  2:21         ` John Wiegley
2012-04-26 16:17       ` Dave Abrahams
2012-04-25 15:32 ` Stefan Monnier

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=6626E25F-B780-4773-AEAA-D9451BC0E9ED@gmail.com \
    --to=darthandrus@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=schwab@linux-m68k.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.