all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: numbchild@gmail.com, Bastien <bzg@gnu.org>
Cc: Org Mode <emacs-orgmode@gnu.org>
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	[thread overview]
Message-ID: <87r0yvoycr.fsf@localhost> (raw)
In-Reply-To: <62520bbc.1c69fb81.d855b.549fSMTPIN_ADDED_BROKEN@mx.google.com>

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


       reply	other threads:[~2022-10-26  7:09 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <62520bbc.1c69fb81.d855b.549fSMTPIN_ADDED_BROKEN@mx.google.com>
2022-10-26  7:09 ` Ihor Radchenko [this message]
2022-10-27 14:09   ` [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list Daniel Kraus
2022-10-28  3:56     ` Ihor Radchenko
2022-10-28  8:51     ` Bastien Guerry
2022-10-28  9:09       ` Daniel Kraus
2022-10-28 10:22         ` Bastien
2022-10-28 21:09           ` Daniel Kraus
2022-10-29  8:08             ` Bastien
2022-10-30 11:21               ` 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 12:02                 ` Ihor Radchenko
2022-10-30 12:48                   ` Daniel Kraus
2022-10-30 13:25                     ` Ihor Radchenko
2022-10-30 14:12                       ` Auto detect ob-clojure backend Bastien Guerry
2022-10-30 20:04                     ` Auto detect ob-clojure backend (was: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list) Tim Cross
2022-10-30 20:26                       ` Daniel Kraus
2022-10-31  1:31                     ` Christopher M. Miles
     [not found] <m2lewez8zh.fsf@numbchild>
2022-09-19  4:23 ` [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list Christopher M. Miles
2022-10-29  4:19 ` Christopher M. Miles
2022-10-29  5:56   ` Ihor Radchenko
2022-10-29 11:18     ` Daniel Kraus
2022-04-09 13:19 Christopher M. Miles

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r0yvoycr.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=numbchild@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.