Browse Source

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.
Bastien Guerry 12 years ago
parent
commit
4224cb3336
1 changed files with 2 additions and 1 deletions
  1. 2 1
      lisp/ob-dot.el

+ 2 - 1
lisp/ob-dot.el

@@ -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"))