From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.devel Subject: Re: Make window-list return windows for all frames Date: Thu, 15 Jun 2023 14:19:41 +0000 Message-ID: <2e319d6dd89f5ee19d81@heytings.org> References: <2e319d6dd8337cf87073@heytings.org> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8344"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Arthur Miller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jun 15 16:20:46 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q9nq9-00022R-Sy for ged-emacs-devel@m.gmane-mx.org; Thu, 15 Jun 2023 16:20:45 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q9npE-0002DA-8K; Thu, 15 Jun 2023 10:19:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q9npC-0002D2-Ih for emacs-devel@gnu.org; Thu, 15 Jun 2023 10:19:46 -0400 Original-Received: from heytings.org ([95.142.160.155]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q9npB-0007EF-1F for emacs-devel@gnu.org; Thu, 15 Jun 2023 10:19:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1686838782; bh=6pt5SlW/mEXrE/W5+FSz5b5Yp/qEim5wPx2qt2mDylw=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=U/Rgde6od9ahHMCjpxVyL2b0tx9Iel+Encx6quKzVZNQas9Rwtvv15t5OYpVxLppy RfOTOx1eENp6cHrq839ydS5Uh5BaHHBkv5hK0Ta9O15dK5tqDvrFixrfe+3XlWtnnp Bm/rVhhmLeU86kSc8P68OHbRdavejCCIFKznEPxD7nfng+4bhdJM3uXFDqZDqywawV Pqqe2r8X+C/wav8DBv0tTBsjaIm+wyTE/A2NJjtuUW9iI3nvAWc+E+DWo4HqgNnQ4Y OU+34QExrovi2BgCx4dzg5V3om5LEKwXI0tjEZdB9bnNcnXmfB5xPWURHys7eT1Crq dzFaBDTClPDGA== In-Reply-To: Received-SPF: pass client-ip=95.142.160.155; envelope-from=gregory@heytings.org; helo=heytings.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:306808 Archived-At: >>> 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.