I need to add a directory to my PATH variable on Mac OS.
I added it in .bash_profile
and .profile
, and that works for the terminal.
But Emacs (http://emacsformacosx.com) still does not use the new PATH variable. (I'm trying to run latex from emacs, but it's not finding the command in my /usr/local/bin
, which I'm trying to add to the PATH ...)
I even logged out and back in, but still no luck.
Any suggestions?
The "correct" way to add search paths on OSX is to add a file to
/etc/paths.d/
.Create a file called
/etc/paths.d/local
and put/usr/local/bin
inside it.I'm not certain that Emacs-for-OSX will pick it up from here, but it should.
The suggestion given here works:
Add it to a
.MacOSX/environment.plist
file in the prescribed XML format, and Emacs will work fine.(Found this myself eventually.)