From b4f131e6adb1fab375f68447fa9bf9ecd1a5ab84 Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Tue, 10 Mar 2020 10:43:18 -0400 Subject: [PATCH] Only automatically fetch from org-gcal on startup --- emacs/init.org | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/emacs/init.org b/emacs/init.org index bb39c28..99db646 100755 --- a/emacs/init.org +++ b/emacs/init.org @@ -1854,14 +1854,15 @@ Integrate Google calendar with org-mode: ("lut2o2moohg6qkdsto1qfq7th4@group.calendar.google.com" . ,(get-calendar-file "j-n-gcal.org"))) org-gcal-notify-p nil)) - (add-hook 'org-agenda-mode-hook #'org-gcal-fetch) + (add-hook 'emacs-startup-hook #'org-gcal-fetch) (defun org-agenda-redo-and-fetch-gcal (&optional all) (interactive "P") (let ((cb (if all #'org-agenda-redo-all #'org-agenda-redo))) (deferred:nextc (org-gcal-fetch) cb))) - (general-def '(normal motion) org-agenda-mode-map "gr" #'org-agenda-redo-and-fetch-gcal) + (with-eval-after-load 'org-agenda + (general-def '(normal motion) org-agenda-mode-map "gR" #'org-agenda-redo-and-fetch-gcal)) #+END_SRC ** Utilities