[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] ob-plantuml: Allow setting PlantUML args for jar file
From: |
Ihor Radchenko |
Subject: |
Re: [PATCH] ob-plantuml: Allow setting PlantUML args for jar file |
Date: |
Tue, 18 Jan 2022 21:30:14 +0800 |
Dejan Josifović <www.paranoidtimes@gmail.com> writes:
> But, since ob-plantuml already had variable for arguments for executable
> it fells natural to me to have customizable variables for when using
> jar. These headers are of course easier, but the user would have to
> write them on each source block to achieve something that should be
> globally customizable (like charset).
FYI, you can customise any header arg globally. See manual page 16.3
Using Header Arguments.
> I second the concern that Max stated:
>> 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 believe it is better design decision to separate arguments for
> executable and jar.
I am not sure about this specific case. The PlantUML executable is
literally a wrapper around java call to jar. Below is the contents of
plantuml file in my system:
#!/bin/bash
gjl_package=plantuml
gjl_jar="plantuml.jar"
source /usr/share/java-config-2/launcher/launcher.bash
Unless it is any different on your side, the arguments for jar and
executable should be literally the same.
> Since we are making jar arguments customizable, we should think about
> adding java arguments customizable (also mentioned by Max!). This line
> in patch:
> + "-Djava.awt.headless=true"
> can be also added to a separate variable.
I feel that running headless mode in the ob-plantuml is deliberate. We
may not want users to change it. Otherwise, you are free to customize
java arguments in org-babel-default-header-args:plantuml
> Lastly, there is a typo in the patch:
> +** Removed or renamed functions and variables
> +*** =org-plantump-executable-args= is renamed and applies to jar as well
> +
> +The new variable name is =org-plantump-args=. It now applies to both
> +jar PlantUML file and executable.
> Word plantump should be plantuml I guess. :-)
Thanks! Will fix.
Best,
Ihor