ob-ditaa: throw error when evaluated and :file header argument is missing
* lisp/ob-ditaa.el (org-babel-execute:ditaa): Throw error when evaluated and :file header argument is missing.
This commit is contained in:
parent
5b35351002
commit
3559280aca
|
@ -48,7 +48,11 @@
|
||||||
"Execute a block of Ditaa code with org-babel.
|
"Execute a block of Ditaa code with org-babel.
|
||||||
This function is called by `org-babel-execute-src-block'."
|
This function is called by `org-babel-execute-src-block'."
|
||||||
(let* ((result-params (split-string (or (cdr (assoc :results params)) "")))
|
(let* ((result-params (split-string (or (cdr (assoc :results params)) "")))
|
||||||
(out-file (cdr (assoc :file params)))
|
(out-file ((lambda (el)
|
||||||
|
(or el
|
||||||
|
(error
|
||||||
|
"ditaa code block requires :file header argument")))
|
||||||
|
(cdr (assoc :file params))))
|
||||||
(cmdline (cdr (assoc :cmdline params)))
|
(cmdline (cdr (assoc :cmdline params)))
|
||||||
(in-file (org-babel-temp-file "ditaa-"))
|
(in-file (org-babel-temp-file "ditaa-"))
|
||||||
(cmd (concat "java -jar "
|
(cmd (concat "java -jar "
|
||||||
|
|
Loading…
Reference in New Issue