From 01d304144810bb1726f159a91b0ac39a5b0f1366 Mon Sep 17 00:00:00 2001 From: Mountain Man <43313373+MountainMan1312@users.noreply.github.com> Date: Mon, 10 Jul 2023 22:53:50 -0400 Subject: Fix save org files before updating Agenda view --- init.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index f3624f8..ff42d30 100644 --- a/init.el +++ b/init.el @@ -1094,8 +1094,13 @@ (:discard (:anything t))))))))))) ;; Save org files before updating Agenda view -(advice-add 'org-agenda-redo :before 'org-save-all-org-buffers) -(advice-add 'org-agenda-redo-all :before 'org-save-all-org-buffers) +(defun mm/org-agenda-save-all-redo-all () + "" + (interactive) + (progn + (org-save-all-org-buffers) + (org-agenda-redo-all))) +(define-key org-agenda-keymap (kbd "g") 'mm/org-agenda-save-all-redo-all) ;; Update agenda periodically every `mm/refresh-agenda-time-seconds' seconds. -- cgit v1.2.3