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: Mon, 18 Nov 2019 17:42:53 +0200 Message-ID: <83a78t42de.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> <83v9ri4agk.fsf@gnu.org> 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="112398"; 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 Mon Nov 18 16:44:32 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 1iWjCX-000T4m-5s for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Nov 2019 16:44:29 +0100 Original-Received: from localhost ([::1]:36028 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iWjCV-0006lN-WC for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Nov 2019 10:44:28 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40165) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iWjC7-0006Xa-Tn for bug-gnu-emacs@gnu.org; Mon, 18 Nov 2019 10:44:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iWjC6-0004Hc-QI for bug-gnu-emacs@gnu.org; Mon, 18 Nov 2019 10:44:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37262) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iWjC6-0004HL-MS for bug-gnu-emacs@gnu.org; Mon, 18 Nov 2019 10:44:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iWjC6-0001by-H1 for bug-gnu-emacs@gnu.org; Mon, 18 Nov 2019 10:44: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: Mon, 18 Nov 2019 15:44:02 +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.15740917836118 (code B ref 38181); Mon, 18 Nov 2019 15:44:02 +0000 Original-Received: (at 38181) by debbugs.gnu.org; 18 Nov 2019 15:43:03 +0000 Original-Received: from localhost ([127.0.0.1]:46083 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iWjB9-0001ab-GP for submit@debbugs.gnu.org; Mon, 18 Nov 2019 10:43:03 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59107) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iWjB2-0001a2-5J for 38181@debbugs.gnu.org; Mon, 18 Nov 2019 10:43:01 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:56193) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iWjAw-0003WG-AM; Mon, 18 Nov 2019 10:42:50 -0500 Original-Received: from [176.228.60.248] (port=2437 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iWjAv-0003wB-H2; Mon, 18 Nov 2019 10:42:50 -0500 In-reply-to: (message from martin rudalics on Mon, 18 Nov 2019 10:44:56 +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:171908 Archived-At: > Cc: jonas@bernoul.li, 38181@debbugs.gnu.org > From: martin rudalics > Date: Mon, 18 Nov 2019 10:44:56 +0100 > > > 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? > > I suppose so. But please always keep in mind that the window code > does not handle problems caused by specifications in the mode and > header lines immediately. What kind of problems are we talking about? > For example, it will not auto-resize a one-line window when its mode > line height is increased to more than its text height. That's a separate issue, isn't it? > >> Still, it will penalize every > >> ‘fit-window-to-buffer’ call (without a redisplay, though). > > > > Why "penalize"? > > Because 'fit-window-to-buffer' now has to calculate the mode line > height which it didn't before and which for the majority of users > never changes. Is that a significant problem? It's not like fit-window-to-buffer is expected to be called in a tight loop, right? Displaying a mode line is no more expensive (actually, even usually expensive) than calling vertical-motion to move one line, and we would never think twice before adding a call to the latter, right?