summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Schulte <schulte.eric@gmail.com>2010-11-30 22:02:02 -0700
committerEric Schulte <schulte.eric@gmail.com>2010-11-30 22:02:02 -0700
commit232651a57eecea842c57e0f6a104fbb391d00452 (patch)
treed13d6020791ee4d4f6e9d2143a2bf9c943c3804e
parentbeab6b4bfe87661a8f67ff586b99c920da444b7d (diff)
downloadorg-mode-232651a57eecea842c57e0f6a104fbb391d00452.tar.gz
ob: mention code block name when ":eval query"
* lisp/ob.el (org-babel-confirm-evaluate): Show code block's name when it is available during evaluation query.
-rw-r--r--lisp/ob.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/ob.el b/lisp/ob.el
index f3f5614..51ad3cf 100644
--- a/lisp/ob.el
+++ b/lisp/ob.el
@@ -218,8 +218,10 @@ of potentially harmful code."
(if (or (equal eval "never") (equal eval "no")
(and query
(not (yes-or-no-p
- (format "Evaluate this%scode on your system? "
- (if info (format " %s " (nth 0 info)) " "))))))
+ (format "Evaluate this%scode block%son your system? "
+ (if info (format " %s " (nth 0 info)) " ")
+ (if (nth 4 info)
+ (format " (%s) " (nth 4 info)) " "))))))
(prog1 nil (message "Evaluation %s"
(if (or (equal eval "never") (equal eval "no"))
"Disabled" "Aborted")))