From: Max Nikulin <manikulin@gmail.com>
To: "Ihor Radchenko" <yantar92@gmail.com>,
"Dejan Josifović" <www.paranoidtimes@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] ob-plantuml: Allow setting PlantUML args for jar file
Date: Sun, 16 Jan 2022 14:53:22 +0700 [thread overview]
Message-ID: <b5cf1602-4f5a-fe8d-c558-d1587723f97a@gmail.com> (raw)
In-Reply-To: <87y23hr045.fsf@localhost>
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.
next prev parent reply other threads:[~2022-01-16 7:54 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-03 22:56 ob-plantuml: Proposal to add 'jar-args' customizable variable Dejan Josifović
2022-01-06 19:53 ` Dejan Josifović
2022-01-07 4:38 ` Ihor Radchenko
2022-01-08 13:14 ` Dejan Josifović
2022-01-09 17:46 ` Andy Moreton
2022-01-10 16:00 ` Dejan Josifović
2022-01-15 6:20 ` [PATCH] ob-plantuml: Allow setting PlantUML args for jar file Ihor Radchenko
2022-01-16 7:53 ` Max Nikulin [this message]
2022-01-17 17:19 ` Dejan Josifović
2022-01-18 13:30 ` Ihor Radchenko
2022-01-19 16:54 ` Max Nikulin
2022-01-21 12:48 ` Ihor Radchenko
2022-01-23 16:50 ` Max Nikulin
2022-05-08 6:48 ` Ihor Radchenko
2022-01-21 22:22 ` Dejan Josifović
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b5cf1602-4f5a-fe8d-c558-d1587723f97a@gmail.com \
--to=manikulin@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=www.paranoidtimes@gmail.com \
--cc=yantar92@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).