diff --git a/doc/org.texi b/doc/org.texi index d30dded42..a40725c4d 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -6429,7 +6429,9 @@ You may have both scheduling and deadline information for a specific task. If the repeater is set for the scheduling information only, you probably want the repeater to be ignored after the deadline. If so, set the variable @code{org-agenda-skip-scheduled-if-deadline-is-shown} to -@code{repeated-after-deadline}. If you want both scheduling and deadline +@code{repeated-after-deadline}. However, any scheduling information without +a repeater is no longer relevant once the task is done, and thus, removed +upon repeating the task. If you want both scheduling and deadline information to repeat after the same interval, set the same repeater for both timestamps. diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index e76c7d66f..f7b0d3cd6 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -169,6 +169,11 @@ for details. *** org-bbdb-anniversaries-future Used like org-bbdb-anniversaries, it provides a few days warning for upcoming anniversaries (default: 7 days). +*** Clear non-repeated SCHEDULED upon repeating a task +If the task is repeated, and therefore done at least one, scheduling +information is no longer relevant. It is therefore removed. + +See [[git:481719fbd5751aaa9c672b762cb43aea8ee986b0][commit message]] for more information. *** Support for ISO week trees ISO week trees are an alternative date tree format that orders entries by ISO week and not by month. diff --git a/lisp/org.el b/lisp/org.el index 42b221817..7d0de0277 100755 --- a/lisp/org.el +++ b/lisp/org.el @@ -13143,9 +13143,9 @@ This function is run automatically after each state change to a DONE state." (cond ((not (string-match "\\([.+]\\)?\\(\\+[0-9]+\\)\\([hdwmy]\\)" ts)) ;; Time-stamps without a repeater are usually skipped. - ;; However, a SCHEDULED or DEADLINE time-stamp without - ;; one is removed, as it is considered outdated. - (unless (equal type "Plain:") + ;; However, a SCHEDULED time-stamp without one is + ;; removed, as it is considered as no longer relevant. + (when (equal type org-scheduled-string) (org-remove-timestamp-with-keyword type))) (t (let ((n (string-to-number (match-string 2 ts)))