[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] ob-plantuml: Allow setting PlantUML args for jar file
From: |
Dejan Josifović |
Subject: |
Re: [PATCH] ob-plantuml: Allow setting PlantUML args for jar file |
Date: |
Mon, 17 Jan 2022 18:19:18 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 |
On 16-Jan-22 08:53, Max Nikulin wrote:
Dejan, have you tried :java or :cmdline header arguments?
Hi Max! Yes, I have tried with those header arguments and they naturally
work. Maybe I should've mentioned that.
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).
On 15-Jan-22 07:20, Ihor Radchenko wrote:
See the attached patch. It appears that we can simply carry over the
executable args to jar (but please test it on other systems!)
I have tested the patch on my machine and it works fine. I have set
the new/renamed variable like this:
(setq org-plantuml-args (list "-headless" "-charset" "UTF-8"))
and tried the same example:
#+BEGIN_SRC plantuml :file ./test.png
A -> B: Hello ∧
#+END_SRC
and it renders correctly.
However, I have a couple of concerns.
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.
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.
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 all,
--
Dejan Josifović | Дејан Јосифовић
Software engineer | Софтверски инжењер
https://theparanoidtimes.org
() ascii ribbon campaign
/\ www.asciiribbon.org
OpenPGP_signature
Description: OpenPGP digital signature