From d4536ff2572931b105198a85a452a777d6d3a1ff Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Sat, 13 Nov 2021 18:33:17 +0000 Subject: [PATCH 1/2] Fix follow-scroll-down in a small buffer which starts slightly scrolled This fixes bug #51814. * lisp/follow.el (follow-scroll-down): Do away with the optimization of doing vertical-motion over only one window. Instead move over all windows, to checck for being close to point-min, and setting point accordingly. --- lisp/follow.el | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/lisp/follow.el b/lisp/follow.el index 2ca2c1f17ba..3761275bbf6 100644 --- a/lisp/follow.el +++ b/lisp/follow.el @@ -669,24 +669,30 @@ Works like `scroll-down' when not in Follow mode." (t (let* ((orig-point (point)) (windows (follow-all-followers)) - (win (car (reverse windows))) - (start (window-start (car windows)))) + (start (window-start (car windows))) + (lines 0)) (if (eq start (point-min)) (if (or (null scroll-error-top-bottom) (bobp)) (signal 'beginning-of-buffer nil) (goto-char (point-min))) - (select-window win) - (goto-char start) - (vertical-motion (- (- (window-height win) - (if header-line-format 2 1) ; always mode-line - (if tab-line-format 1 0) - next-screen-context-lines))) - (set-window-start win (point)) - (if (< orig-point (window-end win t)) - (goto-char orig-point) - (goto-char start) - (vertical-motion (- next-screen-context-lines 1))) + (select-window (car windows)) + (dolist (win windows) + (setq lines + (+ lines + (- (window-height win) + (if header-line-format 2 1) ; Count mode-line, too. + (if tab-line-format 1 0))))) + (setq lines (- lines next-screen-context-lines)) + (goto-char start) + (let ((at-top (> (vertical-motion (- lines)) (- lines)))) + (set-window-start (car windows) (point)) + (if at-top + (goto-char orig-point) + (goto-char start) + (vertical-motion (- next-screen-context-lines 1)) + (if (< orig-point (point)) + (goto-char orig-point)))) (setq follow-internal-force-redisplay t)))))) (put 'follow-scroll-down 'scroll-command t) From 5dbad52cbfa81585111edd67631af632ac13fdea Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sun, 14 Nov 2021 04:54:40 +0100 Subject: [PATCH 2/2] gnus-summary-line-format doc string clarification * lisp/gnus/gnus.el (gnus-summary-line-format): Clarify the Date part of the doc string (bug#51823). --- lisp/gnus/gnus.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index f558360361d..1d19a2ac565 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el @@ -2717,7 +2717,7 @@ with some simple extensions. %F Contents of the From: header (string) %f Contents of the From: or To: headers (string) %x Contents of the Xref: header (string) -%D Date of the article (string) +%D Contents of the Date: header article (string) %d Date of the article (string) in DD-MMM format %o Date of the article (string) in YYYYMMDD`T'HHMMSS format