[OS X Emacs] Re: Environment variables and Aquamacs 2.0

Jan Dubois jand at activestate.com
Wed May 26 19:11:37 EDT 2010


On Wed, 26 May 2010, Norman Gray wrote:
> On 2010 May 26, at 22:01, Jan Dubois wrote:
>
> > There is actually at least one more scenario: Aquamacs being started
> > from Spotlight. In which case you get neither environment.plist nor
> > shell environment variables because the process starts out as a
> > child of Spotlight, which is not running under the current user.
>
>
> I don't believe this would be a separate scenario.

No need for "believe", you can actually try it.  For me applications
started via Spotlight don't get the settings from environment.plist,
but application started via the Finder do.

> Spotlight (and other application launchers) will launch applications
> by getting launchd to launch them, which is the same as the Finder
> does. They therefore inherit launchd's environment, which is the
> environment which is set by environment.plist. (I may be wrong in a
> couple of fine details here, but that's the basic notion, which is
> unfortunately not documented as obviously as one would like).

I don't think environment.plist is a launchd thingie; it is used
by WindowServer/Finder only.  But whatever the details, the *fact*
is that at least on *some* systems GUI processes started via Spotlight
get a different set of environment variables than processes started
via Finder.

Cheers,
-Jan





More information about the MacOSX-Emacs mailing list