From 5b5fe9b5028d2074c30f271dbc2d63984da2ff19 Mon Sep 17 00:00:00 2001 From: Don March Date: Sun, 26 Jun 2016 23:35:44 -0700 Subject: [PATCH] Reschedule "++" repeaters on same day if in future * lisp/org.el (org-auto-repeat-maybe): Include the time in a timestamp (hours and minutes) when checking if a repeat occurrence is in the future. * doc/org.texi (Repeated Tasks): Document repeat occurrences with a time in the timestamp. --- doc/org.texi | 7 +++++++ lisp/org.el | 3 +-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/doc/org.texi b/doc/org.texi index ae9a738..9d8eb8f 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -6412,6 +6412,13 @@ special repeaters @samp{++} and @samp{.+}. For example: but also by as many weeks as it takes to get this date into the future. However, it stays on a Sunday, even if you called and marked it done on Saturday. +** TODO Empty kitchen trash + DEADLINE: <2008-02-08 Fri 20:00 ++1d> + Marking this DONE will shift the date by at least one day, and + also by as many days as it takes to get the timestamp into the + future. Since there is a time in the timestamp, the next + deadline in the future will be on today's date if you + complete the task before 20:00. ** TODO Check the batteries in the smoke detectors DEADLINE: <2005-11-01 Tue .+1m> Marking this DONE will shift the date to one month after diff --git a/lisp/org.el b/lisp/org.el index e13e82d..c266709 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -13287,8 +13287,7 @@ has been set" (let ((nshiftmax 10) (nshift 0)) (while (or (= nshift 0) - (<= (time-to-days time) - (time-to-days (current-time)))) + (time-less-p time (current-time))) (when (= (cl-incf nshift) nshiftmax) (or (y-or-n-p (format "%d repeater intervals were not \ -- 2.8.1