From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#3598: 23.0.94; doc string of frame-root-window Date: Sat, 20 Jun 2009 10:08:20 +0200 Message-ID: <4A3C98F4.3020109@gmx.at> References: <4A3A11DD.4010500@gmx.at> <29DA79C677954D6FAE4CBEBCB7DEA175@us.oracle.com> <4A3B5184.9070808@gmx.at> <212E942BC0954A2F8A2EB4CEDC1EBE55@us.oracle.com> Reply-To: martin rudalics , 3598@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1245485861 12603 80.91.229.12 (20 Jun 2009 08:17:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 20 Jun 2009 08:17:41 +0000 (UTC) Cc: 3598@emacsbugs.donarmstrong.com To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 20 10:17:38 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 1MHvlW-0006Xu-Ew for geb-bug-gnu-emacs@m.gmane.org; Sat, 20 Jun 2009 10:17:34 +0200 Original-Received: from localhost ([127.0.0.1]:34127 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MHvlV-00036N-NP for geb-bug-gnu-emacs@m.gmane.org; Sat, 20 Jun 2009 04:17:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MHvlR-000364-77 for bug-gnu-emacs@gnu.org; Sat, 20 Jun 2009 04:17:29 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MHvlM-00035e-JS for bug-gnu-emacs@gnu.org; Sat, 20 Jun 2009 04:17:28 -0400 Original-Received: from [199.232.76.173] (port=41105 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MHvlM-00035b-HA for bug-gnu-emacs@gnu.org; Sat, 20 Jun 2009 04:17:24 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:58741) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MHvlM-00050v-1I for bug-gnu-emacs@gnu.org; Sat, 20 Jun 2009 04:17: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 n5K8HLEM030806; Sat, 20 Jun 2009 01:17:22 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n5K8F6ws030206; Sat, 20 Jun 2009 01:15:06 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: martin rudalics Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 20 Jun 2009 08:15:06 +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.124548537829375 (code B ref 3598); Sat, 20 Jun 2009 08:15:06 +0000 Original-Received: (at 3598) by emacsbugs.donarmstrong.com; 20 Jun 2009 08:09:38 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with SMTP id n5K89Xv8029349 for <3598@emacsbugs.donarmstrong.com>; Sat, 20 Jun 2009 01:09:34 -0700 Original-Received: (qmail invoked by alias); 20 Jun 2009 08:09:27 -0000 Original-Received: from 62-47-36-173.adsl.highway.telekom.at (EHLO [62.47.36.173]) [62.47.36.173] by mail.gmx.net (mp025) with SMTP; 20 Jun 2009 10:09:27 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX187wGYgwt879B6OeYn9/jBBzapifwe2vB6GENl6YW R1vx0cWTsOUnu+ User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: <212E942BC0954A2F8A2EB4CEDC1EBE55@us.oracle.com> X-Y-GMX-Trusted: 0 X-FuHaFi: 0.66 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Sat, 20 Jun 2009 04:17:28 -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:28860 Archived-At: >> and I mostly try to avoid `save-selected-window' based routines. > > What is the reason you avoid it? Is it because of performance? Hysterical reasons. Earlier (maybe < 2005) versions failed to restore the current buffer and I spent hours debugging that. I don't even know whether all issues have been fixed by now. > 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). The inherent problem of all `save-selected-window' based routines is the selected window vs current buffer relation. Unfortunately, there's no perfect solution for this since sometimes you want to look at a particular window only to check its geometry or some related settings and IMHO `one-window-p' definitively belongs to that category. Other times you are interested in the buffer shown by the window as well and there it makes well sense to make the window's buffer current too. BTW, in this context note how often Emacs code used to talk (and occasionally still does) about selected buffers and current windows. > 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? I most certainly do. But I'm not sure whether it'd better to rewrite `one-window-p' or provide a separate function. martin