From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id yPHpASTdWGMXDQEAbAwnHQ (envelope-from ) for ; Wed, 26 Oct 2022 09:09:24 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id +FgcASTdWGP53gAAG6o9tA (envelope-from ) for ; Wed, 26 Oct 2022 09:09:24 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C7D2039E80 for ; Wed, 26 Oct 2022 09:09:23 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1onaWi-0004iY-UD; Wed, 26 Oct 2022 03:08:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1onaWf-0004iJ-C5 for emacs-orgmode@gnu.org; Wed, 26 Oct 2022 03:08:33 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1onaWb-0007US-Sc for emacs-orgmode@gnu.org; Wed, 26 Oct 2022 03:08:32 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 6B57E240028 for ; Wed, 26 Oct 2022 09:08:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1666768107; bh=fR4wJ91PXjssbyVCpv65U5glEMle62vam4XwuImC7uc=; h=From:To:Cc:Subject:Date:From; b=fRA0AfErwBuLC/Q2qRzdhfp/Pe+IFhxCjBAM98KVScLPP126TNzLQk9kby8eISzWW Fc8UbqjhurJsQ7IvpJ0CsJuC3vBvAsHjO6t6FLnHBxS2yUwAv3gtwsZGO7Me4h4nRL DO1Fkp4LW0lP+/IEIE6BXYVYNxT9YW89TSyVBJqWOLTkL8F/i3O18UrRwp+VwHI4+s 93dpgOpGYdQY1TQwDb/pezjM2Q4K/m3hLHYohoMBhcp1BL+r9gjBXNNpPt2ZlsRQl2 2leJfUVOXfYmNaHmpsPY6cc5XbeiE4BIUDtAxIDjiuOtC6G0PKMrHlE582siwxSM65 dXY4vKX4d3LLA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4My0Jp1QCgz6tm4; Wed, 26 Oct 2022 09:08:25 +0200 (CEST) From: Ihor Radchenko To: numbchild@gmail.com, Bastien Cc: Org Mode Subject: Re: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list In-Reply-To: <62520bbc.1c69fb81.d855b.549fSMTPIN_ADDED_BROKEN@mx.google.com> References: <62520bbc.1c69fb81.d855b.549fSMTPIN_ADDED_BROKEN@mx.google.com> Date: Wed, 26 Oct 2022 07:09:08 +0000 Message-ID: <87r0yvoycr.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Emacs-orgmode" Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1666768163; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=mEX/8BtCcj3uaL98IOnGkVxT1HFOjAwwwDyF+y0hI/4=; b=cjRrhKc3kIJf+33DGO++Talyh0PYmoHvTIhCAKBUy3mQplIBdYereJR2FzOxWGYuaDMyHj jkd7GJ4ky9GfPqWE9fT413aC1SIYbQWY98HLAujdAx8DW7kdCgI4bxtDCS9Xc13/DGgJrV hGm6yVSQy2ClxypI9Kbz26AFWmY/iThzC8g00p1CSNlVRiQVXTKy3acsHG5c8YZEIlozgI a0gYIWKwYhmG7XHyAx8TjtJRnQROOPKJfzFHwRiS6Iyow0sJwLANKKT+2p8ys79TTEoYv8 QYXAaL8vzlUz7PGu84nGRrZqvvwfVA99VKfb/+bFH5AGwqYp1/66Fmu18A63Wg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666768163; a=rsa-sha256; cv=none; b=RT0Q3Sxe6rrCcAtuLK0xAwhv8Z+7cF+NJ1pGi5L9HuYa0p3fZoe47stV6Xph7wvJJDpdsI jit0fyipTqfv9MRaKOFTAcxDIyp0hVQSB+c/NFv9MFq2e2mzdMc+zArHSL0254shnRukbv yzUDEMU4GlIfmlt24xpySq4g6jIiWorRuLPvJUwjiVqwLjcsUdPrzYqqSwf1YQO7D6cjez HeiIXyUflQ6tQb9pFtEyCBSnZSYEmHw2i7ewCMlN11Lk/ppWmrPGaFEhwXX04/VqWCGpNw rxoDErVywcqveN4fEmdo2TsDmqKXAoAJL5TX7hOCyLXUNYkNH2F5tKVWwpZLWw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=fRA0AfEr; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.21 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=fRA0AfEr; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: C7D2039E80 X-Spam-Score: -4.21 X-Migadu-Scanner: scn0.migadu.com X-TUID: t01YTfVcIFww "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 :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 . Support Org development at , or support my work at