Fix bug when using org-schedule/org-deadline on timestamps with complex repeaters.

* org.el (org-schedule, org-deadline): Fix bug: take care of
repeating timestamps like ".+1d/3d" or "+1d 10d".
This commit is contained in:
Bastien Guerry 2011-02-02 11:04:50 +01:00
parent b6efc82dd0
commit 4828e3c2d0
1 changed files with 6 additions and 2 deletions

View File

@ -11472,7 +11472,9 @@ scheduling will use the corresponding date."
(interactive "P") (interactive "P")
(let* ((old-date (org-entry-get nil "DEADLINE")) (let* ((old-date (org-entry-get nil "DEADLINE"))
(repeater (and old-date (repeater (and old-date
(string-match "\\([.+]+[0-9]+[dwmy]\\) ?" old-date) (string-match
"\\([.+]+[0-9]+[dwmy]\\(?:[/ ][-+]?[0-9]+[dwmy]\\)?\\) ?"
old-date)
(match-string 1 old-date)))) (match-string 1 old-date))))
(if remove (if remove
(progn (progn
@ -11510,7 +11512,9 @@ scheduling will use the corresponding date."
(interactive "P") (interactive "P")
(let* ((old-date (org-entry-get nil "SCHEDULED")) (let* ((old-date (org-entry-get nil "SCHEDULED"))
(repeater (and old-date (repeater (and old-date
(string-match "\\([.+]+[0-9]+[dwmy]\\) ?" old-date) (string-match
"\\([.+]+[0-9]+[dwmy]\\(?:[/ ][-+]?[0-9]+[dwmy]\\)?\\) ?"
old-date)
(match-string 1 old-date)))) (match-string 1 old-date))))
(if remove (if remove
(progn (progn