ob-dot.el (org-babel-execute:dot): Throw an error when there is no :file parameter

* ob-dot.el (org-babel-execute:dot): Throw an error when there
is no :file parameter.
This commit is contained in:
Bastien Guerry 2012-09-28 19:06:17 +02:00
parent b1f498487a
commit 4224cb3336
1 changed files with 2 additions and 1 deletions

View File

@ -64,7 +64,8 @@
"Execute a block of Dot code with org-babel.
This function is called by `org-babel-execute-src-block'."
(let* ((result-params (cdr (assoc :result-params params)))
(out-file (cdr (assoc :file params)))
(out-file (cdr (or (assoc :file params)
(error "You need to specify a :file parameter"))))
(cmdline (or (cdr (assoc :cmdline params))
(format "-T%s" (file-name-extension out-file))))
(cmd (or (cdr (assoc :cmd params)) "dot"))