[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: patch: ob-clojure improvements

From: joseph . corneli . orgmode
Subject: Re: patch: ob-clojure improvements
Date: Fri, 09 Oct 2020 22:17:39 +0100

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")
                     response (if (or (member "output" result-params)
                                      (member "pp" result-params))

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)

* Lastly, the documentation and implementation have drifted apart...?


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")

#+begin_src clojure :backend babashka :results output
  (range 10)

Please let me know what you think. Any advice is appreciated, since I have never contributed before. Thank you.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]