From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#38181: Actual height of mode-line not taken into account Date: Sun, 17 Nov 2019 20:35:55 +0200 Message-ID: <83v9ri4agk.fsf@gnu.org> References: <87eeyd3ul0.fsf@bernoul.li> <83d0dt2qt6.fsf@gnu.org> <83r2290w24.fsf@gnu.org> <83pnhs6wwp.fsf@gnu.org> <83k1806qca.fsf@gnu.org> <8336en7giv.fsf@gnu.org> <81264049-4f88-fae7-6448-e0ac5d977268@gmx.at> <83a78u5s8y.fsf@gnu.org> <17cbad77-efb8-9e9e-9a14-99e2e2bc5782@gmx.at> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="54419"; mail-complaints-to="usenet@blaine.gmane.org" Cc: jonas@bernoul.li, 38181@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Nov 17 19:37:56 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iWPQq-000E1Y-6d for geb-bug-gnu-emacs@m.gmane.org; Sun, 17 Nov 2019 19:37:56 +0100 Original-Received: from localhost ([::1]:55540 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iWPQp-0006Rq-0c for geb-bug-gnu-emacs@m.gmane.org; Sun, 17 Nov 2019 13:37:55 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47202) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iWPQ1-0005tP-9j for bug-gnu-emacs@gnu.org; Sun, 17 Nov 2019 13:37:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iWPPy-0000GD-F3 for bug-gnu-emacs@gnu.org; Sun, 17 Nov 2019 13:37:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33777) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iWPPy-0000Fx-4d for bug-gnu-emacs@gnu.org; Sun, 17 Nov 2019 13:37:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iWPPy-0004eq-0B for bug-gnu-emacs@gnu.org; Sun, 17 Nov 2019 13:37: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: Sun, 17 Nov 2019 18:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38181 X-GNU-PR-Package: emacs Original-Received: via spool by 38181-submit@debbugs.gnu.org id=B38181.157401576617836 (code B ref 38181); Sun, 17 Nov 2019 18:37:01 +0000 Original-Received: (at 38181) by debbugs.gnu.org; 17 Nov 2019 18:36:06 +0000 Original-Received: from localhost ([127.0.0.1]:42598 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iWPP2-0004da-8X for submit@debbugs.gnu.org; Sun, 17 Nov 2019 13:36:06 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38012) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iWPOz-0004d7-Tj for 38181@debbugs.gnu.org; Sun, 17 Nov 2019 13:36:02 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38496) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iWPOu-00081I-Cy; Sun, 17 Nov 2019 13:35:56 -0500 Original-Received: from [176.228.60.248] (port=1115 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iWPOt-0001vd-Eu; Sun, 17 Nov 2019 13:35:55 -0500 In-reply-to: <17cbad77-efb8-9e9e-9a14-99e2e2bc5782@gmx.at> (message from martin rudalics on Sun, 17 Nov 2019 19:15:44 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:171838 Archived-At: > Cc: jonas@bernoul.li, 38181@debbugs.gnu.org > From: martin rudalics > Date: Sun, 17 Nov 2019 19:15:44 +0100 > > > I didn't see where fit-window-to-buffer looks at the height of the > > mode line. What did I miss? > > 'window-text-pixel-size' does it (triggered by the sixth argument > MODE-AND-HEADER-LINE non-nil). Thanks. So the only thing that's missing is that it should call display_mode_lines, and then look at DESIRED_MODE_LINE_HEIGHT instead of WINDOW_MODE_LINE_HEIGHT? > > Suppose we had a Lisp-callable function which would return the height > > of the mode line of a window as per the current mode-line-format for > > that window -- would that make the solution possible/easier? > > Possible, I think. If we pass it on to 'window-text-pixel-size', it > wouldn't even have to be Lisp-callable. Still, it will penalize every > ‘fit-window-to-buffer’ call (without a redisplay, though). Why "penalize"?