From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#15886: 24.3.50; Incorrect window-text-height with non-zero line-spacing Date: Thu, 14 Nov 2013 05:44:30 +0200 Message-ID: <831u2j1wbl.fsf@gnu.org> References: <8D614196-65E4-4F20-AAFE-CCFDC32D9898@robertdallasgray.com> <83a9h811r7.fsf@gnu.org> <4D2C9983-9E63-44F6-83A6-3D306B9EC79C@robertdallasgray.com> <837gcc116m.fsf@gnu.org> <834n7g0zq1.fsf@gnu.org> <2D715343-65B4-4759-95C1-D3DA8A3F7598@robertdallasgray.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1384400715 17649 80.91.229.3 (14 Nov 2013 03:45:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Nov 2013 03:45:15 +0000 (UTC) Cc: 15886@debbugs.gnu.org To: Robert Dallas Gray Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 14 04:45:19 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Vgnrp-0001MH-NE for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 Nov 2013 04:45:18 +0100 Original-Received: from localhost ([::1]:53215 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vgnrp-0003l0-1C for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Nov 2013 22:45:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51624) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vgnrh-0003kf-97 for bug-gnu-emacs@gnu.org; Wed, 13 Nov 2013 22:45:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vgnrb-0004iy-VL for bug-gnu-emacs@gnu.org; Wed, 13 Nov 2013 22:45:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37053) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vgnrb-0004hz-Rc for bug-gnu-emacs@gnu.org; Wed, 13 Nov 2013 22:45:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Vgnra-0003wX-HR for bug-gnu-emacs@gnu.org; Wed, 13 Nov 2013 22:45:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Nov 2013 03:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15886 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 15886-submit@debbugs.gnu.org id=B15886.138440069615138 (code B ref 15886); Thu, 14 Nov 2013 03:45:02 +0000 Original-Received: (at 15886) by debbugs.gnu.org; 14 Nov 2013 03:44:56 +0000 Original-Received: from localhost ([127.0.0.1]:51072 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VgnrT-0003w5-Ip for submit@debbugs.gnu.org; Wed, 13 Nov 2013 22:44:55 -0500 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:36475) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VgnrP-0003vp-Ux for 15886@debbugs.gnu.org; Wed, 13 Nov 2013 22:44:53 -0500 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MW800600HRRGV00@a-mtaout21.012.net.il> for 15886@debbugs.gnu.org; Thu, 14 Nov 2013 05:44:44 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MW8006NVIEKD280@a-mtaout21.012.net.il>; Thu, 14 Nov 2013 05:44:44 +0200 (IST) In-reply-to: <2D715343-65B4-4759-95C1-D3DA8A3F7598@robertdallasgray.com> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:80406 Archived-At: > From: Robert Dallas Gray > Date: Wed, 13 Nov 2013 21:27:35 +0000 > Cc: 15886@debbugs.gnu.org > > > The argument passed to 'set-window-text-height' should be scaled by > > the ratio of the values returned by 'frame-char-height' and > > 'default-line-height'. (By default, this ratio is 1, but in your case > > it will be different.) The result of scaling should then be rounded > > up to the nearest integer. > > > > OK, but that doesn't really achieve the aim of setting the height of the window *exactly* in terms of the height of an individual line of text ... in the case I'm describing, where the number of lines displayed is changing dynamically, the baseline is going to bounce around because the window isn't being sized accurately. In a GUI session, a window's height can never be set exactly to the size of the text, because that size is not constant, it varies depending on what characters, fonts, and faces (bold etc.) are used for displaying the text. Change the text displayed in the window, and the exact size in pixel changes. So the goal is to make the window high enough to show all the text you need to see; any other goal is not attainable _in_principle_, and it is IMO futile to try to pursue it. Or maybe I don't understand what "bouncing" you describe. Can you give an example?