diff options
author | Eric Schulte <schulte.eric@gmail.com> | 2011-01-27 15:42:27 -0700 |
---|---|---|
committer | Eric Schulte <schulte.eric@gmail.com> | 2011-01-27 15:42:27 -0700 |
commit | 3559280aca27cc91ff89b6a724a1eb941fb53734 (patch) | |
tree | 2b3404b4bc0b5b8e7d4f465dd4a3a4588b3b8ecb | |
parent | 5b35351002f2452dc8061b6371cdb680a0c5081f (diff) | |
download | org-mode-3559280aca27cc91ff89b6a724a1eb941fb53734.tar.gz |
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.
-rw-r--r-- | lisp/ob-ditaa.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/ob-ditaa.el b/lisp/ob-ditaa.el index b5a86e9..4bb838c 100644 --- a/lisp/ob-ditaa.el +++ b/lisp/ob-ditaa.el @@ -48,7 +48,11 @@ "Execute a block of Ditaa code with org-babel. This function is called by `org-babel-execute-src-block'." (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))) (in-file (org-babel-temp-file "ditaa-")) (cmd (concat "java -jar " |