[OS X Emacs] Re: environment variable PATH different (emacs shell / Mac's terminal)

Marius Hofert marius.hofert at math.ethz.ch
Wed Oct 12 13:48:35 EDT 2011


Dear Rodney, Dear Jack,

that's indeed a good article. Another one I found is this:
http://stackoverflow.com/questions/135688/setting-environment-variables-in-os-x

Some things I still wonder about:
1) I am wondering why I get the PATH I get:
bash-3.2$ echo $PATH
echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/texbin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/texbin:/opt/local/bin:/opt/local/sbin:/usr/texbin:/usr/local/texlive/2011/bin
bash-3.2$ 
To be more precise, why are several folders added twice to PATH?

2) I thought the Aquamacs shell behaves exactly like the shell I open from Terminal.app. Even if I set the PATH to be the same in both applications, what are other differences I (as a newbie) should know and pay attention to?

3) Is it "good practice" or "bad practice" to set the PATH to be the same for both applications?

4) How can I set the PATH in Aquamacs? Jack's reference mentions several approachs but does not give a lot of details. It does not say which is recommended for 10.7. 
One approach (that sounds okay) is:
echo setenv REPLACE_WITH_VAR REPLACE_WITH_VALUE >> ~/.launchd.conf
echo setenv REPLACE_WITH_VAR REPLACE_WITH_VALUE | launchctl
But I what should the replacements be? I don't even have .launchd.conf or /etc/launchd.cof. Can I just create them? Is it then (?)
echo setenv PATH $PATH  >> ~/.launchd.conf
echo setenv PATH $PATH | launchctl
That would have the advantage of not having to edit it when one changes PATH in Terminal.app.


Cheers,

Marius

 

On 2011-10-12, at 18:52 , Jack Repenning wrote:

> On Oct 12, 2011, at 6:20 AM, Rodney Sparapani wrote:
> 
>> This is not an emacs question per se.  However, the "solution" has been discussed here (and elsewhere).  Look into ~/.MacOSX/environment.plist
> 
> Except that, as of OS X 10.7 'Lion', this is now defunct, isn't it?
> 
> A pretty thorough treatment of the many ways to set envars may be found in this StackOverflow item:
> 
>  http://bit.ly/qUBCP4
> 
> 
> 
> -==-
> Jack Repenning
> Technologist
> CollabNet Cloud Services
> CollabNet, Inc.
> 8000 Marina Boulevard, Suite 600
> Brisbane, California 94005
> office: +1 650.228.2562
> twitter: http://twitter.com/jrep
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> _____________________________________________________________
> 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