Browse Source

org-todo: Display state change message when headline is not visible

* lisp/org.el (org-todo): Display state change message when headline
is not visible, reversing unintentional modification from dd17e9d29.

Prior to dd17e9d29 (2014-05-31), a message was displayed when changing
the state of a headline that was *not* visible, helping the user know
what the new state was even though the headline was off the screen.
While extending this code, dd17e9d29 unintentionally reversed the
visibility check, resulting in the message only being shown when the
headline is visible.

Reported-by: Russell Adams <RLAdams@AdamsInfoServ.Com>
<https://lists.gnu.org/archive/html/emacs-orgmode/2017-06/msg00442.html>
Kyle Meyer 7 years ago
parent
commit
1930a8f05a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lisp/org.el

+ 1 - 1
lisp/org.el

@@ -12681,7 +12681,7 @@ When called through ELisp, arg is also interpreted in the following way:
 	    (replace-match next t t)
 	    (cond ((equal this org-state)
 		   (message "TODO state was already %s" (org-trim next)))
-		  ((pos-visible-in-window-p hl-pos)
+		  ((not (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)