From 0d672738050bf6720ff31665e21adde3b667aa42 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Sun, 17 Dec 2017 10:31:17 +0100 Subject: [PATCH] =?UTF-8?q?[Org]=20Don=E2=80=99t=20activate=20timers=20rep?= =?UTF-8?q?eatedly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- init.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/init.el b/init.el index 8a40692..ef02e10 100644 --- a/init.el +++ b/init.el @@ -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