我想學習一些Clojure,我試圖從Emacs運行REPL,但是我無法使其運行。在emacs中運行cider-jack-in
我已經創建了一個基本項目lein。我打開生成的文件在Emacs core.clj,當我嘗試從它運行REPL(通過運行蘋果酒玩偶),我剛剛得到的消息:
Symbol's function definition is void: nil
我已經切換調試上錯誤,以及回溯(最後幾行)是:
Debugger entered--Lisp error: (void-function nil)
nil(#<buffer core.clj>)
#[257 " !\203\207\300\207" [exclude predicate] 3 "\n\n(fn ELT)"](#<buffer core.clj>)
seq-map(#[257 " !\203\207\300\207" [exclude predicate] 3 "\n\n(fn ELT)"] (#<buffer core.clj> #<buffer *Minibuf-1*> #<buffer *Warnings*> #<buffer *GNU Emacs*> #<buffer *scratch*> #<buffer *Minibuf-0*> #<buffer *Messages*> #<buffer *code-conversion-work*> #<buffer *Echo Area 0*> #<buffer *Echo Area 1*>))
seq-filter(#[257 "r\211q\210\300\301!)\207" [derived-mode-p cider-repl-mode] 3 "\n\n(fn BUFFER)"] (#<buffer core.clj> #<buffer *Minibuf-1*> #<buffer *Warnings*> #<buffer *GNU Emacs*> #<buffer *scratch*> #<buffer *Minibuf-0*> #<buffer *Messages*> #<buffer *code-conversion-work*> #<buffer *Echo Area 0*> #<buffer *Echo Area 1*>))
cider-repl-buffers()
cider-find-reusable-repl-buffer(nil "~/Development/languages/clojure/playground/test1/")
cider-jack-in(nil)
當我運行在終端雷音運行,代碼運行正常。
此外,當我在終端運行雷音REPL,在REPL正確地與以下信息運行:
nREPL server started on port 62741 on host 127.0.0.1 - nrepl://127.0.0.1:62741
REPL-y 0.3.7, nREPL 0.2.12
Clojure 1.8.0
Java HotSpot(TM) 64-Bit Server VM 1.8.0_45-b14
雷音具有蘋果酒版本0.14.0,而Emacs的已下載版本0.15.0。
任何人都可以幫我弄清楚我錯過了哪些設置,或者我做錯了什麼?
感謝您的幫助!
編輯:婁是Emacs的初始化文件的內容,去掉註釋:
(require 'package)
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/packages/") t)
(add-to-list 'package-archives
'("tromey" . "http://tromey.com/elpa/") t)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
(package-initialize)
(when (not package-archive-contents)
(package-refresh-contents))
(defvar ido-cur-item nil)
(defvar ido-default-item nil)
(defvar ido-cur-list nil)
(defvar predicate nil)
(defvar inherit-input-method nil)
(defvar my-packages
'(paredit
clojure-mode
clojure-mode-extra-font-locking
cider
ido-ubiquitous
smex
projectile
rainbow-delimiters
tagedit
magit))
(if (eq system-type 'darwin)
(add-to-list 'my-packages 'exec-path-from-shell))
(dolist (p my-packages)
(when (not (package-installed-p p))
(package-install p)))
(add-to-list 'load-path "~/.emacs.d/vendor")
(add-to-list 'load-path "~/.emacs.d/customizations")
(load "shell-integration.el")
(load "navigation.el")
(load "ui.el")
(load "editing.el")
(load "misc.el")
(load "elisp-editing.el")
(load "setup-clojure.el")
(load "setup-js.el")
當你調用'cider-jack-in'時,你在新項目中打開了一個文件嗎?你在哪個版本的Emacs上? –
是的,我從項目('core.clj')打開文件,然後調用'cider-jack-in'。 我使用的Emacs版本24.5。 – Stanislav
你是如何安裝蘋果酒和clojure模式,即手工或梅爾帕?你在emacs init文件中有什麼? –