Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 ( 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?

share|improve this question
Enter your finding as an answer. In 48 hours you can mark it as accepted. – Dennis Williamson Apr 13 '10 at 17:53
Thanks, did that now. – user9474 Apr 19 '10 at 2:16

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.

share|improve this answer
This does not work for me. What ended up working was putting it in a .MacOSX/environment.plist file, see my update. – user9474 Apr 13 '10 at 17:42

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.)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.