Fork me on GitHub
#emacs
<
2023-03-16
>
dakra11:03:00

I just pushed a change to org-mode ob-clojure that fixed the inconsistent :results behaviour (https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=6efb073463481ee572eb3bb1155cc3b0d6987df6) If you specify :results value (or nothing, as this is the default) you will get the last sexp as a result. With :results output, the return value is all of stdout. I also added support to use Clojure CLI as a backend and nbb is the default for ClojureScript source blocks if npx or nbb is installed. With bb, clojure-cli, npx nbb it makes it really easy to start using ob-clojure without setting up and starting cider. E.g.

#+begin_src clojurescript
#js {:foo "bar"}
#+end_src

#+RESULTS:
: #js {:foo "bar"}

#+BEGIN_SRC clojure
(= *file* (System/getProperty "babashka.file"))
#+END_SRC

#+RESULTS:
: true

#+BEGIN_SRC clojure :backend clojure-cli
(= *file* (System/getProperty "babashka.file"))
#+END_SRC

#+RESULTS:
: false
Please test if this breaks something for you. You can give feedback here on Slack or per mail :)

🎉 16
👍 2
César Olea15:03:42

This is awesome! will update over the weekend and try it out.