emacs-devel
[Top][All Lists]
Advanced

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

Re: Improve other-window-for-scrolling documentation


From: Eli Zaretskii
Subject: Re: Improve other-window-for-scrolling documentation
Date: Mon, 25 Mar 2024 15:13:55 +0200

> From: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
> 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.



reply via email to

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