Fork me on GitHub
#emacs
<
2017-09-15
>
agigao16:09:20

Hey guys, how can I use leiningen in eshell? - lein: command not found

dpsutton16:09:00

i think its because its not on the exec-path. I think you can do (add-to-list exec-path "~/bin/lein").

dpsutton16:09:17

that's probably not the syntax or commands but that's the gist of what you want, @chokheli

agigao16:09:26

@dpsutton All right, thanks!

dpsutton16:09:35

did that solve it for you?

dpsutton16:09:05

i think its path related. an easier thing might be to make sure that lein is on your path and emacs is seeing that path.

mgrbyte18:09:19

I use this (from melpa), ensures Emacs env matches your shell

gonewest81820:09:28

This works for me:

(add-to-list 'exec-path "/usr/local/bin")
(setenv "PATH" (mapconcat 'identity exec-path ":"))

gonewest81820:09:49

I needed the second line for eshell.

gonewest81821:09:15

and I suppose I should say mine is the reverse of “exec-path-from-shell”, in that this just initializes the shell’s path from exec-path.