On Friday, 9 August 2019 11:52:32 UTC+1, Johannes wrote:
>
> I posted the problem there.
>
Not a great response so far, I see!
I had another little play and it may be possible to solve by a small change
to ob-clojure.el. Basically we just wrap the forms and the ns into a single
(do ...) form.
$ diff --unified ~/.emacs.d/elpa/org-9.2.5/ob-clojure.el ~/ob-clojure.el
--- /home/peter/.emacs.d/elpa/org-9.2.5/ob-clojure.el 2019-08-12 12:22:
52.323068180 +0100
+++ /home/peter/ob-clojure.el 2019-08-12 12:21:00.647317946 +0100
@@ -101,7 +101,7 @@
(print-length nil)
(body
(org-trim
- (format "(ns %s)\n%s"
+ (format "(do (ns %s)\n%s)"
;; Source block specified namespace :ns.
ns
;; Variables binding.
@@ -115,7 +115,7 @@
body))))))
(if (or (member "code" result-params)
(member "pp" result-params))
- (format "(clojure.pprint/pprint (do %s))" body)
+ (format "(clojure.pprint/pprint %s)" body)
body)))
(defun org-babel-execute:clojure (body params)
However I have not really used this feature before so may be missing
something.
Maybe you could give it a try and see if it helps?
Pete
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/clojure/69a1302c-e960-41ca-a52b-6b8ce86b6575%40googlegroups.com.