emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TASK] Allow customizeable ditaa executable in ob-ditaa.el


From: Max Nikulin
Subject: Re: [TASK] Allow customizeable ditaa executable in ob-ditaa.el
Date: Fri, 10 Nov 2023 17:38:19 +0700
User-agent: Mozilla Thunderbird

On 10/11/2023 10:19, Leo Butler wrote:
On Thu, Nov 09 2023, Max Nikulin wrote:

diff --git a/lisp/ob-ditaa.el b/lisp/ob-ditaa.el
[...]
should allow to set :java to

     flatpak-spawn --host toolbox run /usr/bin/ditaa

without abusing of org-ditaa-jar-path. Untested.

Doesn't this abuse the `java' header argument, which is intended to pass
arguments to the java runtime?

or `org-babel-ditaa-java-cmd'. My point is that requirement of non-empty `org-ditaa-jar-path' confused Florin to the degree when workarounds looked impossible. Notice that setting

    org-ditaa-jar-path "/usr/bin/ditaa"

still requires spreading of "flatpack-spawn ..." over `org-babel-ditaa-java-cmd', :java, and `org-ditaa-jar-option'. fortunately some of these options may be sent empty and other will not quote spaces, etc. Whole "flatpack-spawn ... ditaa" command can not be put to `org-ditaa-jar-path'

I think that it would be best to implement the change to mirror that
done in ob-plantuml, as Ihor suggested earlier.

Agree. I appreciate consistency in treatment of similar cases.

I am not sure in the following idea. Perhaps a concept of "launcher" (or "runner") may be introduced. Launchers may be stacked. So for a jar file launcher is "java @:java -jar" that may be combined with "toolbox run" and "flatpak-spawn --host" launchers.

My reading of the documentation and ob-plantuml.el is that it is not
possible to use the `java' header argument in the way you propose for
ob-ditaa.el.

Since nobody has proposed a patch for ob-ditaa, I decided that making a workaround easier is an improvement.

     #+property: header-args:ditaa :java ...

would not affect ob-plantuml.

P.S. I am unsure what is proper balance between flexibility/convenience and security. A file downloaded from net should not be able to change executables and their options without consent from the user. Unfortunately attempts to suppress at least shell expansion will lead to more verbose configuration.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]