diff --git a/lisp/org.el b/lisp/org.el index bd97f2f93..38fce7054 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -13373,7 +13373,7 @@ TYPE is either `deadline' or `scheduled'. See `org-deadline' or (string-match org-repeat-re time) (match-string 1 time)) (and (org-string-nw-p old-date) - (string-match "\\([.+-]+[0-9]+ [hdwmy]\ + (string-match "\\([.+-]+[0-9]+[hdwmy]\ \\(?:[/ ][-+]?[0-9]+[hdwmy]\\)?\\)" old-date) (match-string 1 old-date))))) diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el index 7949710c6..67322a6e6 100644 --- a/testing/lisp/test-org.el +++ b/testing/lisp/test-org.el @@ -4304,7 +4304,16 @@ Paragraph" (goto-char (point-max)) (org-schedule nil "2012-03-29")) (replace-regexp-in-string - "\\( [.A-Za-z]+\\)>" "" (buffer-string) nil nil 1))))) + "\\( [.A-Za-z]+\\)>" "" (buffer-string) nil nil 1)))) + (should + ;; check if a repeater survives re-scheduling. + (string-match-p + "\\* H\nSCHEDULED: <2017-02-01 [.A-Za-z]* \\+\\+7d>\n" + (org-test-with-temp-text "* H\nSCHEDULED: <2017-01-19 ++7d>\n" + (let ((org-adapt-indentation nil) + (org-last-inserted-timestamp nil)) + (org-schedule nil "2017-02-01")) + (buffer-string))))) ;;; Property API