Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Emacs doesn't respect $PATH on OSX #132

Closed
honza opened this Issue · 4 comments

3 participants

@honza

Yes, it's in the README but the suggested fix doesn't work.

(setenv "PATH" (shell-command-to-string "echo $PATH"))

I'm not really sure how I can help you debug it. Let me know what you need.

@michaelklishin

Evaluate (shell-command-to-string "echo $PATH") in the scratch buffer or via M-x eval-expression, then make sure it is the PATH you expect.

If you have lein under PATH and it works in the terminal, there should be no need to use setenv.

@michaelklishin

Another way to set up PATH is to Max customize-apropos PATH [ret]. Then find find exec path and Swank path there. However, in my case they do not include ~/bin, which is where lein is located. This has been the case for over 1 year, with 2 Emacs versions, several Leiningen versions and lein-swank plugin updates.

@honza

Evaluating in a scratch buffer gives the wrong $PATH. I fixed it by doing

(setenv "PATH" (shell-command-to-string "source ~/.bashrc; echo $PATH"))
@honza honza closed this
@technomancy
Owner

.bashrc is not the right place to customize your $PATH, but if you got it working that's good. Settings that are shell-agnostic go in .profile instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.