bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#51210: Customizable other-window-for-scrolling


From: Juri Linkov
Subject: bug#51210: Customizable other-window-for-scrolling
Date: Thu, 27 Jan 2022 19:40:51 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

>> (defun beginning-of-buffer-other-window (arg)
>>   (with-selected-window (other-window-for-scrolling)
>>     ;; Set point and mark in that window's buffer.
>>     (with-no-warnings
>>       (beginning-of-buffer arg))
>>     ;; Set point accordingly.
>>     (recenter '(t))))
>> 
>> It's not clear what does the last comment mean.
>> 'recenter' should set point accordingly to what?
>> And what does (recenter '(t)) do at the beginning of the buffer?
>
> It isn't beginning of buffer, it's where (beginning-of-buffer arg)
> puts point when ARG is non-nil.  See the doc string of
> beginning-of-buffer.

Sorry, I didn't notice it takes an argument.  Then it's strange
that it doesnt't recenter according to recenter-top-bottom that
uses recenter-positions.  So two most useful behaviors
(recenter-top-bottom for beginning-of-buffer-other-window and
no recentering for end-of-buffer-other-window) are not supported.
Since the default can't be changed, maybe a new optional argument
could define whether to use recenter-top-bottom, or no recenter at all.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]