Browse Source

Add new `org-todo-repeat-hook'

* lisp/org.el (org-todo-repeat-hook): New variable.
(org-auto-repeat-maybe): Use it.

See <http://lists.gnu.org/r/emacs-orgmode/2019-01/msg00102.html>.
Nicolas Goaziou 9 months ago
parent
commit
a6adc9831d
1 changed files with 6 additions and 0 deletions
  1. 6 0
      lisp/org.el

+ 6 - 0
lisp/org.el

@@ -3133,6 +3133,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."
@@ -12876,6 +12881,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))))