summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2017-09-07 17:43:32 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2017-09-07 17:43:32 +0200
commitb16086d9af92e8b1865f53d984e675ef2c5b3db9 (patch)
treee526c59cd3565e1df20f330cb01b7a43ce4ff43b
parent22e916fb369629606d919a0e4f33ec2954c87e04 (diff)
downloadorg-mode-b16086d9af92e8b1865f53d984e675ef2c5b3db9.tar.gz
Fix `org-confirm-babel-evaluate' with `org-sbe'
* lisp/ob-core.el (org-babel-check-confirm-evaluate): Do not move point, as it is neither necessary nor expected by `org-babel-check-confirm-evaluate'. Reported-by: Alex Bennée <alex.bennee@linaro.org> http://lists.gnu.org/archive/html/emacs-orgmode/2017-09/msg00167.html
-rw-r--r--lisp/ob-core.el8
1 files changed, 3 insertions, 5 deletions
diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index b1fd5ff..00f968a 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -241,11 +241,9 @@ should be asked whether to allow evaluation."
(query (or (equal eval "query")
(and export (equal eval "query-export"))
(if (functionp org-confirm-babel-evaluate)
- (save-excursion
- (goto-char (nth 5 info))
- (funcall org-confirm-babel-evaluate
- ;; language, code block body
- (nth 0 info) (nth 1 info)))
+ (funcall org-confirm-babel-evaluate
+ ;; Language, code block body.
+ (nth 0 info) (nth 1 info))
org-confirm-babel-evaluate))))
(cond
(noeval nil)