I'm seeing he same issue. In a little digging, I think I've identified the
problem. However, not sure who this should be reported to.
The problem is in the org-babel-execute:clojure function. This function has the
following bit of code
(setq result
(nrepl-dict-get
(nrepl-sync-request:eval
expanded (cider-current-connection) (cider-current-session))
(if (or (member "output" result-params)
(member "pp" result-params))
"out"
"value")))
The problem is in the call to nrepl-sync-request:eval. The documentation states
for this function
(nrepl-sync-request:eval INPUT CONNECTION &optional NS)
Send the INPUT to the nREPL server synchronously.
The request is dispatched via CONNECTION.
If NS is non-nil, include it in the request.
Note the last optional argument NS. This is supposed to be a clojure
namespace. However, the org-babel-execute:clojure function is calling this
function with the output from cider-current-session, which returns a unique ID
representing the current session. As a result, the call is returning a data structure with an error and no output (perhaps some error handling is required). The returned result is
(dict status (namespace-not-found done error done state state) id 17 session 43e9fd6c-82ed-49fe-9624-0cfc6f56f8b1 changed-namespaces (dict) repl-type cljclj)
Note the namespace-not-found
Either the argument should be a call to (cider-current-ns) or perhaps it should
just be left out as I don't see how you can pass the namespace as part of the
block evaluation.
EDIT: here is a simple patch which appears to fix the problem. Generated against current head of org git repo
---
lisp/ob-clojure.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lisp/ob-clojure.el b/lisp/ob-clojure.el
index d407105..e542a29 100644
--- a/lisp/ob-clojure.el
+++ b/lisp/ob-clojure.el
@@ -44,6 +44,7 @@
(declare-function cider-current-connection "ext:cider-client" (&optional type))
(declare-function cider-current-session "ext:cider-client" ())
+(declare-function cider-current-ns "ext:cider-client" ())
(declare-function nrepl--merge "ext:nrepl-client" (dict1 dict2))
(declare-function nrepl-dict-get "ext:nrepl-client" (dict key))
(declare-function nrepl-dict-put "ext:nrepl-client" (dict key value))
@@ -118,7 +119,7 @@ using the :show-process parameter."
org-babel-clojure-sync-nrepl-timeout))
(nrepl-sync-request:eval expanded
(cider-current-connection)
- (cider-current-session))))
+ (cider-current-ns))))
(setq result
(concat
(nrepl-dict-get response
@@ -153,7 +154,7 @@ using the :show-process parameter."
;; Update the status of the nREPL output session.
(setq status (nrepl-dict-get response "status")))
(cider-current-connection)
- (cider-current-session))
+ (cider-current-ns))
;; Wait until the nREPL code finished to be processed.
(while (not (member "done" status))
--
2.7.4
Also sent the patch to the emacs-orgmode list