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

Andrew Sullivan ajs at shinkuro.com
Thu May 27 22:29:41 EDT 2010


Just so nobody else has to say it, I'll point out that this is the  
second message from someone not really bound to ICANN saying that it  
would be useful outside the ICANN space. That is an evident counter  
argument to one of my objections, so I withdraw it.

A

-- 
Andrew Sullivan
<ajs at shinkuro.com>

On 2010-05-27, at 21:19, Jan Dubois <jand at activestate.com> wrote:

> On Thu, 27 May 2010, Norman Gray wrote:
>> On 2010 May 27, at 00:11, Jan Dubois wrote:
>>> 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.
>>
>> I did try it, and a Terminal started from Spotlight inherits  
>> launchd's
>> environment, and launchd's initial environment is (usually? always?)
>> governed by environment.plist.
>
> No, the launchd environment is separate from ~/.MacOSX/ 
> environment.plist.
>
> It also looks like environment.plist is read only once and cached.   
> Any
> changes are only effective once I log out and back in (on both 10.5  
> and
> 10.6).
>
>> For example, try
>>
>> % launchctl setenv LAUNCHD_ENVIRONMENT_TEST foo
>>
>> Then quit Terminal, restart it using Spotlight, and
>>
>> % echo $LAUNCHD_ENVIRONMENT_TEST
>> foo
>> %
>
> This does indeed work, even on 10.5.
>
> Further testing shows that on 10.6 processes launched by Spotlight  
> will now
> get the ~/.MacOSX/environment.plist settings as well, whereas on  
> 10.5 they
> don't.  So I guess this is just a problem that has since been fixed  
> by Apple.
>
> Sorry for the confusion; I should have double-checked on both 10.5  
> and 10.6
> first.
>
> Cheers,
> -Jan
>
>
> _____________________________________________________________
> MacOSX-Emacs mailing list
> MacOSX-Emacs at email.esm.psu.edu
> http://email.esm.psu.edu/mailman/listinfo/macosx-emacs
> List Archives: http://dir.gmane.org/gmane.emacs.macintosh.osx



More information about the MacOSX-Emacs mailing list