From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?=C3=93scar?= Fuentes Newsgroups: gmane.emacs.bugs Subject: bug#50178: 28.0.50; Size of echo area does not account for line-spacing Date: Wed, 25 Aug 2021 22:10:03 +0200 Message-ID: <878s0pe15w.fsf@telefonica.net> References: <87eeajfvbq.fsf@telefonica.net> <83a6l7vyu2.fsf@gnu.org> <87a6l7ezks.fsf@telefonica.net> <837dgax1a0.fsf@gnu.org> <875yvug2ka.fsf@telefonica.net> <83y28qvhhn.fsf@gnu.org> <871r6ig01r.fsf@telefonica.net> <83wnoavftn.fsf@gnu.org> <87wnoaeisl.fsf@telefonica.net> <83sfyyuupx.fsf@gnu.org> <87k0k9er3w.fsf@telefonica.net> <87fsuxe9j9.fsf@telefonica.net> <83zgt5tnkh.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32178"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: gregory@heytings.org, 50178@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 25 22:11:18 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mIzEz-000899-8s for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 25 Aug 2021 22:11:17 +0200 Original-Received: from localhost ([::1]:40584 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mIzEx-0000yN-9L for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 25 Aug 2021 16:11:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52776) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mIzEj-0000w3-UI for bug-gnu-emacs@gnu.org; Wed, 25 Aug 2021 16:11:01 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36395) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mIzEj-0002lr-Mp for bug-gnu-emacs@gnu.org; Wed, 25 Aug 2021 16:11:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mIzEj-0008Dt-Iv for bug-gnu-emacs@gnu.org; Wed, 25 Aug 2021 16:11:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?=C3=93scar?= Fuentes Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Aug 2021 20:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50178 X-GNU-PR-Package: emacs Original-Received: via spool by 50178-submit@debbugs.gnu.org id=B50178.162992221531546 (code B ref 50178); Wed, 25 Aug 2021 20:11:01 +0000 Original-Received: (at 50178) by debbugs.gnu.org; 25 Aug 2021 20:10:15 +0000 Original-Received: from localhost ([127.0.0.1]:47941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIzDz-0008Cj-47 for submit@debbugs.gnu.org; Wed, 25 Aug 2021 16:10:15 -0400 Original-Received: from relayout01.e.movistar.es ([86.109.101.201]:24613 helo=relayout01-redir.e.movistar.es) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIzDw-0008CL-By for 50178@debbugs.gnu.org; Wed, 25 Aug 2021 16:10:13 -0400 Original-Received: from sky (14.red-79-145-70.dynamicip.rima-tde.net [79.145.70.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: 981711563@telefonica.net) by relayout01.e.movistar.es (Postfix) with ESMTPSA id 4Gvxsm1wqWzfZC1; Wed, 25 Aug 2021 22:10:03 +0200 (CEST) In-Reply-To: <83zgt5tnkh.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 25 Aug 2021 20:57:02 +0300") X-TnetOut-Country: IP: 79.145.70.14 | Country: ES X-TnetOut-Information: AntiSPAM and AntiVIRUS on relayout01 X-TnetOut-MsgID: 4Gvxsm1wqWzfZC1.A073E X-TnetOut-SpamCheck: no es spam, clean X-TnetOut-From: ofv@wanadoo.es X-TnetOut-Watermark: 1630527005.459@IMVPA7uylyEwcC2okpkK6A X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:212675 Archived-At: Eli Zaretskii writes: >> Any graphics environment worth its salt has methods for measuring >> whatever object without actually rendering it. > > So does Emacs: that's what window-text-pixel-size does. You missed the part "without actually rendering it". As per Martin's instructions, the method for ensuring that the text does not overflow the window is to put text on it, one line at a time, and watch the used space (I guess that two lines would be enough to extrapolate the space required by N lines assuming that the text is rendered with the default font, face, etc) On the case of ido-grid-mode (which displays a grid N lines tall that virtually expands horizontally) not knowing in advance how many lines are available means that it must populate the mini window with some dummy text to measure its capacity, throw away its contents and proceed to fill the mini window with the real payload. >> If an integer, it specifies the maximum height in units of the >> mini-window frame=E2=80=99s default font=E2=80=99s height. >> " >>=20 >> Why that was implemented that way? (instead of using pixels, for >> instance.) > > Because in most cases it's more useful: it approximates the actual > number of lines quite well. Exactly, that was my point all along. And it would be a better approximation if the display engine used that variable taking into account line-spacing and other relevant settings which affect how the actual text is rendered.