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>
This commit is contained in:
Kyle Meyer 2017-06-22 21:28:21 -04:00
parent 17a1cd23b9
commit 1930a8f05a

View file

@ -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)