Browse Source

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.
Don March 8 years ago
parent
commit
86e592cb66
2 changed files with 8 additions and 2 deletions
  1. 7 0
      doc/org.texi
  2. 1 2
      lisp/org.el

+ 7 - 0
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

+ 1 - 2
lisp/org.el

@@ -13257,8 +13257,7 @@ has been set"
 			(let ((nshiftmax 10)
 			      (nshift 0))
 			  (while (or (= nshift 0)
-				     (<= (time-to-days time)
-					 (time-to-days (current-time))))
+				     (not (time-less-p (current-time) time)))
 			    (when (= (cl-incf nshift) nshiftmax)
 			      (or (y-or-n-p
 				   (format "%d repeater intervals were not \