From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SCM0ONYLUmKwJQEAgWs5BA (envelope-from ) for ; Sun, 10 Apr 2022 00:42:30 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 4OHLMNYLUmK28gAAG6o9tA (envelope-from ) for ; Sun, 10 Apr 2022 00:42:30 +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 2DFE43C83B for ; Sun, 10 Apr 2022 00:42:30 +0200 (CEST) Received: from localhost ([::1]:40816 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ndJmm-0005MG-TL for larch@yhetil.org; Sat, 09 Apr 2022 18:42:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50454) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ndJmK-0005Ly-96 for emacs-orgmode@gnu.org; Sat, 09 Apr 2022 18:42:00 -0400 Received: from [39.171.214.116] (port=11351 helo=Mac-mini.local) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ndJmI-0004VB-8Z for emacs-orgmode@gnu.org; Sat, 09 Apr 2022 18:41:59 -0400 Received: by Mac-mini.local (Postfix, from userid 501) id 3B6AE45B4C03; Sun, 10 Apr 2022 06:41:47 +0800 (CST) References: User-agent: mu4e 1.6.10; emacs 29.0.50 From: "Christopher M. Miles" To: Org Mode Subject: [PATCH] Updated patch, fixed data structure for table Date: Sun, 10 Apr 2022 06:40:31 +0800 In-reply-to: Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Host-Lookup-Failed: Reverse DNS lookup failed for 39.171.214.116 (deferred) Received-SPF: softfail client-ip=39.171.214.116; envelope-from=numbchild@gmail.com; helo=Mac-mini.local X-Spam_score_int: 58 X-Spam_score: 5.8 X-Spam_bar: +++++ X-Spam_report: (5.8 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FROM=0.001, MSGID_MULTIPLE_AT=1, NML_ADSP_CUSTOM_MED=0.9, RCVD_IN_PBL=3.335, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665, SPOOFED_FREEMAIL_NO_RDNS=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: reject 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: , Reply-To: numbchild@gmail.com Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1649544150; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to: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; bh=aLOeuGir6IJYSKyR5irPpzg/nMzpw0jjZlS7NfYvjtk=; b=kb8NMfoVaRgv8NYNeaIyrG789e7RE4UJPqx9NL9Fy0uzMqNb9cp7S0WK1ZM32t6lVXB6l9 cmczjvaRh8iHGN1088O54se+nQHhI6zHPNUh7BpNdmMxMgKWzGHrtdjdaXSwHhqQIF0N8a g/u6TcWYPv6QZP4M3S8pJxzqE0Sl7J8teG9nXX7hkIMlKlJ4kZVxVOZRLUG0dEO0MpuAxr ZExbjYnXx2OtTzl0J8HvX4dn7D6JPrIK4wVrPbg1EBUpFevoWTVEcLYcwiTDURV5dGK5hK QTb1PFE4NwO2LbfQnr3ipRdXb4tWihyTWTIGWcXZGO5aolU+jETeml+NCJw48g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1649544150; a=rsa-sha256; cv=none; b=CfXtu7yiHLG5oY0X6UM0ToczeVL0MalVxZElhWNsKpwerx8BMjSRpIJAWajg/u6ylcrziT XJvaO/qYOh2sTmCseTOq2cqBgCiXz93JXSiwoED0o1kYJMMdnV4BNT84LXP7SPPWUGHQ71 b3jzVc9sg9Xqw/eTJMFJh7Yo8TU73Efl9kxa8hVY+rnl7cTZwGaLM+fVxRo9Lm1SUggYDl o28U+BQkrCrkz96dy5vEXXkY44Aikcn+K4FOURyA4X4kZMKVPixq7GvEiJPLGFv4bdZ5Zn 7mXYC4vtIF+58q5wmHonEMCX6SrSRM1KElxfez4rkqBa/m8O9Mqp0uieAUbMFg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); 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: 1.53 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); 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: 2DFE43C83B X-Spam-Score: 1.53 X-Migadu-Scanner: scn1.migadu.com X-TUID: 2l0aZ0Q/OOfG --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-ob-clojure.el-Fix-header-argument-var-binding-passed.patch Content-Transfer-Encoding: quoted-printable From=2087c17465241b44030945391c6d036b44799a7694 Mon Sep 17 00:00:00 2001 From: stardiviner Date: Sat, 9 Apr 2022 21:14:22 +0800 Subject: [PATCH] ob-clojure.el: Fix header argument :var binding passed tab= le or list data * lisp/ob-clojure.el (org-babel-expand-body:clojure): Add if condition to handle source block :var passed org-mode table or list data for clojure let-binding to avoid java.lang.ClassCastException. =2D-- lisp/ob-clojure.el | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/lisp/ob-clojure.el b/lisp/ob-clojure.el index 5a44b6487..adcd99a7a 100644 =2D-- a/lisp/ob-clojure.el +++ b/lisp/ob-clojure.el @@ -101,13 +101,24 @@ (and (cdr (assq :ns params)) (format "(ns %s)\n" ns)) ;; Variables binding. (if (null vars) (org-trim body) =2D (format "(let [%s]\n%s)" =2D (mapconcat =2D (lambda (var) =2D (format "%S %S" (car var) (cdr var))) =2D vars =2D "\n ") =2D body)))))) + ;; variable's value is a list from org-mode passed tabl= e or list. + (if (listp (cdr (car vars))) + (format "(let [%s]\n%s)" + (mapconcat + (lambda (var) + (format "%S '%S" (car var) (cdr var))) + vars + "\n ") + body) + ;; else, the header argument variable's value is not = a list. + (format "(let [%s]\n%s)" + (mapconcat + (lambda (var) + (format "%S %S" (car var) (cdr var))) + vars + "\n ") + body) + )))))) (if (or (member "code" result-params) (member "pp" result-params)) (format "(clojure.pprint/pprint (do %s))" body) =2D-=20 2.35.1 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable =2D-=20 [ stardiviner ] I try to make every word tell the meaning that I want to express. Blog: https://stardiviner.github.io/ IRC(freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAmJSC6cACgkQG13xyVro msPj5wf+L1qKYNhQJiREhAJKMATO8Ba94lT64WJp5rnurEHlKoNNxWsBqHip/Y0P qoCvHzGiCBAinHP14NKFvWKLWV/aKjACVZBGi8QcZDrnHOOFXEZuOT3ldgGSjljN q1impe+i7wnvJZTIBT+8sb863XCkmxGuU9o2Q8b6+LsnO4SgltlOMdot6yfd1r5F jUXSrdf5aBE0e84Rdc1szR0CQ09wyPyYM5tqoqe1YCAi6dMFrtazBXwikt8wHsa+ h6/PvOSCRbbViDBT/WkkXqT7FgZh/y1ZDHC8tvZn/4yQ/w1DEk0vDEy1cmeK6XUC 4BOt+hJZqZC8wlarp5TDgtSZPIJfnw== =to2R -----END PGP SIGNATURE----- --==-=-=--