Browse Source

ob-clojure: respects "scalar" and "verbatim" results params

* lisp/ob-clojure.el (org-babel-execute:clojure): Respects "scalar"
  and "verbatim" results params.
Eric Schulte 9 years ago
parent
commit
52a14c5e2e
1 changed files with 8 additions and 3 deletions
  1. 8 3
      lisp/ob-clojure.el

+ 8 - 3
lisp/ob-clojure.el

@@ -78,11 +78,16 @@
   (require 'slime) (require 'swank-clojure)
   (with-temp-buffer
     (insert (org-babel-expand-body:clojure body params))
-    ((lambda (result) (condition-case nil (org-babel-script-escape result)
-		   (error result)))
+    ((lambda (result)
+       (let ((result-params (cdr (assoc :result-params params))))
+	 (if (or (member "scalar" result-params)
+		 (member "verbatim" result-params))
+	     result
+	   (condition-case nil (org-babel-script-escape 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)