Browse Source

ob-clojure: more robust reading of results

* lisp/ob-clojure.el (org-babel-execute:clojure): If results are not
  readable by lisp, then return them as a string.
Eric Schulte 14 năm trước cách đây
mục cha
commit
4a8640d0cf
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      lisp/ob-clojure.el

+ 2 - 2
lisp/ob-clojure.el

@@ -75,10 +75,10 @@
   (require 'slime) (require 'swank-clojure)
   (with-temp-buffer
     (insert (org-babel-expand-body:clojure body params))
-    (read
+    ((lambda (result) (condition-case nil (read result) (error result)))
      (slime-eval
       `(swank:interactive-eval-region
-        ,(buffer-substring-no-properties (point-min) (point-max)))
+	,(buffer-substring-no-properties (point-min) (point-max)))
       (cdr (assoc :package params))))))
 
 (provide 'ob-clojure)