diff options
-rw-r--r-- | lisp/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/org/org.el | 16 |
2 files changed, 14 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 68105177dd..722184d512 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2008-05-08 Carsten Dominik <[email protected]> + + * org/org.el (org-read-date-get-relative): Interpret lone + weekday abbreviation as relative to today. + 2008-05-08 Juanma Barranquero <[email protected]> * abbrev.el (define-abbrev-table): diff --git a/lisp/org/org.el b/lisp/org/org.el index c37fc846ac..d2b411d9a7 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -10311,13 +10311,15 @@ WHAT is \"d\", \"w\", \"m\", or \"y\" for day, week, month, year. N is the number of WHATs to shift. DEF-FLAG is t when a double ++ or -- indicates shift relative to the DEFAULT date rather than TODAY." - (when (string-match - (concat - "\\`[ \t]*\\([-+]\\{1,2\\}\\)" - "\\([0-9]+\\)?" - "\\([dwmy]\\|\\(" (mapconcat 'car parse-time-weekdays "\\|") "\\)\\)?" - "\\([ \t]\\|$\\)") s) - (let* ((dir (if (match-end 1) + (when (and + (string-match + (concat + "\\`[ \t]*\\([-+]\\{0,2\\}\\)" + "\\([0-9]+\\)?" + "\\([dwmy]\\|\\(" (mapconcat 'car parse-time-weekdays "\\|") "\\)\\)?" + "\\([ \t]\\|$\\)") s) + (or (> (match-end 1) (match-beginning 1)) (match-end 4))) + (let* ((dir (if (> (match-end 1) (match-beginning 1)) (string-to-char (substring (match-string 1 s) -1)) ?+)) (rel (and (match-end 1) (= 2 (- (match-end 1) (match-beginning 1))))) |