From d06ecf54f574e98945bb4b81ab438c68c98b260b Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Sun, 14 Apr 2013 10:52:53 +0200 Subject: [PATCH] org.el (org-closed-keep-when-no-todo): New option * org.el (org-closed-keep-when-no-todo): New option. (org-todo): Use the new option. Thanks to Brian van den Broek for asking for this. --- lisp/org.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index 92d75982a..de8bd0706 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -853,6 +853,14 @@ Changes become only effective after restarting Emacs." :group 'org-keywords :type 'string) +(defcustom org-closed-keep-when-no-todo nil + "Remove CLOSED: time-stamp when switching back to a non-todo state?" + :group 'org-todo + :group 'org-keywords + :version "24.4" + :package-version '(Org . "8.0") + :type 'boolean) + (defconst org-planning-or-clock-line-re (concat "^[ \t]*\\(" org-scheduled-string "\\|" org-deadline-string "\\|" @@ -12218,7 +12226,7 @@ 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 (or (not org-state) + (when (or (and (not org-state) (not org-closed-keep-when-no-todo)) (and org-state (member org-state org-not-done-keywords) (not (member this org-not-done-keywords)))) -- 2.11.4.GIT