Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

For instance, suppose I want to modify my PATH variable in my .emacs file. What is the best way to do this? Should I call setenv? Is there a variable I can customize? Should I call a shell script

share|improve this question
up vote 2 down vote accepted

You got it right:

(setenv "PATH" "some;/path/that/you/want;/really/this/is/the/path")

The bigger question is, why do you want the path to be different just inside Emacs? Is it to tell Emacs to find the appropriate applications for ispell or shell? There are more straight forward ways to solve those problems.

share|improve this answer
    
I actually want to control which Python pymacs runs under. It would really be cool to be able to run a virtualenv for that. – Jason Baker Nov 17 '09 at 14:46
    
One thing to note: in the above example, PATH should be in double quotes. – Jason Baker Nov 17 '09 at 15:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .