diff options
| author | Mountain Man <43313373+MountainMan1312@users.noreply.github.com> | 2023-06-15 23:37:33 -0400 |
|---|---|---|
| committer | Mountain Man <43313373+MountainMan1312@users.noreply.github.com> | 2023-06-15 23:37:33 -0400 |
| commit | 9137ad6ae7d289d0d9fae81034187c303c343b35 (patch) | |
| tree | 1447d471e07385f3cda3a4cb47760f40597ee7fd | |
| parent | Remove unneccessary time-grid entries from agenda (diff) | |
| download | mmosmacs-9137ad6ae7d289d0d9fae81034187c303c343b35.tar.gz mmosmacs-9137ad6ae7d289d0d9fae81034187c303c343b35.tar.bz2 mmosmacs-9137ad6ae7d289d0d9fae81034187c303c343b35.zip | |
Disable auto-update agenda
| -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 | ||