From aaa68af8a7710ffe2c61fc45edf2ff377438cd32 Mon Sep 17 00:00:00 2001 From: Jarmo Hurri Date: Sat, 7 Dec 2019 09:14:34 +0200 Subject: [PATCH] ob-core.el: Display block point during evaluation confirmation * lisp/ob-core.el (org-babel-confirm-evaluate): Display code block point when querying confirmation of evaluation. This addresses the problem of finding the block currently evaluated. --- lisp/ob-core.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lisp/ob-core.el b/lisp/ob-core.el index f877ff51b..7ba9894e6 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -277,7 +277,8 @@ environment, to override this check." (let* ((evalp (org-babel-check-confirm-evaluate info)) (lang (nth 0 info)) (name (nth 4 info)) - (name-string (if name (format " (%s) " name) " "))) + (name-string (if name (format " (%s) " name) " ")) + (start (nth 5 info))) (pcase evalp (`nil nil) (`t t) @@ -285,11 +286,11 @@ environment, to override this check." (and (not (bound-and-true-p org-babel-confirm-evaluate-answer-no)) (yes-or-no-p - (format "Evaluate this %s code block%son your system? " - lang name-string))) + (format "Evaluate this %s code block%son your system (point %d)? " + lang name-string start))) (progn - (message "Evaluation of this %s code block%sis aborted." - lang name-string) + (message "Evaluation of this %s code block%sis aborted (point %d)." + lang name-string start) nil))) (x (error "Unexpected value `%s' from `org-babel-check-confirm-evaluate'" x))))) -- 2.21.0