Nice work, I did some testing here...
* Comment: Should babashka be added as an option for custom?
(defcustom org-babel-clojure-backend nil
"Backend used to evaluate Clojure code blocks."
:group 'org-babel
:type '(choice
(const :tag "inf-clojure" inf-clojure)
(const :tag "cider" cider)
(const :tag "slime" slime)
(const :tag "Not configured yet" nil)))
* I wonder if there’s something wrong here?
... Inside ‘ob-clojure-eval-with-cider’
(push (or (nrepl-dict-get response "root-ex")
(nrepl-dict-get response "ex")
(nrepl-dict-get
response (if (or (member "output" result-params)
(member "pp" result-params))
"out"
"value")))
result0)
That didn’t work for me, using an instance of Cider *connected to
babashka*. But it did work when I swapped "value" and "out"!
- Testing code and inspecting with edebug:
#+begin_src clojure :backend cider :results output
(range 10)
#+end_src
* Lastly, the documentation and implementation have drifted apart...?
https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-clojure.html
Ag Ibragimov writes:
Hi everyone, here's my attempt to add clojure CLI and babashka support
for ob-clojure.el
- Adds a header parameter to override org-babel-clojure-backend
- Adds :args param (right now only used for clojure-cli)
I have tested it with these minimal cases:
#+begin_src clojure :backend clj-cli :args "-Sdeps '{:deps {inflections
{:mvn/version \"0.13.2\"}}}'"
(use 'inflections.core)
(plural "word")
#+end_src
#+begin_src clojure :backend babashka :results output
(range 10)
#+end_src
Please let me know what you think. Any advice is appreciated, since I
have never contributed before. Thank you.