浏览代码

Revert actionable repeaters in inactive timestamps

* lisp/org.el (org-repeat-re): Repeaters are for active timestamps
  only.
* testing/lisp/test-org.el (test-org/auto-repeat-maybe): Update test.

Reported-by: cesar mena <cesar.mena@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2019-01/msg00095.html>
Nicolas Goaziou 6 年之前
父节点
当前提交
5e47e49832
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 1 1
      lisp/org.el
  2. 2 2
      testing/lisp/test-org.el

+ 1 - 1
lisp/org.el

@@ -675,7 +675,7 @@ on a string that terminates immediately after the date.")
 The time stamps may be either active or inactive.")
 The time stamps may be either active or inactive.")
 
 
 (defconst org-repeat-re
 (defconst org-repeat-re
-  "[[<][0-9]\\{4\\}-[0-9][0-9]-[0-9][0-9] [^]>\n]*?\
+  "<[0-9]\\{4\\}-[0-9][0-9]-[0-9][0-9] [^>\n]*?\
 \\([.+]?\\+[0-9]+[hdwmy]\\(/[0-9]+[hdwmy]\\)?\\)"
 \\([.+]?\\+[0-9]+[hdwmy]\\(/[0-9]+[hdwmy]\\)?\\)"
   "Regular expression for specifying repeated events.
   "Regular expression for specifying repeated events.
 After a match, group 1 contains the repeat expression.")
 After a match, group 1 contains the repeat expression.")

+ 2 - 2
testing/lisp/test-org.el

@@ -6638,8 +6638,8 @@ Paragraph<point>"
      (org-test-with-temp-text "* TODO H\n<2012-03-29 Thu +2h>"
      (org-test-with-temp-text "* TODO H\n<2012-03-29 Thu +2h>"
        (org-todo "DONE")
        (org-todo "DONE")
        (buffer-string))))
        (buffer-string))))
-  ;; Also repeat inactive time stamps with a repeater.
-  (should
+  ;; Do not repeat inactive time stamps with a repeater.
+  (should-not
    (string-match-p
    (string-match-p
     "\\[2014-03-29 .* \\+2y\\]"
     "\\[2014-03-29 .* \\+2y\\]"
     (let ((org-todo-keywords '((sequence "TODO" "DONE"))))
     (let ((org-todo-keywords '((sequence "TODO" "DONE"))))