emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Leo Butler <Leo.Butler@umanitoba.ca>
To: Max Nikulin <manikulin@gmail.com>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: [TASK] Allow customizeable ditaa executable in ob-ditaa.el
Date: Fri, 10 Nov 2023 15:21:25 +0000	[thread overview]
Message-ID: <874jhtocqz.fsf@t14.reltub.ca> (raw)
In-Reply-To: <uil16s$6no$1@ciao.gmane.io> (Max Nikulin's message of "Fri, 10 Nov 2023 17:38:19 +0700")

On Fri, Nov 10 2023, Max Nikulin <manikulin@gmail.com> wrote:

> 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'

Hi Max,

Let me back up for a second: I wrote in the documentation patch

"Users may need to use a script to run ditaa."

That is a very circumspect statement. That is not saying that we can
throw any command at ob-ditaa and it will work.

>> 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 glad we agree. Now let me tell you my dilemma: a while ago, I
suggested a patch to implement similar functionality for ob-maxima. The
patch used customization variables, much like ob-plantuml does. Ihor's
feedback was that this was not a good approach (too much room for
accidental breakage, etc.). Eventually, the patch was amended to acheive
the same goals using new header arguments.

So, now, in my opinion, consistency would dictate that we re-visit the
changes made to ob-plantuml, re-fashion them and do something similar
with ob-ditaa. Except, users have likely become accustomed to using
ob-plantuml as it is...


> 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.

I am not in favour of a band-aid, it will hand-cuff us in the future.

I explained above why I haven't proposed a patch to ob-ditaa, yet.


  reply	other threads:[~2023-11-10 15:22 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-19 10:59 org-ditaa woes Florin Boariu
2023-10-20 17:22 ` Leo Butler
2023-10-20 18:16   ` Dr. Arne Babenhauserheide
2023-10-20 19:31     ` Leo Butler
2023-10-20 21:39   ` Florin Boariu
2023-10-21  3:50     ` Max Nikulin
2023-10-23 11:18       ` Florin Boariu
2023-10-24  7:55         ` Max Nikulin
2023-10-24  9:31           ` Florin Boariu
2023-10-24  9:38             ` Ihor Radchenko
2023-10-25 19:00               ` Leo Butler
2023-10-26  8:44                 ` Max Nikulin
2023-10-26  9:30                 ` Ihor Radchenko
2023-12-20 18:03               ` Leo Butler
2023-12-21 14:15                 ` Ihor Radchenko
2023-10-26 15:32           ` Leo Butler
2023-10-23 12:25       ` Florin Boariu
2023-10-21  7:44     ` Dr. Arne Babenhauserheide
2023-10-21  8:56       ` [TASK] Allow customizeable ditaa executable in ob-ditaa.el (was: org-ditaa woes) Ihor Radchenko
2023-11-09  3:17         ` [TASK] Allow customizeable ditaa executable in ob-ditaa.el Leo Butler
2023-11-09 12:17           ` Max Nikulin
2023-11-10  3:19             ` Leo Butler
2023-11-10 10:09               ` Ihor Radchenko
2023-11-10 10:38               ` Max Nikulin
2023-11-10 15:21                 ` Leo Butler [this message]
2023-11-11 10:07                   ` Ihor Radchenko
2023-11-10 10:18           ` Ihor Radchenko
2023-11-10 14:59             ` Leo Butler
2023-11-11 10:24               ` Ihor Radchenko
2023-11-13 16:26                 ` Leo Butler
2023-11-15 11:12           ` Formatting worg code examples (was: Re: [TASK] Allow customizeable ditaa executable in ob-ditaa.el) Max Nikulin

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:

  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=874jhtocqz.fsf@t14.reltub.ca \
    --to=leo.butler@umanitoba.ca \
    --cc=emacs-orgmode@gnu.org \
    --cc=manikulin@gmail.com \


* 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


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).