summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2010-12-04 00:23:30 +0100
committerCarsten Dominik <carsten.dominik@gmail.com>2010-12-04 00:23:30 +0100
commit8cdd4ff98af1a46de23c778faad8b30ca55ac825 (patch)
tree4d2b08e2040ad96fd5cca4e35765c4ba693cfb71
parent238c815502e80db51b06573fd97a9bb741c4dfe2 (diff)
downloadorg-mode-8cdd4ff98af1a46de23c778faad8b30ca55ac825.tar.gz
Revert "org-habit: Use org-today."
This reverts commit 1dcb374f48688621b076a8668f6828748eed95ed.
-rw-r--r--lisp/org-habit.el10
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/org-habit.el b/lisp/org-habit.el
index 04a2328..394b4fb 100644
--- a/lisp/org-habit.el
+++ b/lisp/org-habit.el
@@ -197,7 +197,10 @@ This list represents a \"habit\" for the rest of this module."
"Determine the relative priority of a habit.
This must take into account not just urgency, but consistency as well."
(let ((pri 1000)
- (now (if moment (time-to-days moment) (org-today)))
+ (now (time-to-days
+ (or moment
+ (time-subtract (current-time)
+ (list 0 (* 3600 org-extend-today-until) 0)))))
(scheduled (org-habit-scheduled habit))
(deadline (org-habit-deadline habit)))
;; add 10 for every day past the scheduled date, and subtract for every
@@ -237,7 +240,7 @@ Habits are assigned colors on the following basis:
(deadline (if scheduled-days
(+ scheduled-days (- d-repeat s-repeat))
(org-habit-deadline habit)))
- (m-days (or now-days (org-today))))
+ (m-days (or now-days (time-to-days (current-time)))))
(cond
((< m-days scheduled)
'(org-habit-clear-face . org-habit-clear-future-face))
@@ -316,7 +319,8 @@ current time."
"Insert consistency graph for any habitual tasks."
(let ((inhibit-read-only t) l c
(buffer-invisibility-spec '(org-link))
- (moment (days-to-time (org-today))))
+ (moment (time-subtract (current-time)
+ (list 0 (* 3600 org-extend-today-until) 0))))
(save-excursion
(goto-char (if line (point-at-bol) (point-min)))
(while (not (eobp))