From 02ddc594f2070756f82fe0ac977eb7349418d126 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Fri, 12 Apr 2013 17:54:43 +0200 Subject: [PATCH] org.el (org-todo): Also remove the CLOSED planning information when removing the TODO keyword * org.el (org-todo): Also remove the CLOSED planning information when removing the TODO keyword. Thanks to Samuel Wales for reporting this. --- lisp/org.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 5dfa1e048..5e027685e 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -12225,9 +12225,10 @@ For calling through lisp, arg is also interpreted in the following way: (nth 2 (assoc this org-todo-log-states)))) (if (and (eq dolog 'note) (eq org-inhibit-logging 'note)) (setq dolog 'time)) - (when (and org-state - (member org-state org-not-done-keywords) - (not (member this org-not-done-keywords))) + (when (or (not org-state) + (and org-state + (member org-state org-not-done-keywords) + (not (member this org-not-done-keywords)))) ;; This is now a todo state and was not one before ;; If there was a CLOSED time stamp, get rid of it. (org-add-planning-info nil nil 'closed)) -- 2.11.4.GIT