Browse Source

Deadlines: Deal with "incorrect" positioning of warning period

Carsten Dominik 16 years ago
parent
commit
18a07a276d
3 changed files with 11 additions and 6 deletions
  1. 5 5
      doc/org.texi
  2. 5 0
      lisp/ChangeLog
  3. 1 1
      lisp/org.el

+ 5 - 5
doc/org.texi

@@ -5020,11 +5020,11 @@ or plain time stamp.  In the following example
 ** TODO Pay the rent
    DEADLINE: <2005-10-01 Sat +1m>
 @end example
-the @code{+1m} is a repeater; the intended interpretation is that the
-task has a deadline on <2005-10-01> and repeats itself every (one) month
-starting from that time.  If you need both a repeater and a special
-warning period in a deadline entry, the repeater comes first and the
-warning period last: @code{DEADLINE: <2005-10-01 Sat +1m -3d>}.
+the @code{+1m} is a repeater; the intended interpretation is that the task
+has a deadline on <2005-10-01> and repeats itself every (one) month starting
+from that time.  If you need both a repeater and a special warning period in
+a deadline entry, the repeater should come first and the warning period last:
+@code{DEADLINE: <2005-10-01 Sat +1m -3d>}.
 
 Deadlines and scheduled items produce entries in the agenda when they
 are over-due, so it is important to be able to mark such an entry as

+ 5 - 0
lisp/ChangeLog

@@ -1,3 +1,8 @@
+2009-02-18  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* org.el (org-get-wdays): Find the warning period also if it is in
+	the wrong place.
+
 2009-02-17  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org.el (org-olpath-completing-read): Never use ido for this

+ 1 - 1
lisp/org.el

@@ -11779,7 +11779,7 @@ Don't touch the rest."
    ((<= org-deadline-warning-days 0)
     ;; 0 or negative, enforce this value no matter what
     (- org-deadline-warning-days))
-   ((string-match "-\\([0-9]+\\)\\([dwmy]\\)\\(\\'\\|>\\)" ts)
+   ((string-match "-\\([0-9]+\\)\\([dwmy]\\)\\(\\'\\|>\\| \\)" ts)
     ;; lead time is specified.
     (floor (* (string-to-number (match-string 1 ts))
 	      (cdr (assoc (match-string 2 ts)