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.
This commit is contained in:
parent
548ba2c61b
commit
4997f21bec
9
init.el
9
init.el
|
@ -1234,7 +1234,14 @@ 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)
|
||||
"Avoid recentering the Org agenda buffer after redo by moving
|
||||
point to the beginning of buffer first."
|
||||
(save-mark-and-excursion
|
||||
(goto-char (point-min))
|
||||
(apply old-func r)))))
|
||||
|
||||
;; Capturing
|
||||
|
||||
|
|
Loading…
Reference in New Issue