From 164d30f5abf8d80c9a6960acdbcb9d56bd9df009 Mon Sep 17 00:00:00 2001 From: Bastien Date: Wed, 5 Feb 2020 09:10:40 +0100 Subject: [PATCH] org-agenda.el: Fix call to `recenter' * lisp/org-agenda.el (org-agenda-list): Fix call to `recenter' when `org-agenda-buffer-name' is not known. --- 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 4fef62d69..692703c63 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -4373,7 +4373,7 @@ items if they have an hour specification like [h]h:mm." (insert tbl))) (goto-char (point-min)) (or org-agenda-multi (org-agenda-fit-window-to-buffer)) - (unless (or (not (get-buffer-window)) + (unless (or (not (get-buffer-window org-agenda-buffer-name)) (and (pos-visible-in-window-p (point-min)) (pos-visible-in-window-p (point-max)))) (goto-char (1- (point-max)))