|
@@ -57,12 +57,14 @@ This function is called by `org-babel-execute-src-block'."
|
|
(out-file (cdr (assoc :file params)))
|
|
(out-file (cdr (assoc :file params)))
|
|
(cmdline (cdr (assoc :cmdline params)))
|
|
(cmdline (cdr (assoc :cmdline params)))
|
|
(in-file (org-babel-temp-file "plantuml-"))
|
|
(in-file (org-babel-temp-file "plantuml-"))
|
|
- (cmd (concat "java -jar "
|
|
|
|
- (shell-quote-argument org-plantuml-jar-path)
|
|
|
|
- " -p " cmdline " < "
|
|
|
|
- (shell-quote-argument in-file)
|
|
|
|
- " > "
|
|
|
|
- (shell-quote-argument out-file))))
|
|
|
|
|
|
+ (cmd (if (not org-plantuml-jar-path)
|
|
|
|
+ (error "`org-plantuml-jar-path' is not set")
|
|
|
|
+ (concat "java -jar "
|
|
|
|
+ (shell-quote-argument org-plantuml-jar-path)
|
|
|
|
+ " -p " cmdline " < "
|
|
|
|
+ (shell-quote-argument in-file)
|
|
|
|
+ " > "
|
|
|
|
+ (shell-quote-argument out-file)))))
|
|
(unless (file-exists-p org-plantuml-jar-path)
|
|
(unless (file-exists-p org-plantuml-jar-path)
|
|
(error "Could not find plantuml.jar at %s" org-plantuml-jar-path))
|
|
(error "Could not find plantuml.jar at %s" org-plantuml-jar-path))
|
|
(with-temp-file in-file (insert (concat "@startuml\n" body "\n@enduml")))
|
|
(with-temp-file in-file (insert (concat "@startuml\n" body "\n@enduml")))
|