lang/plantuml: fix ob-plantuml previews with jar

If plantuml-default-exec-mode is 'server, the image is compiled via the
website and downloaded. If it's 'executable it uses the local 'plantuml'
executable (determined by plantuml-executable-path) to compile it. If
it's 'jar it uses the local 'plantuml.jar' (determined by
plantuml-jar-path).

The first two were tested and work, but 'jar did not, until now.
This commit is contained in:
Henrik Lissner 2019-10-23 13:04:25 -04:00
parent f34c33aa07
commit f3ca420c27
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -30,12 +30,13 @@ This function is called by `org-babel-execute-src-block'."
(error "Could not find plantuml at %s"
(executable-find plantuml-executable-path)))
(concat (shell-quote-argument (executable-find plantuml-executable-path))
" --headless "))
((not (file-exists-p org-plantuml-jar-path))
" --headless"))
((not (file-exists-p plantuml-jar-path))
(error "Could not find plantuml.jar at %s" org-plantuml-jar-path))
((concat "java " (cdr (assoc :java params)) " -jar "
(shell-quote-argument
(expand-file-name plantuml-executable-path)))))
(expand-file-name plantuml-jar-path)))))
" "
(pcase (file-name-extension out-file)
("png" "-tpng")
("svg" "-tsvg")