emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Julien Danjou <julien@danjou.info>
To: emacs-orgmode@gnu.org
Cc: Julien Danjou <julien@danjou.info>
Subject: [PATCH 4/4] org: use org-today in habits auto repeat
Date: Mon, 29 Nov 2010 15:18:34 +0100	[thread overview]
Message-ID: <1291040314-1884-4-git-send-email-julien@danjou.info> (raw)
In-Reply-To: <1291040314-1884-1-git-send-email-julien@danjou.info>

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

Signed-off-by: Julien Danjou <julien@danjou.info>
---
 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

  parent reply	other threads:[~2010-11-29 14:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-29 14:18 [PATCH 1/4] Rename org-agenda-today to org-today Julien Danjou
2010-11-29 14:18 ` [PATCH 2/4] org-habit: Use org-today Julien Danjou
2010-11-30 23:49   ` [Accepted] [Orgmode,2/4] " Carsten Dominik
2010-11-29 14:18 ` [PATCH 3/4] org-capture: use org-today Julien Danjou
2010-11-30 23:50   ` [Accepted] [Orgmode,3/4] " Carsten Dominik
2010-11-29 14:18 ` Julien Danjou [this message]
2010-11-30 23:49   ` [Accepted] [Orgmode, 4/4] org: use org-today in habits auto repeat Carsten Dominik
2010-11-30  6:27 ` [PATCH 1/4] Rename org-agenda-today to org-today Carsten Dominik
2010-11-30  9:06   ` Julien Danjou
2010-11-30 23:50     ` Carsten Dominik
2010-12-01 13:26     ` Bernt Hansen
2010-11-30 23:48 ` [Accepted] [Orgmode, " Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1291040314-1884-4-git-send-email-julien@danjou.info \
    --to=julien@danjou.info \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).