org: use org-today in habits auto repeat

* org.el (org-auto-repeat-maybe): Use org-today.

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2010-11-29 19:18:34 +00:00 committed by Carsten Dominik
parent 2e08843369
commit d1eb6cb25b
1 changed files with 2 additions and 2 deletions

View File

@ -11393,13 +11393,13 @@ This function is run automatically after each state change to a DONE state."
((equal (match-string 1 ts) ".")
;; Shift starting date to today
(org-timestamp-change
(- (time-to-days (current-time)) (time-to-days time))
(- (org-today) (time-to-days time))
'day))
((equal (match-string 1 ts) "+")
(let ((nshiftmax 10) (nshift 0))
(while (or (= nshift 0)
(<= (time-to-days time)
(time-to-days (current-time))))
(org-today)))
(when (= (incf nshift) nshiftmax)
(or (y-or-n-p (message "%d repeater intervals were not enough to shift date past today. Continue? " nshift))
(error "Abort")))