Browse Source

Explicitly use `current-time' to set 'LAST_REPEAT'

* lisp/org.el (org-auto-repeat-maybe): Explicitly use `current-time'
  to set LAST_REPEAT.  The behavior of the function remains the same.

This allows to advice current-time to use a different time.  Which
might help with testing and with functions which bend the time.
Marco Wahl 8 years ago
parent
commit
50a53b3f2c
1 changed files with 2 additions and 1 deletions
  1. 2 1
      lisp/org.el

+ 2 - 1
lisp/org.el

@@ -13235,7 +13235,8 @@ This function is run automatically after each state change to a DONE state."
 	(org-todo to-state))
       (when (or org-log-repeat (org-entry-get nil "CLOCK"))
 	(org-entry-put nil "LAST_REPEAT" (format-time-string
-					  (org-time-stamp-format t t))))
+					  (org-time-stamp-format t t)
+					  (current-time))))
       (when org-log-repeat
 	(if (or (memq 'org-add-log-note (default-value 'post-command-hook))
 		(memq 'org-add-log-note post-command-hook))