The attached patch is a simple fix for the problem with ob-clojure using an
incorrect cider-current-session call instead of cider-current-ns. For
background on the issue see
https://emacs.stackexchange.com/questions/30857/clojure-code-evaluation-in-org-mode-produces-no-output/31169#31169


Not 100% convinced that the optional namespace argument should even be
included - it really doesn't seem to do anything. However, leaving it in
seemed like the minimal change needed.  Have tested it and at least I now
get data back from evaluation of clojure code blocks where previously, you
only got the message "block processed with no output".

-- 
regards,

Tim

--
Tim Cross
---
 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

Reply via email to