[Top][All Lists]

[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:32:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Arthur Miller <arthur.miller@live.com>
>> Cc: emacs-devel@gnu.org
>> Date: Thu, 15 Jun 2023 16:01:51 +0200
>> >   E.g., why walk-windows won't do whatever you needed to do?
>> I didn't know about it :). Well yes, it does indeed. It is a bit ugly, since 
>> I
>> have to use let and push, but I can save on one mapping to print names for
>> completing read:
> If you are going to loop over the windows, walk-windows is the right
> API, I think.

We don't always want to loop over windows to do something with them,
sometimes we just need the list to feed into something else, get the length for
the number of live windows.

It is also about the API, perhaps it is just me, but I expected window-list to
take 't for the frame and consder all frames, because of get-buffer-window doing
so. I thought it was a pattern, but it obviously is not. Probably just me, but I
see no reason to forbid window-list to act so, since the functionality is there,
for free.

Anyway, it was just a suggestion. I understand it is now a very popular one :).

reply via email to

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