[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Make window-list return windows for all frames
From: |
Arthur Miller |
Subject: |
Re: Make window-list return windows for all frames |
Date: |
Thu, 15 Jun 2023 18:19:13 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Gregory Heytings <gregory@heytings.org> writes:
>>>> 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).
Yes, that is what they do, but they invert the meaning of 'frame'. I don't see
why it would be a crime if window-list also returned all visible windows if
asked, as window-list-1 can be also inverted to do the thing on just one 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.
Basically I do see them as the same thing just slightly different entrance.
y immidiate thought is why we even have two of those, why we couldn't do with
just one from the beginning; but they are there now, so it ain't gonna change.
I don't see a reason why you would have to pass 0 and 'visible' just to make
'frame' argument more in line with other places with similar functionality.
- Re: Make window-list return windows for all frames, (continued)
- Re: Make window-list return windows for all frames, martin rudalics, 2023/06/17
- Re: Make window-list return windows for all frames, Eli Zaretskii, 2023/06/17
- Re: Make window-list return windows for all frames, Arthur Miller, 2023/06/18
- Re: Make window-list return windows for all frames, Arthur Miller, 2023/06/19
- Re: Make window-list return windows for all frames, martin rudalics, 2023/06/20
- RE: [External] : Re: Make window-list return windows for all frames, Drew Adams, 2023/06/15
- Re: [External] : Re: Make window-list return windows for all frames, Arthur Miller, 2023/06/16
Re: Make window-list return windows for all frames, Gregory Heytings, 2023/06/15
Re: Make window-list return windows for all frames, Po Lu, 2023/06/15