GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
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.
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.
(shell-command-to-string "echo $PATH")
If you have lein under PATH and it works in the terminal, there should be no need to use setenv.
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.
Max customize-apropos PATH [ret]
Evaluating in a scratch buffer gives the wrong $PATH. I fixed it by doing
(setenv "PATH" (shell-command-to-string "source ~/.bashrc; echo $PATH"))
.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.