emacs-devel
[Top][All Lists]
Advanced

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

Re: Make window-list return windows for all frames


From: Gregory Heytings
Subject: Re: Make window-list return windows for all frames
Date: Thu, 15 Jun 2023 14:19:41 +0000


I was a bit surprised to discover there is no built-in option in window-list or elsewhere as far as I can see to get all windows for all frames,

Doesn't (window-list-1 nil nil t) do what you want?

Indeed it does, I was a bit blind there. I usually consider those functions with names ending in -1 as internal to implementation, so I haven't even looked there, so I missed that one is actually exposed to lisp.

Now question is, as pointed in answer to Eli, why should window-list not have same semantics as the rest, since both get-buffer-window, and window-list-1, it makes the API a bit assymetric and arcane, when its already there and costs basically nothing.


My understanding is that window-list considers windows on a given frame, and window-list-1 considers windows on all frames (unless it is asked to consider only a given frame).

If you want to allow the argument t to window-list to mean "all frames", you probably also want to allow the symbol 'visible and the number 0, which are accepted by window-list-1... and in that case window-list and window-list-1 become basically the same function.




reply via email to

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