From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id oJTBLCPP42E+WQEAgWs5BA (envelope-from ) for ; Sun, 16 Jan 2022 08:54:11 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id aO0gKiPP42H8sAAA9RJhRA (envelope-from ) for ; Sun, 16 Jan 2022 08:54:11 +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 4D6F343BFB for ; Sun, 16 Jan 2022 08:54:11 +0100 (CET) Received: from localhost ([::1]:36612 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n90Mc-0002aR-AE for larch@yhetil.org; Sun, 16 Jan 2022 02:54:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60412) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n90M2-0002Yg-Ll for emacs-orgmode@gnu.org; Sun, 16 Jan 2022 02:53:34 -0500 Received: from [2a00:1450:4864:20::12e] (port=34367 helo=mail-lf1-x12e.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n90M1-0005KN-51 for emacs-orgmode@gnu.org; Sun, 16 Jan 2022 02:53:34 -0500 Received: by mail-lf1-x12e.google.com with SMTP id p27so33836500lfa.1 for ; Sat, 15 Jan 2022 23:53:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=MuZOywIOIT67INRWFo+TCbiNOti8uQx+0YUtz5mQG18=; b=ap5sW3guzZsJFIwvrCd4f0+X3zLV6RH0e9SpxExrCizXXGj6/Ux1Td+VQJ8u04qyOq KyMp8bFv16FzxsAJeeKBoG7a4JzxIpH19LNIZUTTZmFsZospso5861BPrB/NKlMhssFK VlnlC8BFfPoYy26Cy/kjZMPfZ3NVg/VaFVTHXM3qK2TyqgSiSZKd51oOedlzIv9cVK6f iGxSH4SDOLtqoXik+I1O6jp0itixCuDnhkrRWEO9HRGm6Xk8PbtozeUBKhpfrZFTRzjL KnQdDcAyxyQERYe6mHMqP7WwUTvU4hMz4uTl9VZAno+QyPMvkWWSlWByO0AnfNXX8baG PjiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=MuZOywIOIT67INRWFo+TCbiNOti8uQx+0YUtz5mQG18=; b=Vly5bZ9WnAr77SUqbZ9g5djZ7tzG7GVdnKBHRVP9C29I/p+jjIlKAMzf3wHrPQ46oB 5OHCzneLJbxXII7ufGzs4HQsugkecutrRjLKlVdwjrEyaER6UfSXalRIpK18YYwr5Al6 vRq/NNafQht7wT8zQrDWBdr4eS4/ZZ0fkoh/sGY8lgOb3zg3/kPhab7nXO6kVCcV42H3 fF2GN72pBxB9cQe/VfluMTXlu2w0zUxR7aymanxhvUi2Fqh7Q+exowc78cAhOoXlWajW KJjBKBUURlqbu4o4xx7xbN5+/kjKMDQzqske+e7+hx5ZkHAEVsrfq2yw4ejoCHQujDws Pjbg== X-Gm-Message-State: AOAM531QofxuQS6HjJnrKk6L2A2bqwnjl0epJHi/I5ekYW1sXLDgClEq y2OKWk90n1018VHlrlIIcfysJbwyqYO42A== X-Google-Smtp-Source: ABdhPJzSz4fsjUIM36CdS+mE22Q5mf4YxErX0v5ZV4Q/YuoamE3x0iN0MY1+OIeBtC5aOpdBJH10tA== X-Received: by 2002:ac2:51dc:: with SMTP id u28mr12645812lfm.3.1642319610450; Sat, 15 Jan 2022 23:53:30 -0800 (PST) Received: from [192.168.0.101] (nat-0-0.nsk.sibset.net. [5.44.169.188]) by smtp.googlemail.com with ESMTPSA id q26sm1054265lfm.120.2022.01.15.23.53.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 15 Jan 2022 23:53:29 -0800 (PST) Subject: Re: [PATCH] ob-plantuml: Allow setting PlantUML args for jar file To: Ihor Radchenko , =?UTF-8?Q?Dejan_Josifovi=c4=87?= References: <5d7eba13-b717-a12a-5f89-7d2c9414917e@gmail.com> <87y23hr045.fsf@localhost> From: Max Nikulin Message-ID: Date: Sun, 16 Jan 2022 14:53:22 +0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <87y23hr045.fsf@localhost> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::12e (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::12e; envelope-from=manikulin@gmail.com; helo=mail-lf1-x12e.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, FREEMAIL_FROM=0.001, NICE_REPLY_A=-0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" 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=1642319651; 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=MuZOywIOIT67INRWFo+TCbiNOti8uQx+0YUtz5mQG18=; b=eVaHi1jCFxlqh0kSJgqFhR1olBxzGeerCN+3HII4exuQo6ak2mQv0k7mlNi9raHceG7JWQ KJztA7+MGujUOR7B9t9HjSZIBe/H3Xj6vxLxZARV4yZVWpPtiJnjA9fG+QuO150T8Jrau+ 1UPkBu7VY/iqmOts1tPLwVdlhMtpWtuSS7n9NIqaDZS6YuMZ3FT3HYIFecKTJ+zklk6iXV Iye0JBSy9AtY2H9qGNHmT8DfYgIJUV+SEgfhh4Sg6bkVJKAxWuYmm1HD4Ckf3BncY81RLL JtSGAA2PxBJg05LbdHibe8Z7cbdGpmDHmsP2eSdwx0LYY9ITsaHpcvppi/gh8Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1642319651; a=rsa-sha256; cv=none; b=hDk1i5l2RBAvuj69sSVreyAiNpyn8xYbrxv0lr5kG6AnY1nqTp5vpyl53QtTGwViqUGWIr YEIawRRwKjA+qJ6L1EDhtM66uC3gQCew7EkVn3umXlpFjmb+0pQmsloaEqonodAnYcPMUU Yz2IZqe+PQBwzM8MbRvEfQHQFhnQLshCmzYluXNY4+ekLXfBO9GVVFWv6x/cReThmrMmGG MZaLyZFfWoohh9NdkEfv22V3giU5hgIbUnwFESo/0EekImnEjjQGqAEmLglc8fFrMyPJxw c3eXRIXZGpIcaBkilNkTdRIbmp95dvn+81uUbtWfYp+7RMSp7urm6n3V8vgmqw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=ap5sW3gu; dmarc=fail reason="SPF not aligned (relaxed)" 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: -2.02 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=ap5sW3gu; dmarc=fail reason="SPF not aligned (relaxed)" 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: 4D6F343BFB X-Spam-Score: -2.02 X-Migadu-Scanner: scn1.migadu.com X-TUID: LTrkZBk61R/t Hi. Disclaimer: I am neither plantuml nor ditaa user, so my comments may have no sense. On 15/01/2022 13:20, Ihor Radchenko wrote: > Dejan Josifović writes: > >> Comparing ob-plantuml.el and plantuml-mode.el files I found what is the >> problem. plantuml-mode has a customizable variable for specifying >> arguments when using PlantUML from jar (plantuml-jar-args (list >> "-charset" "UTF-8" ). The charset arguments is what is needed for >> the images to render correctly (I confirmed it by implementing it locally). >> >> I was wondering why such variable doesn't exist in ob-plantuml. Dejan, have you tried :java or :cmdline header arguments? > Even though I was unable to reproduce your problem (most likely because > my system is different), it sounds like a good idea to allow users to > customise jar args as well. I agree that arguments should be customizable when the application is launched from jar, but there are already :java argument that is inserted before jar file and :cmdline argument that is appended after it. Another consideration is that ob-ditaa and ob-plantuml should use similar set of header arguments for additional parameters. They (and third-party packages) may even share some parameters related to java executable location and arguments for tuning of java VM (memory limits, etc.). > See the attached patch. It appears that we can simply carry over the > executable args to jar (but please test it on other systems!) > - (t (list java > - "-Djava.awt.headless=true" (unrelated to this patch) The line above is a recent change, and I do not see a reason why it is not added in a customizable way through appending (:java "-Djava.awt.headless=true") to `org-babel-default-header-args:plantuml'. Maybe I just missed something stupid since I have not tried it. > - "-jar" > - (shell-quote-argument (expand-file-name org-plantuml-jar-path)))))) > + (t `(,java > + "-Djava.awt.headless=true" > + "-jar" > + ,(shell-quote-argument (expand-file-name org-plantuml-jar-path)) > + ,@org-plantuml-args)))) Is there a case when some arguments are suitable for dedicated binary but should be avoided for jar (when a user has both executable from system package and manually downloaded jar having newer version)? It may be a reason to have separate variables (or header arguments). I suppose, a part of problem that there are no plantuml and ditaa users and subscribers of this list who are ready to discuss code of related babel packages.