From 1930a8f05ac3c09b6366491c076a3efde2f2205d Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Thu, 22 Jun 2017 21:28:21 -0400 Subject: [PATCH] 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 --- lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index 1e6d00973..d9b6489ff 100644 --- a/lisp/org.el +++ b/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) -- 2.11.4.GIT