From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Danjou Subject: [PATCH 4/4] org: use org-today in habits auto repeat Date: Mon, 29 Nov 2010 15:18:34 +0100 Message-ID: <1291040314-1884-4-git-send-email-julien@danjou.info> References: <1291040314-1884-1-git-send-email-julien@danjou.info> Return-path: Received: from [140.186.70.92] (port=55149 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PN4Yy-0007hb-82 for emacs-orgmode@gnu.org; Mon, 29 Nov 2010 09:18:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PN4Yv-0008NV-GV for emacs-orgmode@gnu.org; Mon, 29 Nov 2010 09:18:40 -0500 Received: from coquelicot-s.easter-eggs.com ([213.215.37.94]:45888) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PN4Yv-0008Mx-8E for emacs-orgmode@gnu.org; Mon, 29 Nov 2010 09:18:37 -0500 In-Reply-To: <1291040314-1884-1-git-send-email-julien@danjou.info> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Cc: Julien Danjou * org.el (org-auto-repeat-maybe): Use org-today. Signed-off-by: Julien Danjou --- lisp/org.el | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 6c4c433..7a76559 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -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"))) -- 1.7.2.3