summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2019-01-30 22:36:14 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2019-01-30 22:36:14 +0100
commitee29cdc40ef7b17c548ce153eae8c88971cb857a (patch)
tree1158253b0ce282efb90a7691857fcecfc3aa6040
parent8ba23b9ce18d947a0241017ff33015a7807f615d (diff)
parenta6adc9831ddad55a6c6a6779fede7a65d5c80168 (diff)
downloadorg-mode-ee29cdc40ef7b17c548ce153eae8c88971cb857a.tar.gz
Merge branch 'maint'
-rw-r--r--lisp/org.el8
-rw-r--r--testing/lisp/test-org.el4
2 files changed, 9 insertions, 3 deletions
diff --git a/lisp/org.el b/lisp/org.el
index 13ad44b..e009cb6 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -672,7 +672,7 @@ on a string that terminates immediately after the date.")
The time stamps may be either active or inactive.")
(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]\\)?\\)"
"Regular expression for specifying repeated events.
After a match, group 1 contains the repeat expression.")
@@ -3005,6 +3005,11 @@ property to one or more of these keywords."
(const :tag "Force recording the DONE state" time)
(const :tag "Force recording a note with the DONE state" note)))
+(defcustom org-todo-repeat-hook nil
+ "Hook that is run after a task has been repeated."
+ :package-version '(Org . "9.2")
+ :group 'org-todo
+ :type 'hook)
(defgroup org-priorities nil
"Priorities in Org mode."
@@ -12758,6 +12763,7 @@ enough to shift date past today. Continue? "
(org-timestamp-change n (cdr (assoc what whata)) nil t))
(setq msg
(concat msg type " " org-last-changed-timestamp " ")))))))
+ (run-hooks 'org-todo-repeat-hook)
(setq org-log-post-message msg)
(message msg))))
diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el
index db34a03..02b0257 100644
--- a/testing/lisp/test-org.el
+++ b/testing/lisp/test-org.el
@@ -6650,8 +6650,8 @@ Paragraph<point>"
(org-test-with-temp-text "* TODO H\n<2012-03-29 Thu +2h>"
(org-todo "DONE")
(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
"\\[2014-03-29 .* \\+2y\\]"
(let ((org-todo-keywords '((sequence "TODO" "DONE"))))