From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Improve other-window-for-scrolling documentation Date: Mon, 25 Mar 2024 15:13:55 +0200 Message-ID: <86le66jvxo.fsf@gnu.org> References: <87il1b2jxd.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34471"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Karthik Chikmagalur Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Mar 25 14:14:57 2024 Return-path: Envelope-to: ged-emacs-devel@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 ) id 1rokAD-0008ka-Si for ged-emacs-devel@m.gmane-mx.org; Mon, 25 Mar 2024 14:14:57 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rok9K-0005JZ-Js; Mon, 25 Mar 2024 09:14:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rok9I-0005IJ-La for emacs-devel@gnu.org; Mon, 25 Mar 2024 09:14:01 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rok9I-0003py-Cq; Mon, 25 Mar 2024 09:14:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=ObeqWsVznMxlVLXahDQuRMG7X6QWvz/i4e08cCLxqjA=; b=hYWseUgjcX8Mo6YB1Vhi Mu3xQza/HgNc/m0R4uSku97LJJ8Mg0WgdfWoicPicUdZ8JczepoE63XvPhwtzyvH/oQM4mBvwLXAG 6FBL9EacsvfHMdOklCtIbfIo1etECR1UZYUixYXktW6xrxuI8Qby7pAfridKM9xtUBYYcDLaIC2fq 65BVxlHZ6EjaCYcMOObqy3ywOSKcEPuGwCEn/gxq572rvGrc08Ylu+PpzPIX67CSRXFhmR94d9WTF G84MvcvR/cQX1Poex4bAFzFIWngTX7H2uSwNU126qJkzD9oHBQY4X5WGeyQwUaT5Ops70Xjxo4vAe 4xEZ+gz4azus+A==; In-Reply-To: <87il1b2jxd.fsf@gmail.com> (message from Karthik Chikmagalur on Sun, 24 Mar 2024 18:13:02 -0700) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:317279 Archived-At: > From: Karthik Chikmagalur > Date: Sun, 24 Mar 2024 18:13:02 -0700 > > On Emacs 29.2: The documentation of other-window-for-scrolling makes no > mention of other-window-scroll-default. Additionally, it is also > confusing. Reproduced here: > > Return the other window for "other window scroll" commands. > If in the minibuffer, ‘minibuffer-scroll-window’ if non-nil > specifies the window. > Otherwise, if ‘other-window-scroll-buffer’ is non-nil, a window > showing that buffer is used, popping the buffer up if necessary. > Finally, look for a neighboring window on the selected frame, > followed by all visible frames on the current terminal. > > Looking at the source in src/window.c, the actual logic is as follows: > > 1. If in the minibuffer and minibuffer-scroll-window is non-nil, return > it. > 2. If other-window-scroll-buffer is set to a live buffer, return it. > 3. If other-window-scroll-default is set to a function, return the > result of calling it. > 4. Otherwise, return a neighboring window on the same frame (if > possible). > 5. Otherwise, resturn a window on another visible frame in the current > terminal (if possible). > 6. Otherwise raise an error. > > Based on this, I suggest the following documentation: > > Return the other window for "other window scroll" commands. > If in the minibuffer, `minibuffer-scroll-window' if non-nil > specifies the window. > Otherwise, if `other-window-scroll-buffer' is non-nil, a window > showing that buffer is used, popping the buffer up if necessary. > Otherwise, if `other-window-scroll-default' is set to a function, > return the result of calling it. > Finally, look for a neighboring window on the selected frame, > followed by all visible frames on the current terminal. Thanks, I made a similar change on the emacs-29 branch.