From 9a444934925d45cf929aaf8e156b4fb2a3f65fa6 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Fri, 28 Mar 2008 19:52:42 +0100 Subject: [PATCH] Fixed bug related to repeating time stamps. There was a problem that due dates in the past would not be advanced property (reported by Wanrong Lin) --- ChangeLog | 4 ++++ lisp/org.el | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6481676d7..b12216b1d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-03-28 Carsten Dominik + * lisp/org.el (org-auto-repeat-maybe): Make sure that repeating + dates are pushed into the future, and that the shift is at least + one interval, never 0. + * lisp/org-agenda.el (org-agenda-deadline-leaders): Allow a function value for the deadline leader. (org-agenda-get-deadlines): Deal with new function value. diff --git a/lisp/org.el b/lisp/org.el index 98bb2a9bb..92dad4b7d 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -8706,12 +8706,12 @@ This function is run automatically after each state change to a DONE state." (- (time-to-days (current-time)) (time-to-days time)) 'day)) ((equal (match-string 1 ts) "+") - (while (< (time-to-days time) (time-to-days (current-time))) + (while (or (= nshift 0) + (<= (time-to-days time) (time-to-days (current-time)))) (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"))) (org-timestamp-change n (cdr (assoc what whata))) - (sit-for .0001) ;; so we can watch the date shifting (org-at-timestamp-p t) (setq ts (match-string 1)) (setq time (save-match-data (org-time-string-to-time ts)))) -- 2.11.4.GIT