From 3a4eb4837aecd924a355645473d8d335dfec6caa Mon Sep 17 00:00:00 2001 Message-ID: <3a4eb4837aecd924a355645473d8d335dfec6caa.1736668180.git.yantar92@posteo.net> From: Ihor Radchenko Date: Sat, 11 Jan 2025 15:33:31 +0100 Subject: [PATCH v2] org-agenda-later: Avoid scrolling the window past point * lisp/org-agenda.el (org-agenda-later): When previous agenda buffer is larger and its scroll position puts point outside the screen, do not try to restore scroll state. (Doing otherwise, scrolls past the point, leading to unpredictable results - depending on `scroll-conservatively'. Reported-by: Michael Heerdegen Link: https://orgmode.org/list/87ttadqati.fsf@web.de --- lisp/org-agenda.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 884b9de782..8143fd97a7 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -8789,7 +8789,7 @@ (defun org-agenda-later (arg) (list (car args) sd span))) (org-agenda-redo) (org-agenda-find-same-or-today-or-agenda cnt)) - (set-window-start nil wstart))) + (set-window-start nil wstart 'noforce))) (defun org-agenda-earlier (arg) "Go backward in time by the current span in the agenda buffer. -- 2.47.1