Re: Auto detect ob-clojure backend (was: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list)

2022-10-30 Thread Christopher M. Miles
Daniel Kraus writes: > Ihor Radchenko writes: > >> Daniel Kraus writes: >> >>> +(defcustom org-babel-clojure-backend (cond >>> + ((executable-find "bb") 'babashka) >>> + ((executable-find "nbb") 'nbb) >>> +

Re: Auto detect ob-clojure backend (was: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list)

2022-10-30 Thread Daniel Kraus
Tim Cross writes: > I think bb is a much better solution from a babel perspective and would > love to see it as the default, even when you have both bb and cider > installed. I just installed the patch. So if you have `bb` in your path, ob-clojure should use babashka as default and only fall

Re: Auto detect ob-clojure backend (was: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list)

2022-10-30 Thread Tim Cross
Daniel Kraus writes: > Ihor Radchenko writes: > >> Daniel Kraus writes: >> >>> +(defcustom org-babel-clojure-backend (cond >>> + ((executable-find "bb") 'babashka) >>> + ((executable-find "nbb") 'nbb) >>> +

Re: Auto detect ob-clojure backend (was: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list)

2022-10-30 Thread Ihor Radchenko
Daniel Kraus writes: >> What if users have, say, cider installed and also babashka executable? >> Will it be expected to use babashka? > > Yes. The only thing that makes me slightly hesitant is that e.g. > someone doesn't have `bb` installed. Executes clojure source blocks > which are then

Re: Auto detect ob-clojure backend (was: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list)

2022-10-30 Thread Daniel Kraus
Ihor Radchenko writes: > Daniel Kraus writes: > >> +(defcustom org-babel-clojure-backend (cond >> + ((executable-find "bb") 'babashka) >> + ((executable-find "nbb") 'nbb) >> +

Re: Auto detect ob-clojure backend (was: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list)

2022-10-30 Thread Ihor Radchenko
Daniel Kraus writes: > Bastien writes: > >> Daniel Kraus writes: >> >>> I think I'll go with the big `cond` above to auto-detect what's >>> installed. That's probably the best out-of-the-box experience. >> Indeed, thank you! > > I would push the attached patch. > +(defcustom

Auto detect ob-clojure backend (was: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list)

2022-10-30 Thread Daniel Kraus
Bastien writes: > Daniel Kraus writes: > >> I think I'll go with the big `cond` above to auto-detect what's >> installed. That's probably the best out-of-the-box experience. > Indeed, thank you! I would push the attached patch. I'm not sure about the `:package-version` keyword in defcustom. I

[CLOSED] Re: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list

2022-10-29 Thread Christopher M. Miles
Daniel Kraus writes: > Hi > > Ihor Radchenko writes: >> "Christopher M. Miles" writes: >>> Any review comments about this patch? >> I have sent the following comment shortly after your followup: > > I even made another post after that, suggesting that the if condition > is not even needed.

Re: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list

2022-10-29 Thread Daniel Kraus
Hi Ihor Radchenko writes: > "Christopher M. Miles" writes: >> Any review comments about this patch? > I have sent the following comment shortly after your followup: I even made another post after that, suggesting that the if condition is not even needed. Simply always quoting seems to work and

Re: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list

2022-10-29 Thread Bastien
Daniel Kraus writes: > I think I'll go with the big `cond` above to auto-detect what's > installed. That's probably the best out-of-the-box experience. Indeed, thank you! -- Bastien

Re: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list

2022-10-28 Thread Ihor Radchenko
"Christopher M. Miles" writes: > Any review comments about this patch? I have sent the following comment shortly after your followup: "Christopher M. Miles" writes: > + ;; variable's value is a list from org-mode passed table > or list. > +(if (listp (cdr

Re: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list

2022-10-28 Thread Christopher M. Miles
Any review comments about this patch? "Christopher M. Miles" writes: > [[PGP Signed Part:Undecided]] > > I bellowing example: > > #+begin_src org > ,#+NAME: ob-clojure-table-test > | a | b | c | > |---+---+---| > | 1 | 2 | 3 | > > ,#+NAME: ob-clojure-table-test-2 > | a | b | c | >

Re: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list

2022-10-28 Thread Daniel Kraus
Bastien writes: > Daniel Kraus writes: >> I would set it to (and (executable-find "bb") 'babashka) so it's still nil >> when babashka is installed? > (You mean "not installed", right?) Of course. >> Or we could even test more available backends like >> >> (cond >> ((executable-find "bb")

Re: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list

2022-10-28 Thread Bastien
Hi Daniel, Daniel Kraus writes: > I would set it to (and (executable-find "bb") 'babashka) so it's still nil > when babashka is installed? (You mean "not installed", right?) > Or we could even test more available backends like > > (cond > ((executable-find "bb") 'babashka) >

Re: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list

2022-10-28 Thread Daniel Kraus
Hi! Bastien Guerry writes: > For now `org-babel-clojure-backend' is nil. > > I suggest to set it to babashka by default: babashka is stable and > well established now, it is by far the most efficient way to run > Clojure code. Also, it is particularily suitable for Babel use. > > What do you

Re: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list

2022-10-28 Thread Bastien Guerry
Hi Daniel, Daniel Kraus writes: > Just in case you want to play around with Clojure, installing > babashka (https://github.com/babashka/babashka) is a single binary > and very simple to install. For now `org-babel-clojure-backend' is nil. I suggest to set it to babashka by default: babashka

Re: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list

2022-10-27 Thread Ihor Radchenko
Daniel Kraus writes: > Just in case you want to play around with Clojure, installing babashka > (https://github.com/babashka/babashka) is a single binary and very simple to > install. Thanks! > Subject: [PATCH] lisp/ob-clojure.el: Fix header argument :var binding > > * lisp/ob-clojure.el

Re: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list

2022-10-27 Thread Daniel Kraus
Hi! Ihor Radchenko writes: > "Christopher M. Miles" writes: >> Without this patch, it will report error "class >> java.lang.ClassCastException" from CIDER. > > Bastien, could you please take a look? I was unable to setup clojure dev > environment on my machine for testing. So, I am not able

Re: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list

2022-10-26 Thread Ihor Radchenko
"Christopher M. Miles" writes: > I bellowing example: > > #+begin_src org > ,#+NAME: ob-clojure-table-test > | a | b | c | > |---+---+---| > | 1 | 2 | 3 | > > ,#+NAME: ob-clojure-table-test-2 > | a | b | c | > |---+---+---| > | 1 | 2 | 3 | > > ,#+begin_src clojure :var kk=ob-clojure-table-test

Re: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list

2022-09-18 Thread Christopher M. Miles
Ping Bastien Guerry. "Christopher M. Miles" writes: > [[PGP Signed Part:Undecided]] > > I bellowing example: > > #+begin_src org > ,#+NAME: ob-clojure-table-test > | a | b | c | > |---+---+---| > | 1 | 2 | 3 | > > ,#+NAME: ob-clojure-table-test-2 > | a | b | c | > |---+---+---| > | 1 | 2 | 3 |

[PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list

2022-04-09 Thread Christopher M. Miles
I bellowing example: #+begin_src org ,#+NAME: ob-clojure-table-test | a | b | c | |---+---+---| | 1 | 2 | 3 | ,#+NAME: ob-clojure-table-test-2 | a | b | c | |---+---+---| | 1 | 2 | 3 | ,#+begin_src clojure :var kk=ob-clojure-table-test :var kk2=ob-clojure-table-test-2 :results output (println