From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#3598: 23.0.94; doc string of frame-root-window Date: Fri, 19 Jun 2009 14:18:43 -0700 Message-ID: <212E942BC0954A2F8A2EB4CEDC1EBE55@us.oracle.com> References: <4A3A11DD.4010500@gmx.at> <29DA79C677954D6FAE4CBEBCB7DEA175@us.oracle.com> <4A3B5184.9070808@gmx.at> Reply-To: Drew Adams , 3598@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1245447473 6836 80.91.229.12 (19 Jun 2009 21:37:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Jun 2009 21:37:53 +0000 (UTC) Cc: 3598@emacsbugs.donarmstrong.com To: "'martin rudalics'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 19 23:37:49 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MHlmP-0005ji-73 for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Jun 2009 23:37:49 +0200 Original-Received: from localhost ([127.0.0.1]:47648 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MHlmO-0001a7-BW for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Jun 2009 17:37:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MHlm6-0001HY-3B for bug-gnu-emacs@gnu.org; Fri, 19 Jun 2009 17:37:30 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MHlm1-00016s-07 for bug-gnu-emacs@gnu.org; Fri, 19 Jun 2009 17:37:29 -0400 Original-Received: from [199.232.76.173] (port=41645 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MHlm0-00016L-HL for bug-gnu-emacs@gnu.org; Fri, 19 Jun 2009 17:37:24 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:52274) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MHllz-0006Og-UJ for bug-gnu-emacs@gnu.org; Fri, 19 Jun 2009 17:37:24 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5JLbLUS025119; Fri, 19 Jun 2009 14:37:22 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n5JLP5v9023012; Fri, 19 Jun 2009 14:25:05 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: "Drew Adams" Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 19 Jun 2009 21:25:05 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 3598 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 3598-submit@emacsbugs.donarmstrong.com id=B3598.124544633222110 (code B ref 3598); Fri, 19 Jun 2009 21:25:05 +0000 Original-Received: (at 3598) by emacsbugs.donarmstrong.com; 19 Jun 2009 21:18:52 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from acsinet12.oracle.com (acsinet12.oracle.com [141.146.126.234]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5JLImfL022098 for <3598@emacsbugs.donarmstrong.com>; Fri, 19 Jun 2009 14:18:49 -0700 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by acsinet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n5JLIelr010752 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 19 Jun 2009 21:18:41 GMT Original-Received: from abhmt003.oracle.com (abhmt003.oracle.com [141.146.116.12]) by acsinet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n5JLK2fk020805; Fri, 19 Jun 2009 21:20:03 GMT Original-Received: from dradamslap1 (/24.5.177.54) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 19 Jun 2009 14:18:40 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <4A3B5184.9070808@gmx.at> Thread-Index: Acnwu1mgklPwH3PUTbOzVVWSeZQysgAZlaPg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: abhmt003.oracle.com [141.146.116.12] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090203.4A3C00B0.01D5:SCFSTAT5015188,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Fri, 19 Jun 2009 17:37:29 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:28857 Archived-At: > > The function `frame-root-window' seems to be used in the > > source code in places where I might naively expect the > > code to use `one-window-p' (with appropriate args and > > perhaps sometimes additional tests). > > I dislike `one-window-p'. What's the alternative (for users)? `frame-root-window' is internal, and undocumented (and I don't understand it). But am I right that this is what `frame-root-window' seems to be used for most of the time: testing whether the window is alone in its frame? > It only operates on the selected window Agreed. (But it's not a big deal to select a window temporarily). > and I mostly try to avoid `save-selected-window' based routines. What is the reason you avoid it? Is it because of performance? I find myself using it more than I would like, but mainly I don't like all of the debugger minutia it goes through, starting with Emacs 22 (21?). I have to remember (and recognize) that I can skip that particular dolist or mapcar etc. that maps over all the frames. In Emacs 20, that doesn't happen (no doubt it is less correct). > Moreover, `one-window-p' calls `next-window' and it requires the knowledge of > window trees to tell whether that always DTRT in a particular context. > > (eq window (frame-root-window (window-frame window))) > > is for me the most trivial way to tell whether `window' stands for > "everything but the mini stuff" on its frame. Then maybe that idiom should be provided as a user function? Or maybe one-window-p should be made more convenient in your terms, so that it can do that? All I mean is that this operation of telling whether a window is alone in its frame is not something that only internal Emacs code needs to do. It is a pretty common operation. If the only choices are (1) a function that you feel is not so great and (2) an internal function, then you must feel that Emacs is missing something for users, no?