Function: some-window

some-window is a function alias for get-window-with-predicate, defined in window.el.gz.

Signature

(some-window PREDICATE &optional MINIBUF ALL-FRAMES DEFAULT)

Documentation

Return a live window satisfying PREDICATE.

More precisely, cycle through all windows calling the function PREDICATE on each one of them with the window as its sole argument. Return the first window for which PREDICATE returns non-nil. Windows are scanned starting with the window following the selected window. If no window satisfies PREDICATE, return DEFAULT.

MINIBUF t means include the minibuffer window even if the minibuffer is not active. MINIBUF nil or omitted means include the minibuffer window only if the minibuffer is active. Any other value means do not include the minibuffer window even if the minibuffer is active.

ALL-FRAMES nil or omitted means consider all windows on the selected frame, plus the minibuffer window if specified by the MINIBUF argument. If the minibuffer counts, consider all windows on all frames that share that minibuffer too. The following non-nil values of ALL-FRAMES have special meanings:

- t means consider all windows on all existing frames.

- visible means consider all windows on all visible frames on
  the current terminal.

- 0 (the number zero) means consider all windows on all visible
  and iconified frames on the current terminal.

- A frame means consider all windows on that frame only.

Anything else means consider all windows on the selected frame and no others.

Probably introduced at or before Emacs version 30.1.

Aliases

some-window