[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Fix ob-clojure handling source block variable's value is a o
From: |
Ihor Radchenko |
Subject: |
Re: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list |
Date: |
Wed, 26 Oct 2022 07:09:08 +0000 |
"Christopher M. Miles" <numbchild@gmail.com> 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 :var
> kk2=ob-clojure-table-test-2 :results output
> (println kk2)
> (println kk)
> ,#+end_src
>
> #+end_src
>
> 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 to confirm if
the issue exists.
> ;; Variables binding.
> (if (null vars) (org-trim body)
> - (format "(let [%s]\n%s)"
> - (mapconcat
> - (lambda (var)
> - (format "%S %S" (car var) (cdr var)))
> - vars
> - "\n ")
> - body))))))
> + ;; variable's value is a list from org-mode passed table
> or list.
> + (if (listp (cdr (car vars)))
This test is fishy. It only tests for the first variable assignment.
What if you have multiple vars some being tables and some not?
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
- Re: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list,
Ihor Radchenko <=
- Re: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list, Daniel Kraus, 2022/10/27
- Re: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list, Ihor Radchenko, 2022/10/27
- Re: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list, Bastien Guerry, 2022/10/28
- Re: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list, Daniel Kraus, 2022/10/28
- Re: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list, Bastien, 2022/10/28
- Re: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list, Daniel Kraus, 2022/10/28
- Re: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list, Bastien, 2022/10/29
- Auto detect ob-clojure backend (was: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list), Daniel Kraus, 2022/10/30
- Re: Auto detect ob-clojure backend (was: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list), Ihor Radchenko, 2022/10/30
- Re: Auto detect ob-clojure backend (was: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list), Daniel Kraus, 2022/10/30