From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: window-body-height vs window-text-height Date: Wed, 29 Oct 2008 00:22:08 +0900 Message-ID: <87k5bsg2xr.fsf@catnip.gol.com> References: <4906E78C.7050207@gmx.at> Reply-To: Miles Bader NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1225207374 29118 80.91.229.12 (28 Oct 2008 15:22:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Oct 2008 15:22:54 +0000 (UTC) Cc: martin rudalics , emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 28 16:23:55 2008 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KuqPw-0001cC-UK for ged-emacs-devel@m.gmane.org; Tue, 28 Oct 2008 16:23:37 +0100 Original-Received: from localhost ([127.0.0.1]:52859 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KuqOq-0007Hb-Ml for ged-emacs-devel@m.gmane.org; Tue, 28 Oct 2008 11:22:28 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KuqOh-0007FC-LJ for emacs-devel@gnu.org; Tue, 28 Oct 2008 11:22:19 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KuqOf-0007EM-Tk for emacs-devel@gnu.org; Tue, 28 Oct 2008 11:22:19 -0400 Original-Received: from [199.232.76.173] (port=48713 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KuqOf-0007EB-Ni for emacs-devel@gnu.org; Tue, 28 Oct 2008 11:22:17 -0400 Original-Received: from smtp11.dentaku.gol.com ([203.216.5.73]:57040) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KuqOd-0005GX-3v; Tue, 28 Oct 2008 11:22:15 -0400 Original-Received: from 218.231.174.91.eo.eaccess.ne.jp ([218.231.174.91] helo=catnip.gol.com) by smtp11.dentaku.gol.com with esmtpa (Dentaku) id 1KuqOY-00085F-Pq; Wed, 29 Oct 2008 00:22:10 +0900 Original-Received: by catnip.gol.com (Postfix, from userid 1000) id 2568ADFC9; Wed, 29 Oct 2008 00:22:08 +0900 (JST) System-Type: x86_64-unknown-linux-gnu In-Reply-To: (Stefan Monnier's message of "Tue, 28 Oct 2008 10:12:41 -0400") Original-Lines: 24 X-Virus-Scanned: ClamAV GOL (outbound) X-Abuse-Complaints: abuse@gol.com X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:105079 Archived-At: Stefan Monnier writes: >> If there is a partial line at the bottom of the window, >> window-text-height rounds down, and window-body-height rounds up. >> If there are no fractional lines, both return the same value. > >> [In both cases, the number of lines assumes the default face -- neither >> measures what's actually displayed.] > > Now I'm confused. IIUC window sizes can only be multiples of the > default face size, so the number of lines (assuming the default face) > can only be a whole number and can never include partial lines, no? But the numbers returned by those functions don't include the mode-line/header-line -- and AFAIK, it's only true that the _total_ window height (including the mode-line/header-line) must be a multiple of the default face height. If you use e.g. a mode-line which is taller than a normal text line, you'll get a fractional last line in the text display area. -Miles -- Marriage, n. The state or condition of a community consisting of a master, a mistress and two slaves, making in all, two.