diff --git a/lisp/org.el b/lisp/org.el index 5ec3ddf74..6a2477709 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -10192,7 +10192,7 @@ 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) - (cond ((equal this org-state) + (cond ((and org-state (equal this org-state)) (message "TODO state was already %s" (org-trim next))) ((not (pos-visible-in-window-p hl-pos)) (message "TODO state changed to %s" (org-trim next))))