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#4543: window-full-height-p Date: Fri, 02 Oct 2009 10:39:33 +0200 Message-ID: <4AC5BC45.4060406@gmx.at> References: <4ABB19F5.50908@gmx.at> Reply-To: martin rudalics , 4543@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 1254473251 4837 80.91.229.12 (2 Oct 2009 08:47:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 2 Oct 2009 08:47:31 +0000 (UTC) Cc: 4543@emacsbugs.donarmstrong.com To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 02 10:47:23 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 1MtdnP-00085s-8V for geb-bug-gnu-emacs@m.gmane.org; Fri, 02 Oct 2009 10:47:23 +0200 Original-Received: from localhost ([127.0.0.1]:57537 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MtdnO-0000uE-Ke for geb-bug-gnu-emacs@m.gmane.org; Fri, 02 Oct 2009 04:47:22 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MtdnI-0000tB-A0 for bug-gnu-emacs@gnu.org; Fri, 02 Oct 2009 04:47:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MtdnC-0000st-Gr for bug-gnu-emacs@gnu.org; Fri, 02 Oct 2009 04:47:14 -0400 Original-Received: from [199.232.76.173] (port=44471 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MtdnC-0000sq-Bi for bug-gnu-emacs@gnu.org; Fri, 02 Oct 2009 04:47:10 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:37940) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MtdnB-0004mr-Pj for bug-gnu-emacs@gnu.org; Fri, 02 Oct 2009 04:47:10 -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 n928l7WQ005477; Fri, 2 Oct 2009 01:47:07 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n928j5ZT004895; Fri, 2 Oct 2009 01:45:05 -0700 Resent-Date: Fri, 2 Oct 2009 01:45:05 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: martin rudalics Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Fri, 02 Oct 2009 08:45:05 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4543 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4543-submit@emacsbugs.donarmstrong.com id=B4543.12544727834079 (code B ref 4543); Fri, 02 Oct 2009 08:45:05 +0000 Original-Received: (at 4543) by emacsbugs.donarmstrong.com; 2 Oct 2009 08:39:43 +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 n928dejD004074 for <4543@emacsbugs.donarmstrong.com>; Fri, 2 Oct 2009 01:39:42 -0700 Original-Received: (qmail invoked by alias); 02 Oct 2009 08:39:34 -0000 Original-Received: from 62-47-63-97.adsl.highway.telekom.at (EHLO [62.47.63.97]) [62.47.63.97] by mail.gmx.net (mp056) with SMTP; 02 Oct 2009 10:39:34 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19DESobXa1DqQUlAQVx2i+TR0wdKp9X2DyxMmzMRY BDAwSCEmZYvPbI User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: X-Y-GMX-Trusted: 0 X-FuHaFi: 0.52 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Fri, 02 Oct 2009 04:47:14 -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:31632 Archived-At: >>> (defun window-full-height-p (&optional window) >>> (unless window >>> (setq window (selected-window))) >>> (= (window-height window) >>> (window-height (frame-root-window (window-frame window))))) > > Please could this be installed? I have a number of problems with this: (1) The name is problematic. Note that `window-full-width-p' has no such problem because when it returns t the window is as wide as the containing frame. (2) It might give unexpected results when invoked with the minibuffer window as argument. Again `window-full-width-p' has no such problems. (3) It must be rewritten as soon as someone implements horizontal scrollbars ;-) Currently, getting (and setting) the sizes of windows (or frames) is a mess. Consider, for example, `split-window': If you use `window-width' on its argument WINDOW in order to pre-calculate the SIZE argument you almost certainly end up doing the wrong thing. Personally, I use a function `window-size' to return the total size of a window thus avoiding such confusions: DEFUN ("window-size", Fwindow_size, Swindow_size, 0, 2, 0, doc: /* Return total number of lines of WINDOW. WINDOW defaults to the selected window. The return values includes any header- or mode-line. Optional argument HORIZONTAL non-nil means return total number of columns of WINDOW. In this case the return value includes any scroll-bars of WINDOW. */) (window, horizontal) Lisp_Object window, horizontal; { if (!NILP (horizontal)) return decode_any_window (window)->total_cols; else return decode_any_window (window)->total_lines; } Anyway, if you can think of a better name (which should resolve (1) and (2)) and a comment wrt (3) feel free to install it. I'm currently a bit reluctant to install because my internet connection has been unreliable over the past weeks. martin