emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Dejan Josifović" <www.paranoidtimes@gmail.com>
To: Max Nikulin <manikulin@gmail.com>, Ihor Radchenko <yantar92@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] ob-plantuml: Allow setting PlantUML args for jar file
Date: Mon, 17 Jan 2022 18:19:18 +0100	[thread overview]
Message-ID: <1a42304e-47b6-48c3-01b4-6d858ddf7770@gmail.com> (raw)
In-Reply-To: <b5cf1602-4f5a-fe8d-c558-d1587723f97a@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2243 bytes --]

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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

  reply	other threads:[~2022-01-17 17:20 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
2022-01-17 17:19     ` Dejan Josifović [this message]
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=1a42304e-47b6-48c3-01b4-6d858ddf7770@gmail.com \
    --to=www.paranoidtimes@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=manikulin@gmail.com \
    --cc=yantar92@gmail.com \
    --subject='Re: [PATCH] ob-plantuml: Allow setting PlantUML args for jar file' \
    /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

Code repositories for project(s) associated with this 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).