Browse Source

Babel: avoid superfluous confirmation for internal wrapper

* lisp/ob-exp.el (org-babel-exp-results): Suppress user confirmation
  of the emacs-lisp wrapper execution around a lob call.

* lisp/ob-lob.el (org-babel-lob-execute): Suppress user confirmation
  of the emacs-lisp wrapper execution around a lob call.
Achim Gratz 12 years ago
parent
commit
56bf3d7891
2 changed files with 5 additions and 3 deletions
  1. 2 1
      lisp/ob-exp.el
  2. 3 2
      lisp/ob-lob.el

+ 2 - 1
lisp/ob-exp.el

@@ -411,7 +411,8 @@ inhibit insertion of results into the buffer."
 	   ((equal type 'lob)
 	    (save-excursion
 	      (re-search-backward org-babel-lob-one-liner-regexp nil t)
-	      (org-babel-execute-src-block nil info)))))))))
+	      (let (org-confirm-babel-evaluate)
+		(org-babel-execute-src-block nil info))))))))))
 
 
 (provide 'ob-exp)

+ 3 - 2
lisp/ob-lob.el

@@ -137,8 +137,9 @@ if so then run the appropriate source block from the Library."
 	(save-excursion (goto-char (org-babel-where-is-src-block-result))
 			(forward-line 1)
 			(message "%S" (org-babel-read-result)))
-      (prog1 (org-babel-execute-src-block
-	      nil (funcall mkinfo (org-babel-process-params pre-params)))
+      (prog1 (let* ((proc-params (org-babel-process-params pre-params))
+		     org-confirm-babel-evaluate)
+	       (org-babel-execute-src-block nil (funcall mkinfo proc-params)))
 	;; update the hash
 	(when new-hash (org-babel-set-current-result-hash new-hash))))))