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.
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.
It is better to avoid obstacles than to document them.