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 03:19:51 +0000 [thread overview]
Message-ID: <87zfzmnvl7.fsf@t14.reltub.ca> (raw)
In-Reply-To: <uiiikh$j7f$1@ciao.gmane.io> (Max Nikulin's message of "Thu, 9 Nov 2023 19:17:19 +0700")
On Thu, Nov 09 2023, Max Nikulin <manikulin@gmail.com> wrote:
> On 09/11/2023 10:17, Leo Butler wrote:
>> While I was reviewing the documentation, ob-doc-ditaa.org, and the
>> source, ob-ditaa.el, I realized that there is a simple way to run a
>> script file instead of a jar file.
>
>
> It is better to avoid obstacles than to document them.
Ok, I figured that would be the response.
> diff --git a/lisp/ob-ditaa.el b/lisp/ob-ditaa.el
> index fa864c7bc..4a2b09cd9 100644
> --- a/lisp/ob-ditaa.el
> +++ b/lisp/ob-ditaa.el
> @@ -100,11 +100,13 @@ (defun org-babel-execute:ditaa (body params)
> "epstopdf"
> " " eps-file
> " -o=" (org-babel-process-file-name out-file))))
> + (jar (org-string-nw-p (if eps org-ditaa-eps-jar-path
> org-ditaa-jar-path)))
> (cmd (concat org-babel-ditaa-java-cmd
> - " " java " " org-ditaa-jar-option " "
> - (shell-quote-argument
> - (expand-file-name
> - (if eps org-ditaa-eps-jar-path org-ditaa-jar-path)))
> + " " java
> + (and jar
> + (concat
> + " " org-ditaa-jar-option " "
> + (shell-quote-argument (expand-file-name jar))))
> " " cmdline
> " " (org-babel-process-file-name in-file)
> " " (if pdf-cmd
>
> 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?
I think that it would be best to implement the change to mirror that
done in ob-plantuml, as Ihor suggested earlier. But, ob-plantuml uses a
customization switch: `org-plantuml-exec-mode'. Its documentation reads:
Method to use for PlantUML diagram generation.
`jar' means to use java together with the JAR.
The JAR can be configured via `org-plantuml-jar-path'.
`plantuml' means to use the PlantUML executable.
The executable can be configured via `org-plantuml-executable-path'.
You can also configure extra arguments via
`org-plantuml-executable-args'.[fn:1]
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.
Leo
[fn:1] (Aside: `org-plantuml-executable-args' should be `org-plantuml-args';
Ihor missed it when he made the change in commit b5f0efc049).
next prev parent reply other threads:[~2023-11-10 3:26 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 [this message]
2023-11-10 10:09 ` Ihor Radchenko
2023-11-10 10:38 ` Max Nikulin
2023-11-10 15:21 ` Leo Butler
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zfzmnvl7.fsf@t14.reltub.ca \
--to=leo.butler@umanitoba.ca \
--cc=emacs-orgmode@gnu.org \
--cc=manikulin@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.