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.
This commit is contained in:
Bastien Guerry 2013-04-12 17:54:43 +02:00
parent 62f9c04e5a
commit 02ddc594f2
1 changed files with 4 additions and 3 deletions

View File

@ -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
(when (or (not org-state)
(and org-state
(member org-state org-not-done-keywords)
(not (member this 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))