Re: ob-plantuml: Proposal to add 'jar-args' customizable variable
On 09-Jan-22 18:46, Andy Moreton wrote: I use this snippet to set the ob-plantuml.el args to match the plantuml-mode.el settings: (setf (alist-get :javaorg-babel-default-header-args:plantuml) (mapconcat #'identity plantuml-java-args " ") (alist-get :cmdline org-babel-default-header-args:plantuml) (mapconcat #'identity plantuml-jar-args " ")) Hope that helps, AndyM Hi AndyM, This is actually very helpful It didn't remotely cross my mind to do something like this. Thanks a bunch! I was using PlantUML from shell to create images to bypass this until now. Of course, a native solution in babel for this is always better. Looking at this, I see that in my initial post I made an argument only for arguments passed to PlantUML jar, but now I see that the same can be applied for arguments passed to java command/process. Both are customizable in plantuml-mode, but not in ob-plantuml. Maybe we should think about adding a separate var for those also. Regards, -- Dejan Josifović | Дејан Јосифовић Software engineer | Софтверски инжењер https://theparanoidtimes.org () ascii ribbon campaign /\ www.asciiribbon.org OpenPGP_signature Description: OpenPGP digital signature
Re: ob-plantuml: Proposal to add 'jar-args' customizable variable
On Fri 03 Dec 2021, Dejan Josifović wrote: > Hi all, > > I use PlantUML integration in org-mode for years now, but only > recently I came across some unwanted behavior. > > Using PlantUML from jar (org-plantuml-jar-path variable) and latest > org-mode, I wanted to render a diagram containing some Unicode > characters (such as '⊥' and '∀'), but the end image had some gibberish > instead. However, > trying this from a standalone file using plantuml-mode[1], the end image > rendered correctly. Here is some sample code which can reproduce the issue: > > #+BEGIN_SRC plantuml :file ./test.png > A -> B: ∀ characters display correctly is ⊥ > #+END_SRC > > 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. I have > searched the mailing list archives, confirmed bugs and help page and > couldn't find anything related. I use this snippet to set the ob-plantuml.el args to match the plantuml-mode.el settings: (setf (alist-get :javaorg-babel-default-header-args:plantuml) (mapconcat #'identity plantuml-java-args " ") (alist-get :cmdline org-babel-default-header-args:plantuml) (mapconcat #'identity plantuml-jar-args " ")) Hope that helps, AndyM
Re: ob-plantuml: Proposal to add 'jar-args' customizable variable
On 07-Jan-22 05:38, Ihor Radchenko wrote: Dejan Josifović writes: I has been a little over a month since i posted this to the mailing list, so I'm trying to bump it. Added to todo list. It may take a little while, but I will take a look at it relatively soon. Best, Ihor Thanks Ihor! Mail me if you need more info. Regards, -- Dejan Josifović | Дејан Јосифовић Software engineer | Софтверски инжењер https://theparanoidtimes.org () ascii ribbon campaign /\ www.asciiribbon.org OpenPGP_signature Description: OpenPGP digital signature
Re: ob-plantuml: Proposal to add 'jar-args' customizable variable
Dejan Josifović writes: > I has been a little over a month since i posted this to the mailing > list, so I'm trying to bump it. Added to todo list. It may take a little while, but I will take a look at it relatively soon. Best, Ihor
Re: ob-plantuml: Proposal to add 'jar-args' customizable variable
On 03-Dec-21 23:56, Dejan Josifović wrote: Hi all, I use PlantUML integration in org-mode for years now, but only recently I came across some unwanted behavior. Using PlantUML from jar (org-plantuml-jar-path variable) and latest org-mode, I wanted to render a diagram containing some Unicode characters (such as '⊥' and '∀'), but the end image had some gibberish instead. However, trying this from a standalone file using plantuml-mode[1], the end image rendered correctly. Here is some sample code which can reproduce the issue: #+BEGIN_SRC plantuml :file ./test.png A -> B: ∀ characters display correctly is ⊥ #+END_SRC 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. I have searched the mailing list archives, confirmed bugs and help page and couldn't find anything related. Does anyone from the community know if such variable was deliberately omitted? If so, what is the reason? If this is indeed a wanted feature, I will be more than happy to provide a patch. [1] https://github.com/skuro/plantuml-mode Thanks and regards, Hi all, I has been a little over a month since i posted this to the mailing list, so I'm trying to bump it. Thanks all. Regards, -- Dejan Josifović | Дејан Јосифовић Software engineer | Софтверски инжењер https://theparanoidtimes.org () ascii ribbon campaign /\ www.asciiribbon.org OpenPGP_signature Description: OpenPGP digital signature