From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id QKRGAtGiTWUuQwAAG6o9tA:P1 (envelope-from ) for ; Fri, 10 Nov 2023 04:26:09 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id QKRGAtGiTWUuQwAAG6o9tA (envelope-from ) for ; Fri, 10 Nov 2023 04:26:09 +0100 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 6AAE811E90 for ; Fri, 10 Nov 2023 04:26:08 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=umanitoba.ca header.s=selector2 header.b=RU6AtwWI; 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"; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=umanitoba.ca ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1699586769; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=SJP3IBgu12ojkYHCeTcAMg/UnyC2SI25xeokkwjA7xE=; b=asn8GCTCodY4KYUA5t1DuDHQv9NxxyWocVrKiDomTL3mHzUIK53n0ALwc++orUp8SVHyB3 AJlcc9iA40r9OW04hkOHBbDOUS7OL6uNzvAx7RnZaE7hm8SWTHkCe/2pSBLbC6U/qSMSxP K9hMvXiQ1feDmT+yh8qrqEcucE4nVoj5FpWFclrh/7GKBMRWfIlpcQD7qhqVQBOdgtsjPS FBqtMIEuY01FcbHpD9kNsH7hDsS3I/n+20Vs/m38Olq8qqk7rDaaaZS89zvL8WEzki0VXj VAXXGVXQhjcgrA+MdCJGKLwES8v4wA2rf9WNtJErBKOl7zGiff21qjx7i8KORA== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=umanitoba.ca header.s=selector2 header.b=RU6AtwWI; 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"; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=umanitoba.ca ARC-Seal: i=2; s=key1; d=yhetil.org; t=1699586769; a=rsa-sha256; cv=pass; b=njzPu05K0WQ0C2nmOjtSwiv1lrpySw+o99vsSQp41dUjm1IOqj6SIwFAoCBUJjEJyPlO1w 57aiDQYCZk7qqTen8OdZTEoMm39k9Upw725d08BZbd86wrZ810SaGCAYWmwUwwe5g2S4XO vn0F89Bc19XnJXh8bn+CIWFnhuDjLtSgLnTbFSu+VYbRQNVlIO4Xrcej3of3SKQ0aC5WZV RpV8taymCNpJxdxGJP56ahiKEIeWSCglhNMwjjQBLVqcZ4q8tvIqEXPd8Yb1bQjI1NgBMG ReWc3pacnLtpzcwQkWysBO8WnVCaMtFEqF48YKIwApk9Q8n40lc3D6a1xajUKQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r1I8i-000707-MP; Thu, 09 Nov 2023 22:25:00 -0500 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 1r1I8g-0006zi-Tf for emacs-orgmode@gnu.org; Thu, 09 Nov 2023 22:24:58 -0500 Received: from mail-yqbcan01on20701.outbound.protection.outlook.com ([2a01:111:f403:241d::701] helo=CAN01-YQB-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r1I8e-0002v4-3F for emacs-orgmode@gnu.org; Thu, 09 Nov 2023 22:24:58 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Rj/1qb4p4dN8QBYaKC/kJKfxF2PGMZID3OclJkSPXl6vrpOv3sqEGcp4pPlKsdBnpeYnqE8m8sQK3iQRyg4a+HxS3rLGmjIdAxNfZdmZtxoATjpO7xp/WnLrKOmO2JLFvdAkzxbEmmW8cWB3JaG5y7Crx5ZIlW9v4sAzxoD/1Sf4Cw0aOgBiHx2SrkiC8djYaAjH16czfiwW01ObnkjgY/XuGXtP7JbBfODzsEyVTCsNfzq1C0wCBaE/CbzELd1xuWk0qjlsxMF5HaON0b3dWCiE2MOBc6NJJjstbaKBU8iQOtkkeP1dv0aX9CNhpYePoK3FUycIduWeWV5MjHIKiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=SJP3IBgu12ojkYHCeTcAMg/UnyC2SI25xeokkwjA7xE=; b=bHFlh7cqdx1KwB8zusGsL1Z7q8MfY7lICJTbhKHTDvdLhee8KYPi73Im02SeKzz2jFeS41sl1h3UNVWOEoIWd+8++AfsTX2zrThtgcGHz6fMsxRA0pvq0aEOU972gP/FAsy/2AlBo3gunMEcJi1ZsDobBPftaIFba+/Xt/hbk50VRm48PyaLJQNsZc6H4Vgj4ZUIR8+dAegLzCL00TTJbxwz85EjnkTLJ1DyqUWDje0Aafk8jferoQ/mifKntbrOkanI8pJ1KSKmQxZ9RwQ6+7NiIK+/X1hWOwQ6DeFjfrNccqCAYnSB61jAtkmhESnPaQzn/xPt2qAgjjXQfSOH8g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=umanitoba.ca; dmarc=pass action=none header.from=umanitoba.ca; dkim=pass header.d=umanitoba.ca; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=umanitoba.ca; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SJP3IBgu12ojkYHCeTcAMg/UnyC2SI25xeokkwjA7xE=; b=RU6AtwWIaWL6llkSzrwgmT4FoqZi+8nwHqVhbbFhJyldgr42eJWgW9xM6eDwyuW3gSSW5AE2VAqZYSIOFDUfHX2S4spmiekknOreYNr5nGtwhH9YR85TVl0yNcU7ZkAYd5y3FQ+m+t7izLDdI/fUWpytL5hXdTOwcGID+1rsjJI5axuSZgAn+tk+l0ahtCmw4KI+0C2Vst/VRzkUcyU4x41cmlcVS0Cv/3G9h+5u/7LyRrMQkENy9Mv1oGulK46AaH73MQfrbfQyA3hCT+h6mLPAWb8YbOtqoo6IDSpTijaOtr0CRLS09RTNmJIXxEyIgdcM/kCfKzWJJtvR7FpiEA== Received: from YT3PR01MB9964.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:90::5) by YQBPR0101MB8477.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:54::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6977.19; Fri, 10 Nov 2023 03:19:52 +0000 Received: from YT3PR01MB9964.CANPRD01.PROD.OUTLOOK.COM ([fe80::94c8:d86a:210c:c4d6]) by YT3PR01MB9964.CANPRD01.PROD.OUTLOOK.COM ([fe80::94c8:d86a:210c:c4d6%4]) with mapi id 15.20.6977.018; Fri, 10 Nov 2023 03:19:51 +0000 From: Leo Butler To: Max Nikulin CC: "emacs-orgmode@gnu.org" Subject: Re: [TASK] Allow customizeable ditaa executable in ob-ditaa.el Thread-Topic: [TASK] Allow customizeable ditaa executable in ob-ditaa.el Thread-Index: AQHaErs4BJAyHfs4zESjqByXk5twpg== Date: Fri, 10 Nov 2023 03:19:51 +0000 Message-ID: <87zfzmnvl7.fsf@t14.reltub.ca> References: <87wmvhnr8b.fsf@t14.reltub.ca> <871qdo5sdh.fsf@web.de> <87y1fwtkth.fsf@localhost> <87sf5f7h04.fsf@t14.reltub.ca> In-Reply-To: (Max Nikulin's message of "Thu, 9 Nov 2023 19:17:19 +0700") Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Gnus/5.13 (Gnus v5.13) x-ms-publictraffictype: Email x-ms-traffictypediagnostic: YT3PR01MB9964:EE_|YQBPR0101MB8477:EE_ x-ms-office365-filtering-correlation-id: cb097364-5f1f-45e4-52c9-08dbe19be731 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: e6Tye+7vUXNEaYtbCDC75FHr9cXVpLDm3lZ6hEQwhFN6ebX5zF2I5/mAH5guzwSKj9iHyr3aVVDj4TwrADk/6iwRWhBHCUuPpoeQnPD97RvHITIiQGDlo2ImSXXJubwvhOs0E+CudlL294jmyemM1hEtzDb4OHtCIRYhS6+UzoUyXcSsn/XXSNp8LJK2EObywLzuQojdLSNwGWM087qZtcX2z9bCjnp0C920tI3YIM/Ube7leputJh92skbbYxrE9iSoxCbmjIXZPxcUpZmBVBX5UrW0CumssM/tMQJUHMz0DiV6tAKAtq2f9M7e6gwYF4LHIMKqOhHuuPkcBEKUZFFkz5/60AcX1njRaGNYBmFUPELt8SlW5GesXC5Tgy8IwkJWTqokQJ2Lqn0berR8dKMjWwQWz0t/7AkjINeHLY0QiSmc3E5nhyaRLeAiMHHA4j6xVc6hrJgmOX3k/0Bq/VxqkXN5/52qKW4YR0eZIGB+hKE5MsCPPwyWS4jzXFH2riv314W5Mrfz8lqWFbDI1pNf6qe4euij2s4JrXjz+ijy8CYstPLo/leBrQUzLsB8Xm1CDlMcebyT8YHwjbJLlVAei+HWrywEcqVXeJ9mbWJhPvWukLkHrBi2vogicrlt x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:YT3PR01MB9964.CANPRD01.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230031)(366004)(39860400002)(376002)(396003)(136003)(346002)(230922051799003)(451199024)(1800799009)(64100799003)(186009)(6512007)(9686003)(8936002)(26005)(122000001)(38070700009)(6486002)(478600001)(41300700001)(2906002)(8676002)(5660300002)(4326008)(86362001)(316002)(6916009)(66556008)(786003)(66946007)(66446008)(64756008)(76116006)(91956017)(66476007)(53546011)(6506007)(71200400001)(38100700002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?L1Fj4/wmkuMH3twZik5eGkefvSZLaPySALhrjdRWZACA+fsM2Te9vaeQGF?= =?iso-8859-1?Q?i3APFGg2UafGOlF1u3IexQ2ANV9vmqQosiFxh+64RCRBV/0e7zVU6RsWF1?= =?iso-8859-1?Q?EkUlhKYICQEXlbySZ+bq2TzEATtEQB6HMNELN6UNS2rUARhe0CWv5eizPH?= =?iso-8859-1?Q?YVDlj4OOo/HYgGj221BQLTnqmhGRcAHaHF9zL7nK6Aw8pj+PvXBuDm4F4t?= =?iso-8859-1?Q?GVHn0OVKaJawkSeRmKxcrGOwjXH7Gxlp8H8NCHoeJmNFOGpjUrqbrXB7K3?= =?iso-8859-1?Q?bv/eo+r6OgEk8DAAtvK74mLwPeBeujJfEtsF4z9yG2c+QLZS0UY6qtbeoh?= =?iso-8859-1?Q?/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jaXweRavEAFZyRP2tAArcpN?= =?iso-8859-1?Q?FfeWNiaUs8HH0pI0Qvi4byHzH221+snWxMioCQFqsD9FLvp89jbUMx8nfO?= =?iso-8859-1?Q?Q3sysvcXwP5bI1KlhIOnc1kfWrRQXvVEilWTapszTn1HV+TQs8l6jcoJTn?= =?iso-8859-1?Q?cf+hMumAshcjWWE7tpI8ymuS2VfRd0mjgzORogyjgpRLxmf85UyJqPqh6y?= =?iso-8859-1?Q?gJCOwVHO5c15HLA2WkVUuAz6OaG1/xJbWNvfq2MUX+rV/DSI2o/AS74PiS?= =?iso-8859-1?Q?o4U6UHUTQ6x/mYtlTbilaTM945GAdmoEy0aWIKMqOMHESKiUYuF9T3kvlq?= =?iso-8859-1?Q?nUyfg3a92CigpzgSZZfOBynnOAFt+pqi4Yw1zGoYuNJXPWrmlxD7Cvh5bf?= =?iso-8859-1?Q?1tJWn0D4hEapGlbHAtBoUOoxa60FSD5SWIStn4VryPN/tA/WzRQoGsTQ?= =?iso-8859-1?Q?=3D=3D?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: umanitoba.ca X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: YT3PR01MB9964.CANPRD01.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: cb097364-5f1f-45e4-52c9-08dbe19be731 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Nov 2023 03:19:51.7533 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4f80dd0b-338c-4e4c-8a14-90446962f7b8 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: /HCPAqzFR9Y3/BgPVeoB4MYjceJE4MvKtL8xWp/1sserRs7/0JidIw70VsiunlRItvQg2pKJr9lX9J4voapHtg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: YQBPR0101MB8477 Received-SPF: pass client-ip=2a01:111:f403:241d::701; envelope-from=Leo.Butler@umanitoba.ca; helo=CAN01-YQB-obe.outbound.protection.outlook.com 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -9.31 X-Spam-Score: -9.31 X-Migadu-Queue-Id: 6AAE811E90 X-Migadu-Scanner: mx13.migadu.com X-TUID: HtKKJcn8Cegb On Thu, Nov 09 2023, Max Nikulin wrote: > On 09/11/2023 10:17, Leo Butler wrote: >> While I was reviewing the documentation, ob-doc-ditaa.org, and the >> source, ob-ditaa.el, I realized that there is a simple way to run a >> script file instead of a jar file. > > > It is better to avoid obstacles than to document them. Ok, I figured that would be the response. > diff --git a/lisp/ob-ditaa.el b/lisp/ob-ditaa.el > index fa864c7bc..4a2b09cd9 100644 > --- a/lisp/ob-ditaa.el > +++ b/lisp/ob-ditaa.el > @@ -100,11 +100,13 @@ (defun org-babel-execute:ditaa (body params) > "epstopdf" > " " eps-file > " -o=3D" (org-babel-process-file-name out-file)))) > + (jar (org-string-nw-p (if eps org-ditaa-eps-jar-path > org-ditaa-jar-path))) > (cmd (concat org-babel-ditaa-java-cmd > - " " java " " org-ditaa-jar-option " " > - (shell-quote-argument > - (expand-file-name > - (if eps org-ditaa-eps-jar-path org-ditaa-jar-path= ))) > + " " java > + (and jar > + (concat > + " " org-ditaa-jar-option " " > + (shell-quote-argument (expand-file-name jar)= ))) > " " cmdline > " " (org-babel-process-file-name in-file) > " " (if pdf-cmd > > should allow to set :java to > > flatpak-spawn --host toolbox run /usr/bin/ditaa > > without abusing of org-ditaa-jar-path. Untested. Doesn't this abuse the `java' header argument, which is intended to pass arguments to the java runtime? I think that it would be best to implement the change to mirror that done in ob-plantuml, as Ihor suggested earlier. But, ob-plantuml uses a customization switch: `org-plantuml-exec-mode'. Its documentation reads: Method to use for PlantUML diagram generation. `jar' means to use java together with the JAR. The JAR can be configured via `org-plantuml-jar-path'. =20 `plantuml' means to use the PlantUML executable. The executable can be configured via `org-plantuml-executable-path'. You can also configure extra arguments via `org-plantuml-executable-args'.[fn:1]=20 My reading of the documentation and ob-plantuml.el is that it is not possible to use the `java' header argument in the way you propose for ob-ditaa.el. Leo [fn:1] (Aside: `org-plantuml-executable-args' should be `org-plantuml-args'= ; Ihor missed it when he made the change in commit b5f0efc049).=