unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Improve other-window-for-scrolling documentation
@ 2024-03-25  1:13 Karthik Chikmagalur
  2024-03-25 13:13 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Karthik Chikmagalur @ 2024-03-25  1:13 UTC (permalink / raw)
  To: emacs-devel

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,
Karthik



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Improve other-window-for-scrolling documentation
  2024-03-25  1:13 Improve other-window-for-scrolling documentation Karthik Chikmagalur
@ 2024-03-25 13:13 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2024-03-25 13:13 UTC (permalink / raw)
  To: Karthik Chikmagalur; +Cc: emacs-devel

> 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.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-25 13:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-25  1:13 Improve other-window-for-scrolling documentation Karthik Chikmagalur
2024-03-25 13:13 ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).