branch: externals/org
commit a51cf1cc6b96ec9668d2111144985ea7fbc04210
Author: Daniel Kraus <[email protected]>
Commit: Daniel Kraus <[email protected]>
ob-clojure.el: Fix bug with inline comments
* lisp/ob-clojure.el (ob-clojure-eval-with-cider): Filter out
nil values from cider evaluation.
---
lisp/ob-clojure.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lisp/ob-clojure.el b/lisp/ob-clojure.el
index 4c7016927a..5654d52084 100644
--- a/lisp/ob-clojure.el
+++ b/lisp/ob-clojure.el
@@ -239,8 +239,10 @@ or set the `:backend' header argument"))))
"value")))
result0)))
(ob-clojure-string-or-list
+ ;; Filter out s-expressions that return `nil' (string "nil"
+ ;; from nrepl eval) or comment forms (actual `nil' from nrepl)
(reverse (delete "" (mapcar (lambda (r)
- (replace-regexp-in-string "nil" "" r))
+ (replace-regexp-in-string "nil" "" (or r
"")))
result0)))))))
(defun ob-clojure-eval-with-slime (expanded params)