summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Davison <davison@stats.ox.ac.uk>2010-09-02 13:32:27 -0700
committerDan Davison <davison@stats.ox.ac.uk>2010-09-02 13:32:27 -0700
commita008d84163df38e15310ffc8c6badf024b916a8e (patch)
tree1336b2f46c91c195a60073c3cd2400bc404c06ff
parent0d5791e7b7324bfd7b9893f3a752dbe8aedd1aeb (diff)
parentebad875b122e6e39bc29967bc2ef8c9ee5d5c641 (diff)
downloadorg-mode-a008d84163df38e15310ffc8c6badf024b916a8e.tar.gz
Merge branch 'master' of git://repo.or.cz/org-mode
-rw-r--r--lisp/ob-plantuml.el14
1 files changed, 8 insertions, 6 deletions
diff --git a/lisp/ob-plantuml.el b/lisp/ob-plantuml.el
index c5045de..cb5ca12 100644
--- a/lisp/ob-plantuml.el
+++ b/lisp/ob-plantuml.el
@@ -57,12 +57,14 @@ This function is called by `org-babel-execute-src-block'."
(out-file (cdr (assoc :file params)))
(cmdline (cdr (assoc :cmdline params)))
(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)
(error "Could not find plantuml.jar at %s" org-plantuml-jar-path))
(with-temp-file in-file (insert (concat "@startuml\n" body "\n@enduml")))