[OS X Emacs] where does Mac OS X set default PATH for bash?

David Reitter david.reitter at gmail.com
Fri Nov 14 14:49:17 EST 2008


Art,

open a login shell, i.e. just Terminal.app (or iTerm or so).
Do "echo $PATH".

This is what is imported into Aquamacs, in addition to what is  
inherited by Aquamacs in the first place.

If you want to see the code that does this, look at `mac-read- 
environment-vars-from-shell' and `mac-read-environment-vars-from- 
shell-2'.

Hope that helps.   We don't add "." to the PATH, or anything crazy  
like that.  I think we may add some paths in auctex-config.el to  
facilitate LaTeX use.  If there is a bug / annoyance hidden somewhere,  
let us know!

Best
- David

--
http://aquamacs.org -- Aquamacs: Emacs on Mac OS X
http://aquamacs.org/donate -- Could we help you? Return the favor and  
support the Aquamacs Project!





On 14 Nov 2008, at 14:15, Art Werschulz wrote:

> Hi.
>
> This is maybe off-topic, but there is a trace of Emcas-ness in what  
> follows.
>
> I am using bash on my Mac OS X (Leopard) box.  My PATH is as follows  
> (slightly reformatted for readability);
> 	/usr/local/texlive/2008/bin/universal-darwin
> 	.
> 	/Applications/Emacs.app/Contents/MacOS/bin
> 	/usr/local/texlive/2007/bin/i386-darwin
> 	/sw/bin
> 	/sw/sbin
> 	/usr/libexec
> 	/Developer/Tools
> 	/usr/local/bin
> 	/usr/local/sbin
> 	/bin
> 	/sbin
> 	/usr/bin
> 	/usr/sbin
> 	/usr/X11R6/bin
> 	/usr/X11/bin
> 	.
>
> I am not crazy about this, for several reasons.  Having a dot  
> (current directory) so high in the list is Bad News from a security  
> viewpoint.  The Emacs.app application doesn't exist on my machine  
> anymore.  I don't want to search /usr/local/texlive/2007, since I'm  
> using the 2008 version of TeXLive.
>
> You may wonder how I'm setting my PATH.  Here's how (i.e., here's  
> the relevant part of .bashrc):
> 	TeX=/usr/local/texlive/2008
> 	(echo $PATH | grep -q /usr/local/sbin) || PATH=/usr/local/sbin:$PATH
> 	(echo $PATH | grep -q /usr/local/bin) || PATH=/usr/local/bin:$PATH
> 	PATH=$TeX/bin/universal-darwin:$PATH
> 	export PATH=${PATH}:.
> So from the looks of things, the default PATH must consist of
> 	.
> 	/Applications/Emacs.app/Contents/MacOS/bin
> 	/usr/local/texlive/2007/bin/i386-darwin
> 	/sw/bin
> 	/sw/sbin
> 	/usr/libexec
> 	/Developer/Tools
> 	/usr/local/bin
> 	/usr/local/sbin
> 	/bin
> 	/sbin
> 	/usr/bin
> 	/usr/sbin
> 	/usr/X11R6/bin
> 	/usr/X11/bin
>
> Since I want to change this, I need to know where this default is  
> set.  Any ideas?
>
> Thanks.
>
> Art Werschulz
> 207 Stoughton Avenue, Cranford  NJ 07016-2838
> (908) 272-1146
>
>
> _____________________________________________________________
> 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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2193 bytes
Desc: not available
URL: <http://email.esm.psu.edu/pipermail/macosx-emacs/attachments/20081114/b75d8385/attachment.p7s>


More information about the MacOSX-Emacs mailing list