瀏覽代碼

org.el (org-todo): When changing from one state to the same state, throw a more accurate message

* org.el (org-todo): When changing from one state to the same
state, throw a more accurate message.
Bastien Guerry 11 年之前
父節點
當前提交
dd17e9d299
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      lisp/org.el

+ 4 - 2
lisp/org.el

@@ -12550,8 +12550,10 @@ When called through ELisp, arg is also interpreted in the following way:
 		  (throw 'exit nil))))
 	    (store-match-data match-data)
 	    (replace-match next t t)
-	    (unless (pos-visible-in-window-p hl-pos)
-	      (message "TODO state changed to %s" (org-trim next)))
+	    (cond ((equal this org-state)
+		   (message "TODO state was already %s" (org-trim next)))
+		  ((pos-visible-in-window-p hl-pos)
+		   (message "TODO state changed to %s" (org-trim next))))
 	    (unless head
 	      (setq head (org-get-todo-sequence-head org-state)
 		    ass (assoc head org-todo-kwd-alist)