[英]Mac OSX, Emacs 24.2 and nrepl.el not working
我正在使用nrepl.el , Emacs 24.2 。 我的SO版本是OS X Lion 10.7.5。
通過lein (:~ $ lein repl)
啟動REPL會話后運行命令[Mx] nrepl
我能夠連接到它但是如果我嘗試使用[Mx] nrepl-jack-in
我得到下面的消息:
進程中的錯誤sentinel:無法啟動nREPL服務器:/ bin / bash:lein:找不到命令
我使用主站點中的說明安裝了leiningen ,並使用命令brew install leiningen --devel
使用自制程序重新安裝它,但這兩種方法都給出了同樣的錯誤。
將路徑/usr/loca/bin
到emacs exec-path
列表或嘗試配置nrepl.el
變量nrepl-lein-command
指向我的lein安裝的完整路徑沒有幫助。
我的emacs配置可以在這里找到: https : //github.com/khaoz/emacs-files
我做錯了什么?
謝謝 :)
對於那些在這個問題上登陸使用Mac的人:
lein需要走在Emacs所看到的道路上。 這可以通過從bash啟動Emacs來完成
/Applications/Emacs.app/Contents/MacOS/Emacs project.clj
然后: Mx nrepl-jack-in
如果這樣可以解決問題,您可以按照這些說明配置emacs以使用正確的路徑
雖然@Arthur是正確的,但更簡單的解決方案是安裝exec-path-from-shell Emacs擴展。 它會自動且相當可靠地將您的shell PATH
(和MANPATH
)復制到Emacs。 這意味着無論你從哪里開始使用Emacs(包括聚光燈), PATH
都是正確的。
如果您在Linux中看到此錯誤,則可能需要在從菜單而不是shell運行emacs時將〜/ .bash_profile而不是〜/ .bashrc設置為PATH。
我不得不這樣做:
;; set the path as terminal path [http://lists.gnu.org/archive/html/help-gnu-emacs/2011-10/msg00237.html]
(setq explicit-bash-args (list "--login" "-i"))
;; fix the PATH variable for GUI [http://clojure-doc.org/articles/tutorials/emacs.html#osx]
(defun set-exec-path-from-shell-PATH ()
(let ((path-from-shell
(shell-command-to-string "$SHELL -i -l -c 'echo $PATH'")))
(setenv "PATH" path-from-shell)
(setq exec-path (split-string path-from-shell path-separator))))
(when window-system (set-exec-path-from-shell-PATH))
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.