浏览代码

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.
Eric Schulte 14 年之前
父节点
当前提交
232651a57e
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      lisp/ob.el

+ 4 - 2
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")))