summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2013-04-14 10:52:53 +0200
committerBastien Guerry <bzg@altern.org>2013-04-14 11:46:44 +0200
commitd06ecf54f574e98945bb4b81ab438c68c98b260b (patch)
treee74d397909c523a77696858e631c79db8973e214
parent2fd51203647c6fd5bf28542288e743901440c3d2 (diff)
downloadorg-mode-d06ecf54f574e98945bb4b81ab438c68c98b260b.tar.gz
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.
-rw-r--r--lisp/org.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/lisp/org.el b/lisp/org.el
index 92d7598..de8bd07 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))))