From 706011c3ba8b8bf292df47dbbc7da5f2a1d84aa8 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Sat, 15 Oct 2022 16:59:34 +0200 Subject: [PATCH] Do not recenter Org agenda after refreshing This advice is experimental. It should actually not move point, but after executing `org-agenda-redo-all`, point is at the first position of the buffer. Further investigation necessary. --- init.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/init.el b/init.el index fb52498..1c8cb66 100644 --- a/init.el +++ b/init.el @@ -1234,7 +1234,12 @@ respectively." (add-hook 'org-agenda-mode-hook #'hl-line-mode 'append) (advice-add 'org-agenda - :before #'db/check-special-org-files-in-agenda))) + :before #'db/check-special-org-files-in-agenda) + + (define-advice org-agenda-redo-all (:around (old-func &rest r) goto-top-and-execute) + (save-mark-and-excursion + (goto-char (point-min)) + (apply old-func r))))) ;; Capturing