[Org] Don’t activate timers repeatedly

This approach may need to be generalized to other timers as well.  Don’t
know (yet) whether there is some predefined way in ELisp to do this.
This commit is contained in:
Daniel - 2017-12-17 10:31:17 +01:00
parent 51b72d7f5c
commit 0d67273805
Signed by: dbo
GPG Key ID: 4F63DB96D45AA9C6
1 changed files with 6 additions and 2 deletions

View File

@ -592,8 +592,12 @@ _h_ _l_ _o_k _y_ank
;; opening them manually
(mapc #'find-file-noselect org-agenda-files)
(run-with-timer 0 3600 #'org-clock-save)
(run-with-idle-timer 20 t #'db/export-diary)))
(unless (memq #'org-clock-save
(mapcar #'timer--function timer-list))
(run-with-timer 0 3600 #'org-clock-save))
(unless (memq #'db/export-diary
(mapcar #'timer--function timer-idle-list))
(run-with-idle-timer 20 t #'db/export-diary))))
(use-package db-utils
:commands (endless/fill-or-unfill