From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Juri Linkov <juri@linkov.net>
Newsgroups: gmane.emacs.bugs
Subject: bug#51210: Customizable other-window-for-scrolling
Date: Sat, 29 Jan 2022 20:53:54 +0200
Organization: LINKOV.NET
Message-ID: <861r0qpf1p.fsf@mail.linkov.net>
References: <878ryvh6bz.fsf@mail.linkov.net>
 <96d50c26-ea56-5ff6-3cc3-25652d744ca4@gmx.at>
 <86o84revzi.fsf@mail.linkov.net>
 <f43796a2-6cbb-ea66-6ecd-8979ba0a6f7e@gmx.at>
 <86y23vo0zx.fsf@mail.linkov.net> <86sftunptq.fsf@mail.linkov.net>
 <86a6g2ktel.fsf@mail.linkov.net> <86mtk2jdwy.fsf@mail.linkov.net>
 <83czky6noe.fsf@gnu.org> <86r19crftb.fsf@mail.linkov.net>
 <8335ls69cy.fsf@gnu.org> <86y23kpwlf.fsf@mail.linkov.net>
 <83zgo04trm.fsf@gnu.org> <86zgo0ohci.fsf@mail.linkov.net>
 <83tue84rgs.fsf@gnu.org> <86pmoqycnf.fsf@mail.linkov.net>
 <83tue2wnhq.fsf@gnu.org> <86tudsx6nc.fsf@mail.linkov.net>
 <8335lckj1b.fsf@gnu.org> <86tudp6pr0.fsf@mail.linkov.net>
 <83k0ekc6ty.fsf@gnu.org>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="19559"; mail-complaints-to="usenet@ciao.gmane.io"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)
Cc: 51210@debbugs.gnu.org
To: Eli Zaretskii <eliz@gnu.org>
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 29 19:57:03 2022
Return-path: <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>
Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org
Original-Received: from lists.gnu.org ([209.51.188.17])
	by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
	(Exim 4.92)
	(envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>)
	id 1nDsuE-0004xJ-86
	for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 29 Jan 2022 19:57:02 +0100
Original-Received: from localhost ([::1]:37560 helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>)
	id 1nDsuC-0003iY-Kp
	for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 29 Jan 2022 13:57:00 -0500
Original-Received: from eggs.gnu.org ([209.51.188.92]:34610)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1nDssK-0003bA-6c
 for bug-gnu-emacs@gnu.org; Sat, 29 Jan 2022 13:55:04 -0500
Original-Received: from debbugs.gnu.org ([209.51.188.43]:41911)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1nDssI-00043B-EC
 for bug-gnu-emacs@gnu.org; Sat, 29 Jan 2022 13:55:03 -0500
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1nDssI-0004qN-9W
 for bug-gnu-emacs@gnu.org; Sat, 29 Jan 2022 13:55:02 -0500
X-Loop: help-debbugs@gnu.org
Resent-From: Juri Linkov <juri@linkov.net>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Sat, 29 Jan 2022 18:55:02 +0000
Resent-Message-ID: <handler.51210.B51210.164348249518594@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 51210
X-GNU-PR-Package: emacs
Original-Received: via spool by 51210-submit@debbugs.gnu.org id=B51210.164348249518594
 (code B ref 51210); Sat, 29 Jan 2022 18:55:02 +0000
Original-Received: (at 51210) by debbugs.gnu.org; 29 Jan 2022 18:54:55 +0000
Original-Received: from localhost ([127.0.0.1]:34813 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1nDssB-0004pq-3J
 for submit@debbugs.gnu.org; Sat, 29 Jan 2022 13:54:55 -0500
Original-Received: from relay5-d.mail.gandi.net ([217.70.183.197]:60053)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@linkov.net>) id 1nDss8-0004pI-EB
 for 51210@debbugs.gnu.org; Sat, 29 Jan 2022 13:54:53 -0500
Original-Received: (Authenticated sender: juri@linkov.net)
 by mail.gandi.net (Postfix) with ESMTPSA id 2B3A71C0004;
 Sat, 29 Jan 2022 18:54:44 +0000 (UTC)
In-Reply-To: <83k0ekc6ty.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 28 Jan
 2022 15:45:13 +0200")
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
X-BeenThere: bug-gnu-emacs@gnu.org
List-Id: "Bug reports for GNU Emacs,
 the Swiss army knife of text editors" <bug-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/bug-gnu-emacs>
List-Post: <mailto:bug-gnu-emacs@gnu.org>
List-Help: <mailto:bug-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=subscribe>
Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org
Original-Sender: "bug-gnu-emacs"
 <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>
Xref: news.gmane.io gmane.emacs.bugs:225555
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/225555>

>> 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.
>
> I don't mind having a new option, but is recenter-positions really
> relevant to beginning-of-buffer-other-window? why would users want to
> have beginning-of-buffer-other-window recenter in non-default ways,
> just because they customized recenter-positions?

beginning/end-of-buffer-other-window looked like abandoned commands,
so I thought they might need more work.  But since they will keep
the current behavior, it's much easier to customize them with advice:

  (advice-add 'beginning-of-buffer-other-window :after
              (lambda (&rest _args)
                (with-selected-window (other-window-for-scrolling)
                  (recenter-top-bottom))))

  (advice-add 'end-of-buffer-other-window :after
              (lambda (&rest _args)
                (with-selected-window (other-window-for-scrolling)
                  (recenter -1))))

Anyway, the objective of this request was completed, so it's already closed.