无法在Emacs中启动`lein` REPL [英] Can't launch `lein` REPL in Emacs
问题描述
在Emacs中,当使用 clojure-mode
时,我应该能够使用 Cc Cz
。每当我尝试,我得到的错误:
搜索程序:没有这样的文件或目录:lein
/
usr / local / bin
(通过 brew
)和 / usr / local / bin
在我的 PATH
(即使Emacs说,通过 eval-expression(getenvPATH)
)。 >
我缺少什么?
解决方案 PATH
环境变量不是所有的和所有的emacs搜索路径。还有exec-path。显然,大部分是相同的,但不完全一致。
无论如何,添加:
(add-to-list'exec-path/ usr / local / bin)
到我的 .emacs.d / init.el
code> .emacs
如果这是你的滚动)清理了我的东西。上面链接的文档提供了更全面的内容,例如: (setenvPATH(concat(getenvPATH) :/ usr / local / bin))
(setq exec-path(append exec-path'(/ usr / local / bin)))
/ pre>
我首先尝试(更简单) add-to-list
但是YMMV。
In Emacs, when using clojure-mode
, I ought to be able to launch a REPL with C-c C-z
. Whenever I try, though, I get the error:
Searching for program: no such file or directory: lein
I have lein
installed in /usr/local/bin
(via brew
) and /usr/local/bin
is in my PATH
(even Emacs says so, via eval-expression (getenv "PATH")
).
What am I missing?
解决方案 Ah! The PATH
environment variable isn't the end-all and be-all of emacs search paths. There's also the "exec-path". It apparently does mostly the same thing but not exactly.
Anyway, adding:
(add-to-list 'exec-path "/usr/local/bin")
To my .emacs.d/init.el
(or .emacs
if that's how you roll) cleared things up for me. The doc linked above suggests something a little more comprehensive, like:
(setenv "PATH" (concat (getenv "PATH") ":/usr/local/bin"))
(setq exec-path (append exec-path '("/usr/local/bin")))
I'd try the (simpler) add-to-list
, first. But YMMV.
这篇关于无法在Emacs中启动`lein` REPL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!