diff options
-rw-r--r-- | init.el | 30 |
1 files changed, 15 insertions, 15 deletions
@@ -1000,21 +1000,21 @@ | |||
1000 | 1000 | ||
1001 | ;; Update agenda periodically every `mm/refresh-agenda-time-seconds' seconds. | 1001 | ;; Update agenda periodically every `mm/refresh-agenda-time-seconds' seconds. |
1002 | ;; This was taken from https://emacs.stackexchange.com/a/68767/38877 | 1002 | ;; This was taken from https://emacs.stackexchange.com/a/68767/38877 |
1003 | (defvar mm/refresh-agenda-time-seconds 15) | 1003 | ;; (defvar mm/refresh-agenda-time-seconds 15) |
1004 | (defvar mm/refresh-agenda-timer nil | 1004 | ;; (defvar mm/refresh-agenda-timer nil |
1005 | "Timer for `mm/refresh-agenda-timer-function' to reschedule itself, or NIL.") | 1005 | ;; "Timer for `mm/refresh-agenda-timer-function' to reschedule itself, or NIL.") |
1006 | (defun mm/refresh-agenda-timer-function () | 1006 | ;; (defun mm/refresh-agenda-timer-function () |
1007 | "If the user types a command while `mm/refresh-agenda-timer' is active, the next time this function is called from it's main idle timer, deactivate `mm/refresh-agenda-timer'." | 1007 | ;; "If the user types a command while `mm/refresh-agenda-timer' is active, the next time this function is called from it's main idle timer, deactivate `mm/refresh-agenda-timer'." |
1008 | (when mm/refresh-agenda-timer | 1008 | ;; (when mm/refresh-agenda-timer |
1009 | (cancel-timer mm/refresh-agenda-timer)) | 1009 | ;; (cancel-timer mm/refresh-agenda-timer)) |
1010 | ;;(lambda () (save-window-excursion (org-agenda nil "a"))) | 1010 | ;; (lambda () (save-window-excursion (org-agenda nil "a"))) |
1011 | (save-window-excursion (org-agenda nil "a")) | 1011 | ;; (save-window-excursion (org-agenda nil "a")) |
1012 | (setq mm/refresh-agenda-timer | 1012 | ;; (setq mm/refresh-agenda-timer |
1013 | (run-with-idle-timer | 1013 | ;; (run-with-idle-timer |
1014 | (time-add (current-idle-time) mm/refresh-agenda-time-seconds) | 1014 | ;; (time-add (current-idle-time) mm/refresh-agenda-time-seconds) |
1015 | nil | 1015 | ;; nil |
1016 | 'mm/refresh-agenda-timer-function))) | 1016 | ;; 'mm/refresh-agenda-timer-function))) |
1017 | (run-with-idle-timer mm/refresh-agenda-time-seconds t 'mm/refresh-agenda-timer-function) | 1017 | ;; (run-with-idle-timer mm/refresh-agenda-time-seconds t 'mm/refresh-agenda-timer-function) |
1018 | 1018 | ||
1019 | 1019 | ||
1020 | 1020 | ||