GNU bug report logs - #69983
Use category for display-buffer-alist

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Sun, 24 Mar 2024 17:22:01 UTC

Severity: normal

Fixed in version 30.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #149 received at 69983 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: rudalics <at> gmx.at, 69983 <at> debbugs.gnu.org
Subject: Re: bug#69983: Use category for display-buffer-alist
Date: Sun, 21 Apr 2024 09:52:50 +0300
>> +		       (when warning-display-at-bottom
>> +                         (with-selected-window window
>> +                           (set-window-point window (point-max))
>> +                           (recenter -1)))
>
> Should we perhaps do the same as end-of-buffer does, i.e.
>
> 	 (recenter (if (and scroll-minibuffer-conservatively
> 	                    (window-minibuffer-p))
> 	               -1 -3)))))

I tried many different things before reaching the 'recenter' solution.
For example, tried everything from the Info node
(info "(emacs) Auto Scrolling") such as scroll-conservatively,
scroll-step, scroll-up-aggressively/scroll-down-aggressively
to avoid recentering after scrolling.  But none of them work,
so an extra step is required to use 'recenter' after moving point.

Also too bad that need to use 'with-selected-window' instead of
'with-current-buffer', since 'recenter' has no 'window' argument.

> (or, if the window here can never be a mini-window, just use -3
> instead of -1 in the call to recenter)?

I don't understand why 'end-of-buffer' leaves 2 additional empty lines
at bottom.  Every time when I use 'M->' (end-of-buffer), I need
to type additional keys to manually scroll more 2 lines down
to remove these 2 empty lines from the screen.

Maybe 'end-of-buffer' should use -1 when 'scroll-conservatively' is set
as this FIXME comment in 'end-of-buffer' suggests:

	 ;; FIXME: Arguably if `scroll-conservatively' is set, then
         ;; we should pass -1 to `recenter'.
	 (recenter (if (and scroll-minibuffer-conservatively
	                    (window-minibuffer-p))
	               -1 -3))

Anyway, the warning buffer is as narrow as the minibuffer,
so -1 is the right value for 'display-warning'.




This bug report was last modified 1 year and 30 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.