From c2caedcf53509987d54101f5d90d941839faae9f Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 22 Oct 2009 06:18:01 -0400 Subject: [PATCH] Use `org-scheduled-string' to find the scheduled date --- lisp/ChangeLog | 7 +++++++ lisp/org-habit.el | 2 +- lisp/org.el | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 763477fef..f7c4f496e 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,12 @@ 2009-10-22 John Wiegley + * org.el (org-get-repeat): Change so that this function can be + called with either `org-scheduled-string' or + `org-deadline-string'. + + * org-habit.el (org-habit-parse-todo): Use `org-scheduled-string' + to find the scheduled date. + * org-clock.el (org-clock-auto-clock-resolution): Renamed `org-clock-disable-clock-resolution', since negatives don't sound good in customization variables. diff --git a/lisp/org-habit.el b/lisp/org-habit.el index 6ba2097cf..d87b6adc7 100644 --- a/lisp/org-habit.el +++ b/lisp/org-habit.el @@ -159,7 +159,7 @@ This list represents a \"habit\" for the rest of this module." (if pom (goto-char pom)) (assert (org-is-habit-p (point))) (let* ((scheduled (org-get-scheduled-time (point))) - (scheduled-repeat (org-get-repeat "SCHEDULED")) + (scheduled-repeat (org-get-repeat org-scheduled-string)) (sr-days (org-habit-duration-to-days scheduled-repeat)) (end (org-entry-end-position)) closed-dates deadline dr-days) diff --git a/lisp/org.el b/lisp/org.el index 1557872ee..a29253030 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -10055,7 +10055,7 @@ Returns the new TODO keyword, or nil if no state change should occur." (save-excursion (org-back-to-heading t) (and (re-search-forward (if tagline - (concat tagline ":[^:]+" org-repeat-re) + (concat tagline "\\s-*" org-repeat-re) org-repeat-re) (org-entry-end-position) t) (match-string-no-properties 1)))))