From c7ed6cde3aa115b7c262d0d9d3938392c4c63499 Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Fri, 29 Apr 2011 08:26:01 -0600 Subject: [PATCH] ob-clojure: qualify pp dispatch functions, wrap body in (do ) Patch by Eric S Fraga * lisp/ob-clojure.el (org-babel-expand-body:clojure): Qualify pp dispatch functions, wrap body in `(do )'. --- lisp/ob-clojure.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lisp/ob-clojure.el b/lisp/ob-clojure.el index 3c11b7228..cc6c2de56 100644 --- a/lisp/ob-clojure.el +++ b/lisp/ob-clojure.el @@ -63,11 +63,13 @@ body)))) (if (or (member "code" result-params) (member "pp" result-params)) - (format (concat "(let [org-mode-print-catcher (java.io.StringWriter.)]" - "(clojure.pprint/with-pprint-dispatch %s-dispatch" - "(clojure.pprint/pprint %s org-mode-print-catcher)" - "(str org-mode-print-catcher)))") - (if (member "code" result-params) "code" "simple") body) + (format + (concat + "(let [org-mode-print-catcher (java.io.StringWriter.)] " + "(clojure.pprint/with-pprint-dispatch clojure.pprint/%s-dispatch " + "(clojure.pprint/pprint (do %s) org-mode-print-catcher) " + "(str org-mode-print-catcher)))") + (if (member "code" result-params) "code" "simple") body) body))) (defun org-babel-execute:clojure (body params) -- 2.11.4.GIT