[英]Org-Babel Clojure Cider NRepl broken?
I followed the instructions here and wrote the following org-mode file: 我按照此处的说明进行操作,并编写了以下组织模式文件:
#+BEGIN_SRC emacs-lisp
(princ (concat (format "Emacs version:\n%s\n" (emacs-version))
(format "\norg version: %s\n" (org-version))))
#+END_SRC
#+RESULTS:
: Emacs version:
: GNU Emacs 25.1.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version 10.9.5 (Build 13F1911))
: of 2016-09-17
:
: org version: 9.0.5
#+BEGIN_SRC clojure :results value
(* 6 7)
#+END_SRC
#+RESULTS:
* COMMENT org babel settings
Local variables:
org-confirm-babel-evaluate: nil
End:
As you can see, the evaluation of the emacs-lisp block works and produces the expected output. 如您所见,对emacs-lisp块的评估有效并产生了预期的输出。 Incidentally, it also reports the versions of things I'm using.
顺便说一句,它还会报告我正在使用的事物的版本。 However, the clojure source block, when evaluated, leaves
但是,clojure源块在评估时会离开
Code block returned no value.
I tried many different Clojure expressions in the code block, such as println
s and more. 我在代码块中尝试了许多不同的Clojure表达式,例如
println
和更多。 Nothing shows up in the NREPL window, and the results in org mode are always the same: the message above in the minibuffer. NREPL窗口中什么也没有显示,并且组织模式下的结果始终相同:上面的消息在微型缓冲区中。
in the emacs minibuffer. 在emacs minibuffer中。 Here are the specific steps I took:
这是我采取的具体步骤:
$ lein new clojure-example
$ cd clojure-example
$ emacs clojure.example.org
cider-jack-in
cider-jack-in
That produces a repl window with the following version info: 这将产生一个带有以下版本信息的repl窗口:
;; Connected to nREPL server - nrepl://localhost:52695 ;; CIDER 0.15.0snapshot (package: 20170403.402), nREPL 0.2.12 ;; Clojure 1.8.0, Java 1.8.0_121
etc. 等等
Cc Cc
, which is bound to org-babel-execute-src-block
Cc Cc
,它已绑定到org-babel-execute-src-block
Prior to that, I inserted the following code in my emacs initialization file: 在此之前,我在emacs初始化文件中插入了以下代码:
(require 'org)
(require 'ob-clojure)
(org-babel-do-load-languages
'org-babel-load-languages
'( (clojure . t)
(emacs-lisp . t)
))
(setq org-babel-clojure-backend 'cider)
(require 'cider)
According to the cited instructions. 根据引用的说明。
I'd be grateful for any help. 我将不胜感激。
Yes, in the current stable release (9.0.5), the org-mode clojure backend is broken and does not work. 是的,在当前的稳定版本(9.0.5)中,组织模式clojure后端损坏并且无法正常工作。 I submitted a patch which has been applied and I expect will be in the next release.
我提交了已应用的补丁,我希望它将在下一个版本中发布。
See https://emacs.stackexchange.com/questions/30857/clojure-code-evaluation-in-org-mode-produces-no-output/31169#31169 参见https://emacs.stackexchange.com/questions/30857/clojure-code-evaluation-in-org-mode-produces-no-output/31169#31169
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.