# HG changeset patch # User Carsten Dominik # Date 1210000189 0 # Node ID 807232a69d3cf7d24f5e5a166febf06ab3e6d993 # Parent 3b07f13dc7998cbe05235e90a6664702771a6fed 2008-05-05 Carsten Dominik * textmodes/org.el (org-read-date-get-relative): Interpret lone weekday abbreviation as relative to today. diff -r 3b07f13dc799 -r 807232a69d3c lisp/textmodes/org.el --- a/lisp/textmodes/org.el Mon May 05 15:09:21 2008 +0000 +++ b/lisp/textmodes/org.el Mon May 05 15:09:49 2008 +0000 @@ -18060,13 +18060,15 @@ 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)))))