GNU bug report logs - #38181
Actual height of mode-line not taken into account

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Jonas Bernoulli <jonas@HIDDEN>; dated Tue, 12 Nov 2019 16:54:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 38181 <at> debbugs.gnu.org:


Received: (at 38181) by debbugs.gnu.org; 18 Nov 2019 18:46:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 18 13:46:41 2019
Received: from localhost ([127.0.0.1]:46254 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iWm2r-0000da-46
	for submit <at> debbugs.gnu.org; Mon, 18 Nov 2019 13:46:41 -0500
Received: from mout.gmx.net ([212.227.17.20]:48283)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1iWm2p-0000dO-4b
 for 38181 <at> debbugs.gnu.org; Mon, 18 Nov 2019 13:46:39 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1574102793;
 bh=Q5gjJmZjJqaaNDuLdFDT1qlqku4hknq17Rf2/EzqsUg=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=NkdCFdRbsGfD49IRny9MXc5yLs8/DgfRIP5nwaxUiJK09Ek5d5d1J4VdiBcd2wwYi
 danFMl6U57sf3434UfK0ZAadfUpK5V9e0K+V4acLVqOpu37exebs/ETmHS7Q69txVQ
 yWc1WpDUfkBknDMEDG43fk2eRfqZty61qkn88fQM=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.103] ([212.95.5.110]) by mail.gmx.com (mrgmx105
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N33ET-1hs7C14A7p-013Jd6; Mon, 18
 Nov 2019 19:46:33 +0100
Subject: Re: bug#38181: Actual height of mode-line not taken into account
To: Eli Zaretskii <eliz@HIDDEN>
References: <87eeyd3ul0.fsf@HIDDEN> <83d0dt2qt6.fsf@HIDDEN>
 <83r2290w24.fsf@HIDDEN> <ab7c7b7c-0699-c317-58b2-e3b60a1b2c4f@HIDDEN>
 <83pnhs6wwp.fsf@HIDDEN> <c1108254-91bf-578d-3ac5-747e59a33145@HIDDEN>
 <878sofon8v.fsf@HIDDEN> <837e3z7pzo.fsf@HIDDEN>
 <ec09e70e-24e1-1e0a-4441-c94cf82a5936@HIDDEN> <831ru77ghg.fsf@HIDDEN>
 <9700fac4-b75d-cd6e-3360-78bd0f8c7db0@HIDDEN> <83blta5sep.fsf@HIDDEN>
 <5db0ddbf-7473-ca8e-8279-7f8435297771@HIDDEN> <83tv724aav.fsf@HIDDEN>
 <19634a53-d8a2-0e85-bfd8-2cd636c6ae3c@HIDDEN> <838sod427o.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <ef5246ec-86c3-bee2-5827-ae3112fe057d@HIDDEN>
Date: Mon, 18 Nov 2019 19:46:30 +0100
MIME-Version: 1.0
In-Reply-To: <838sod427o.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: de-AT
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:IpduCTlbom+lX+bMtKXFk5yYcpiZ7OjQMxclhm2rc3rz6EEKWKe
 JAXRyvIKmQEi0X6oGtKV/mICDWgp4uERN9uvybhSYg+wSEjBk0KPYfg3Pv6ud8rvBl+nfbG
 suOhG5pQNd0ELpeTiheSZZp3kkCVXdhYemzaPLc7PXijm7ygr6FztO9EsaqHCzTZNB3DnBc
 9eLIC3O17mDPH7Yg0xTLw==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:aR+kxBKn1lg=:95RONF6q16G86gygWvn8Lm
 DMAhIPCiI+JUgPAEndpPapfVSb0cF9ivEjAg0KK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7ytbNaZOWpBvGQQb
 +Byh5FIoquB3oRhBxls5sboNIl+pAg18B2Egzi36WSLfafm0Fue6ruQpoPKEy7+pTl09bV9ET
 aGAzO0+HMcWx9SYXsH3g5aOsifUWO2SUGF5xwDP/oNu9bLd7LZ1grQLKuNolsgIfd6mz/6cn4
 K1+EH/4kg8BOvzg8yDRbPhMjoNQ0fpt7bmwgbLqiOnMqoAZzUuXiikUVOzL0=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 38181
Cc: jonas@HIDDEN, 38181 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 >> But IIUC in neither of our proposals we would have done that.
 >
 > I wouldn't be so sure: the code fragment I've shown that detects
 > mode-line height changes is inside redisplay_window.

But we should collect evidence from all windows first before
redisplaying again.

 >> I'd even say that we should resize windows when redisplay finds out
 >> that the mode line height has been increased and would obscure the
 >> window above, not leave at least one line of its window's text
 >> visible
 >
 > Some might dislike such side effects, I think, for the same reason
 > some dislike the resizing which happens due to mini-window growth.

You probably misunderstood.  I meant the example from my other mail
where enlarging the mode line covers the entire text area of its
window.  In that case we sooner or later will resize anyway, that is
when the window resizing code becomes aware of the fact.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.

Message received at 38181 <at> debbugs.gnu.org:


Received: (at 38181) by debbugs.gnu.org; 18 Nov 2019 18:46:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 18 13:46:08 2019
Received: from localhost ([127.0.0.1]:46251 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iWm2J-0000cq-8p
	for submit <at> debbugs.gnu.org; Mon, 18 Nov 2019 13:46:07 -0500
Received: from mout.gmx.net ([212.227.17.20]:55603)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1iWm2H-0000bn-7C
 for 38181 <at> debbugs.gnu.org; Mon, 18 Nov 2019 13:46:06 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1574102753;
 bh=mGOEcaY0c52cQGDHOannbGcHXvcqTK0aLIgiuc2YVYo=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=csVeQ5rSBfzJC66SeMARGJxz33xargV1Qzz+x5O+6D7VtVaO1/PousYnHlG3jW7+s
 S+dfRH/cPO5lYvIyW7/gxRu4VMZiOUmtROGFle5sfdrVKsjJvDA8qEoTOHtv+MYQXK
 m/uWYJ41o9pSZ0YIPyTuxPSo2mM4tY8rHIJmS7j0=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.103] ([212.95.5.110]) by mail.gmx.com (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N0G1n-1hcCuM2PAN-00xIR9; Mon, 18
 Nov 2019 19:45:53 +0100
Subject: Re: bug#38181: Actual height of mode-line not taken into account
To: Eli Zaretskii <eliz@HIDDEN>
References: <87eeyd3ul0.fsf@HIDDEN> <83d0dt2qt6.fsf@HIDDEN>
 <83r2290w24.fsf@HIDDEN> <ab7c7b7c-0699-c317-58b2-e3b60a1b2c4f@HIDDEN>
 <83pnhs6wwp.fsf@HIDDEN> <c1108254-91bf-578d-3ac5-747e59a33145@HIDDEN>
 <83k1806qca.fsf@HIDDEN> <acf6952e-a36b-0031-97a1-cde6398c9801@HIDDEN>
 <8336en7giv.fsf@HIDDEN> <81264049-4f88-fae7-6448-e0ac5d977268@HIDDEN>
 <83a78u5s8y.fsf@HIDDEN> <17cbad77-efb8-9e9e-9a14-99e2e2bc5782@HIDDEN>
 <83v9ri4agk.fsf@HIDDEN> <de1c1205-d306-bf66-5cc7-62748de2b86c@HIDDEN>
 <83a78t42de.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <792e250c-07b1-60ce-82d1-596b1db2a3f3@HIDDEN>
Date: Mon, 18 Nov 2019 19:45:50 +0100
MIME-Version: 1.0
In-Reply-To: <83a78t42de.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: de-AT
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:VpmP/5mdChYOoCj40RzTvAfL9r8axLJ8F3wQlqwySjK39gNjOSJ
 tE4QsvvYCZXaYCfpi3s+7o518IvHuudPqIuuGU1CDjr1S6fF0m6+vVAkS8CMIL/WSfCJwHv
 yXzYrNnYJ7jD2A3F5hghwZLB9TDgfHHjyiO18p0gK4+EMOoiFkGqQsYBgGxVyMPJYK2e9WG
 uXWqKEUcofVzHlhcibxRw==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:gulK8y03TAY=:jT9pKBJzepuquCFDKNf1in
 W2JobsTpGn5SoDkFpaE/ZJDvciqkt/tx1yaAArYxuf+OiHmusfXhA7tNb2CrkW8f1WEjud+sq
 tYmXSIMQZDl012F3hqsKkwNxim5waabmDXKYe4Rv6w1LTf3olfZ6DSroae68r7slkF3WIWhzk
 fjhyCShL63xqnI+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ufHj+WV6O6wvAunM6uf9xHlEnI4p
 ainy46hnkzTXOdtepovB371kBbnFZ7oT6lvEm7kN8+FG0znWK+X94OjU6Rcw=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 38181
Cc: jonas@HIDDEN, 38181 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 >> 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?

Any problems with the minimum size of windows as the one described in
the next sentence.

 >> 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?

It's similar, at least.  The scroll bar issue is another similar one.

 >> 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?

I hope it isn't.

 > 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?

Agreed (I suppose you meant to say "even usually less expensive"
above).

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.

Message received at 38181 <at> debbugs.gnu.org:


Received: (at 38181) by debbugs.gnu.org; 18 Nov 2019 15:46:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 18 10:46:29 2019
Received: from localhost ([127.0.0.1]:46087 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iWjES-0001g6-3G
	for submit <at> debbugs.gnu.org; Mon, 18 Nov 2019 10:46:29 -0500
Received: from eggs.gnu.org ([209.51.188.92]:59724)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iWjEQ-0001fu-7i
 for 38181 <at> debbugs.gnu.org; Mon, 18 Nov 2019 10:46:26 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:56234)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iWjEL-0005uj-2L; Mon, 18 Nov 2019 10:46:21 -0500
Received: from [176.228.60.248] (port=2645 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1iWjEF-0004FC-2e; Mon, 18 Nov 2019 10:46:17 -0500
Date: Mon, 18 Nov 2019 17:46:19 +0200
Message-Id: <838sod427o.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
In-reply-to: <19634a53-d8a2-0e85-bfd8-2cd636c6ae3c@HIDDEN> (message from
 martin rudalics on Mon, 18 Nov 2019 10:45:13 +0100)
Subject: Re: bug#38181: Actual height of mode-line not taken into account
References: <87eeyd3ul0.fsf@HIDDEN> <83d0dt2qt6.fsf@HIDDEN>
 <83r2290w24.fsf@HIDDEN> <ab7c7b7c-0699-c317-58b2-e3b60a1b2c4f@HIDDEN>
 <83pnhs6wwp.fsf@HIDDEN> <c1108254-91bf-578d-3ac5-747e59a33145@HIDDEN>
 <878sofon8v.fsf@HIDDEN> <837e3z7pzo.fsf@HIDDEN>
 <ec09e70e-24e1-1e0a-4441-c94cf82a5936@HIDDEN> <831ru77ghg.fsf@HIDDEN>
 <9700fac4-b75d-cd6e-3360-78bd0f8c7db0@HIDDEN> <83blta5sep.fsf@HIDDEN>
 <5db0ddbf-7473-ca8e-8279-7f8435297771@HIDDEN> <83tv724aav.fsf@HIDDEN>
 <19634a53-d8a2-0e85-bfd8-2cd636c6ae3c@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 38181
Cc: jonas@HIDDEN, 38181 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: jonas@HIDDEN, 38181 <at> debbugs.gnu.org
> From: martin rudalics <rudalics@HIDDEN>
> Date: Mon, 18 Nov 2019 10:45:13 +0100
> 
>  >>   > Mmm... actually, it could be that we cannot resize windows during
>  >>   > redisplay at all.  See, for example, how resize_mini_window does its
>  >>   > tricky job.  We may need to call this outside of redisplay.
>  >>
>  >> Inherently, resize_mini_window does what 'fit-window-to-buffer' does
>  >> and it gets called from redisplay_internal.
>  >
>  > And it immediately returns if that happens while redisplaying a
>  > window.
> 
> But IIUC in neither of our proposals we would have done that.

I wouldn't be so sure: the code fragment I've shown that detects
mode-line height changes is inside redisplay_window.

> I'd even say that we should resize windows when redisplay finds out
> that the mode line height has been increased and would obscure the
> window above, not leave at least one line of its window's text
> visible

Some might dislike such side effects, I think, for the same reason
some dislike the resizing which happens due to mini-window growth.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.

Message received at 38181 <at> debbugs.gnu.org:


Received: (at 38181) by debbugs.gnu.org; 18 Nov 2019 15:43:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 18 10:43:03 2019
Received: from localhost ([127.0.0.1]:46083 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iWjB9-0001ab-GP
	for submit <at> debbugs.gnu.org; Mon, 18 Nov 2019 10:43:03 -0500
Received: from eggs.gnu.org ([209.51.188.92]:59107)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iWjB2-0001a2-5J
 for 38181 <at> debbugs.gnu.org; Mon, 18 Nov 2019 10:43:01 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:56193)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iWjAw-0003WG-AM; Mon, 18 Nov 2019 10:42:50 -0500
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 <eliz@HIDDEN>)
 id 1iWjAv-0003wB-H2; Mon, 18 Nov 2019 10:42:50 -0500
Date: Mon, 18 Nov 2019 17:42:53 +0200
Message-Id: <83a78t42de.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
In-reply-to: <de1c1205-d306-bf66-5cc7-62748de2b86c@HIDDEN> (message from
 martin rudalics on Mon, 18 Nov 2019 10:44:56 +0100)
Subject: Re: bug#38181: Actual height of mode-line not taken into account
References: <87eeyd3ul0.fsf@HIDDEN> <83d0dt2qt6.fsf@HIDDEN>
 <83r2290w24.fsf@HIDDEN> <ab7c7b7c-0699-c317-58b2-e3b60a1b2c4f@HIDDEN>
 <83pnhs6wwp.fsf@HIDDEN> <c1108254-91bf-578d-3ac5-747e59a33145@HIDDEN>
 <83k1806qca.fsf@HIDDEN> <acf6952e-a36b-0031-97a1-cde6398c9801@HIDDEN>
 <8336en7giv.fsf@HIDDEN> <81264049-4f88-fae7-6448-e0ac5d977268@HIDDEN>
 <83a78u5s8y.fsf@HIDDEN> <17cbad77-efb8-9e9e-9a14-99e2e2bc5782@HIDDEN>
 <83v9ri4agk.fsf@HIDDEN> <de1c1205-d306-bf66-5cc7-62748de2b86c@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 38181
Cc: jonas@HIDDEN, 38181 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: jonas@HIDDEN, 38181 <at> debbugs.gnu.org
> From: martin rudalics <rudalics@HIDDEN>
> 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?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.

Message received at 38181 <at> debbugs.gnu.org:


Received: (at 38181) by debbugs.gnu.org; 18 Nov 2019 09:45:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 18 04:45:20 2019
Received: from localhost ([127.0.0.1]:43187 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iWdax-0005AD-V0
	for submit <at> debbugs.gnu.org; Mon, 18 Nov 2019 04:45:20 -0500
Received: from mout.gmx.net ([212.227.15.18]:55057)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1iWdaw-000546-W5
 for 38181 <at> debbugs.gnu.org; Mon, 18 Nov 2019 04:45:19 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1574070310;
 bh=1ZTIkTQTrmIz7mc4S3IGQEuOS9uy2V233iJpyuu+m8g=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=Znshcr3XCGa1iJ5OYdXOn+W3x2ztc06SRlL2pcAajpCAP1vrDQWAzeuDEDllTDOEm
 AiQAJfk0576x1qZFBObtZHWLRzAuN9UbmEr9NOoUVuhUqh9gPxim8RjHIYPomxzx8a
 8mhHZdyd7smldpjmJFhIAQ1bp1N9NwFzWqgvm6QU=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.103] ([212.95.5.110]) by mail.gmx.com (mrgmx005
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M4b1o-1iXC5Y1QZi-001kcf; Mon, 18
 Nov 2019 10:45:10 +0100
Subject: Re: bug#38181: Actual height of mode-line not taken into account
To: Eli Zaretskii <eliz@HIDDEN>
References: <87eeyd3ul0.fsf@HIDDEN> <83d0dt2qt6.fsf@HIDDEN>
 <83r2290w24.fsf@HIDDEN> <ab7c7b7c-0699-c317-58b2-e3b60a1b2c4f@HIDDEN>
 <83pnhs6wwp.fsf@HIDDEN> <c1108254-91bf-578d-3ac5-747e59a33145@HIDDEN>
 <878sofon8v.fsf@HIDDEN> <837e3z7pzo.fsf@HIDDEN>
 <ec09e70e-24e1-1e0a-4441-c94cf82a5936@HIDDEN> <831ru77ghg.fsf@HIDDEN>
 <9700fac4-b75d-cd6e-3360-78bd0f8c7db0@HIDDEN> <83blta5sep.fsf@HIDDEN>
 <5db0ddbf-7473-ca8e-8279-7f8435297771@HIDDEN> <83tv724aav.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <19634a53-d8a2-0e85-bfd8-2cd636c6ae3c@HIDDEN>
Date: Mon, 18 Nov 2019 10:45:13 +0100
MIME-Version: 1.0
In-Reply-To: <83tv724aav.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: de-AT
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:WxnLZtSTOMPicXoJKcglJZtFjC2cDKimvQhI5n+yUc6Y0fnEHa6
 FFsIbjHMxyZMg1gscv8f6khvy18VDsIMQp+XUJceKCLVQlGtf9QkiZ3MqzZVqxvC+joa6Ga
 HDmaOnyICdI5dH7fFfYmV+1kGpTh/Cvf84zM7ep5BQ60KlY81KXF71qcNgiv03Fagg4letF
 /XVigPiHJ+yCe4rlKg2ag==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:ZEpkBxMrwV0=:BB4K9olCo/CmC0UwT+bTVG
 hINfgZB1/Kw1qXvWJaD5mRjHapPvZ1tYXpx+fdwZb4iZRdcTx5vLsTpOSa/fAEnd0elLYd1Ve
 /DO3yffgkdaLORtB8bItNmXbqk4I+ARe5LUX5Y+Eo1rwxvOrwfBDyKZV8aiiMtmkMzYFZwnrZ
 ApRluP0gEFPR8B2ze9fHSfMK6gk8cZe2bSgnlQbxFTyRZSL58+wyQhFmAzW7nVD4IswrOicW8
 g+m21VYzgYITuneqm34TRFSsU1Vsa6OE0E/TVFsFtD2T2SsmBXzWPp7AT+gRBOUEqndlqqvRJ
 ZofSIC+57Cc1pyfi/vAUpRUr8pYtgxNsc4Qx6UCRxKDPO4O+FOz+jlLuYkftPly4hbkSik++o
 r+kZ8T25+A3e/A/2k1yuZlYJKSNHErKI/6ERWAZ4G/RYqowDmy4afyJ/T8u+VfxB1vJZAjVSI
 g/6T+FYbkgi7fHtge3eh9lGISwNH9f4PC7t25Wr+F+ntCGJcQW33jkR56J8GtkG74jvC5sAkM
 FgQ7OYwDftGxOlr81qyltNQULuAER76NBsily9CTNCh5Xz5w1GozAEyNDmotpiaAKzESk+/nY
 ZK3yMnJw6hnEzQwskrfQv/lo8XOxWCO3KH460BIXUprq3SpQ2mr5YUvGd4tIS0FnnWWFR3E0F
 CFZpN8TAhl6J7HJOvlD8G56eXqa2b+YVxVJq/H8wu4apLUG1l0SyvzeuRkdAMKfmySOtLz1he
 0ufahbNtMII+y0dNEPrQYHIKRVrX/2jpu1EPXoK+ntm2GogEKUHAy9KoPltl8C5C2fynRl8af
 J1KMIksC97f4PDsSf38R9bNTQkhDHgQrsL9XyKkRwN+WsmQXKzL/sXrl49JfjdjbH4uiVdb/b
 dt230IR7M0Oy4lcezZ/spJDIbs+T/1d2yzdJ9AGoiJ2q8mF31PxSePH2k8s46EJUy71cgIWp8
 REuBsq75hZfCqhd95ASH2t88ZgAub3zuJE9s1pigYScpJlPDxqVBPDI0L/HACf2p0n4ttTVT5
 MtR2hsrnrzzGwMAW8o1pyX7MeZIXM/5sfSJRYtH6MEmXCGl+12qzmFTVuvaYjrJrxrhFZlV7/
 /eNe7NRshAglvePVbAAevuavj0TYgooGlvNcNiNVYb7W6dFGSw8boaozwNuuoN4vhTShrYStz
 6DqBm9ZzfbPuEbipLWrw+1JDLSTuulqlI3VjIbEqwzT8NtKsqVeeR8zrnHH3HvgLLzwV/MqtW
 +Yz8uwUXfFmtlEN/cNteilhMW/XvrWm/ijKiFJA==
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 38181
Cc: jonas@HIDDEN, 38181 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

 >>   > Mmm... actually, it could be that we cannot resize windows during
 >>   > redisplay at all.  See, for example, how resize_mini_window does its
 >>   > tricky job.  We may need to call this outside of redisplay.
 >>
 >> Inherently, resize_mini_window does what 'fit-window-to-buffer' does
 >> and it gets called from redisplay_internal.
 >
 > And it immediately returns if that happens while redisplaying a
 > window.

But IIUC in neither of our proposals we would have done that.  I'd
even say that we should resize windows when redisplay finds out that
the mode line height has been increased and would obscure the window
above, not leave at least one line of its window's text visible (see
the example in my other mail), ...

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.

Message received at 38181 <at> debbugs.gnu.org:


Received: (at 38181) by debbugs.gnu.org; 18 Nov 2019 09:45:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 18 04:45:09 2019
Received: from localhost ([127.0.0.1]:43183 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iWdam-0004yv-It
	for submit <at> debbugs.gnu.org; Mon, 18 Nov 2019 04:45:08 -0500
Received: from mout.gmx.net ([212.227.15.19]:53837)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1iWdaj-0004t2-VJ
 for 38181 <at> debbugs.gnu.org; Mon, 18 Nov 2019 04:45:07 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1574070297;
 bh=w93Pvvq1MNmJPHCFEMV9vdi7GZstcoKn92mUD7UVMGY=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=X852GiIfVj0SsIakvftLKdlec0Hlb0SVMMoo0N+na0XZ2XgR9Jf1vZnk5xufdFjuj
 LK6kIu5Srzoo1Dpv+DlDdPbAkuabL+txvcEczQWZ1gYJ82VUfpqPGNCJayNraAGnCS
 vU1JL0MyVp3MUULVUKNYNW6iePW/Z2WTTt2WArQg=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.103] ([212.95.5.110]) by mail.gmx.com (mrgmx005
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MI5Q5-1ibqvO0291-00FEtx; Mon, 18
 Nov 2019 10:44:57 +0100
Subject: Re: bug#38181: Actual height of mode-line not taken into account
To: Eli Zaretskii <eliz@HIDDEN>
References: <87eeyd3ul0.fsf@HIDDEN> <83d0dt2qt6.fsf@HIDDEN>
 <83r2290w24.fsf@HIDDEN> <ab7c7b7c-0699-c317-58b2-e3b60a1b2c4f@HIDDEN>
 <83pnhs6wwp.fsf@HIDDEN> <c1108254-91bf-578d-3ac5-747e59a33145@HIDDEN>
 <83k1806qca.fsf@HIDDEN> <acf6952e-a36b-0031-97a1-cde6398c9801@HIDDEN>
 <8336en7giv.fsf@HIDDEN> <81264049-4f88-fae7-6448-e0ac5d977268@HIDDEN>
 <83a78u5s8y.fsf@HIDDEN> <17cbad77-efb8-9e9e-9a14-99e2e2bc5782@HIDDEN>
 <83v9ri4agk.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <de1c1205-d306-bf66-5cc7-62748de2b86c@HIDDEN>
Date: Mon, 18 Nov 2019 10:44:56 +0100
MIME-Version: 1.0
In-Reply-To: <83v9ri4agk.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: de-AT
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:7scP1lg9YLRJzvMqPl4Gdcg5syVKstVmNlFJ5XfaK7+kyn1Fj13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x
 bEwq0P1azzgM+ZAx2maQwUYVN6BhL0aR3AzTBYCtucieyplSXdjOKt+tfUtXEZfK5JMnZtC8i
 Psxr+J52gsLC/np4y6GQSgbmsCzCwlLfdE4N7o0pLn/USKR6CZO+iloxl3UMoC349lUMWMJks
 mWsq7oiI4Yhs1NtVOHIucWKyGLGrRaQ2GcJleNzTJkdZWQWysji+7h1cEGtD6JIsPNCzjtwIV
 AI6O3PwBwF/SK+99BGv9sb5vcp65WyAq0gsjOngmhp+t0PE851MjG+SPMwhhVIK3NGU6etBjT
 hbLeLR9uyQFbiXnBrl9kFkKD8spv1BFc5p3LoQ13rSdCoEhjbLu+fbcxCU9H+H5tYgJSc8YS3
 C0EjO5xQamZlzT+mGOIhppoARg+tmVzo6xdiUiy4JFbefujJl2d6N41k0yaHPcPH6nJQFEDux
 9TiSQGlKw283RDB937KYGnYTmg7PCxlEk49zEkC6E19x0/qLWiVKuM3k4Tmo=
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 38181
Cc: jonas@HIDDEN, 38181 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

 > 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.  For example, it will not auto-resize a
one-line window when its mode line height is increased to more than
its text height.  Try with a one-line window and Jonas'

(set-face-attribute 'mode-line nil :height 250)

 >> Still, it will penalize every
 >> =E2=80=98fit-window-to-buffer=E2=80=99 call (without a redisplay, tho=
ugh).
 >
 > 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.

martin





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.

Message received at 38181 <at> debbugs.gnu.org:


Received: (at 38181) by debbugs.gnu.org; 17 Nov 2019 18:39:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 17 13:39:27 2019
Received: from localhost ([127.0.0.1]:42602 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iWPSI-0004i9-TA
	for submit <at> debbugs.gnu.org; Sun, 17 Nov 2019 13:39:27 -0500
Received: from eggs.gnu.org ([209.51.188.92]:38561)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iWPSH-0004hx-Ha
 for 38181 <at> debbugs.gnu.org; Sun, 17 Nov 2019 13:39:25 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:38556)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iWPSC-0001hd-Cn; Sun, 17 Nov 2019 13:39:20 -0500
Received: from [176.228.60.248] (port=1322 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1iWPSB-00021U-Lz; Sun, 17 Nov 2019 13:39:20 -0500
Date: Sun, 17 Nov 2019 20:39:20 +0200
Message-Id: <83tv724aav.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
In-reply-to: <5db0ddbf-7473-ca8e-8279-7f8435297771@HIDDEN> (message from
 martin rudalics on Sun, 17 Nov 2019 19:16:32 +0100)
Subject: Re: bug#38181: Actual height of mode-line not taken into account
References: <87eeyd3ul0.fsf@HIDDEN> <83d0dt2qt6.fsf@HIDDEN>
 <83r2290w24.fsf@HIDDEN> <ab7c7b7c-0699-c317-58b2-e3b60a1b2c4f@HIDDEN>
 <83pnhs6wwp.fsf@HIDDEN> <c1108254-91bf-578d-3ac5-747e59a33145@HIDDEN>
 <878sofon8v.fsf@HIDDEN> <837e3z7pzo.fsf@HIDDEN>
 <ec09e70e-24e1-1e0a-4441-c94cf82a5936@HIDDEN> <831ru77ghg.fsf@HIDDEN>
 <9700fac4-b75d-cd6e-3360-78bd0f8c7db0@HIDDEN> <83blta5sep.fsf@HIDDEN>
 <5db0ddbf-7473-ca8e-8279-7f8435297771@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 38181
Cc: jonas@HIDDEN, 38181 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: jonas@HIDDEN, 38181 <at> debbugs.gnu.org
> From: martin rudalics <rudalics@HIDDEN>
> Date: Sun, 17 Nov 2019 19:16:32 +0100
> 
>  > Mmm... actually, it could be that we cannot resize windows during
>  > redisplay at all.  See, for example, how resize_mini_window does its
>  > tricky job.  We may need to call this outside of redisplay.
> 
> Inherently, resize_mini_window does what 'fit-window-to-buffer' does
> and it gets called from redisplay_internal.

And it immediately returns if that happens while redisplaying a
window.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.

Message received at 38181 <at> debbugs.gnu.org:


Received: (at 38181) by debbugs.gnu.org; 17 Nov 2019 18:36:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 17 13:36:06 2019
Received: from localhost ([127.0.0.1]:42598 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iWPP2-0004da-8X
	for submit <at> debbugs.gnu.org; Sun, 17 Nov 2019 13:36:06 -0500
Received: from eggs.gnu.org ([209.51.188.92]:38012)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iWPOz-0004d7-Tj
 for 38181 <at> debbugs.gnu.org; Sun, 17 Nov 2019 13:36:02 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:38496)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iWPOu-00081I-Cy; Sun, 17 Nov 2019 13:35:56 -0500
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 <eliz@HIDDEN>)
 id 1iWPOt-0001vd-Eu; Sun, 17 Nov 2019 13:35:55 -0500
Date: Sun, 17 Nov 2019 20:35:55 +0200
Message-Id: <83v9ri4agk.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
In-reply-to: <17cbad77-efb8-9e9e-9a14-99e2e2bc5782@HIDDEN> (message from
 martin rudalics on Sun, 17 Nov 2019 19:15:44 +0100)
Subject: Re: bug#38181: Actual height of mode-line not taken into account
References: <87eeyd3ul0.fsf@HIDDEN> <83d0dt2qt6.fsf@HIDDEN>
 <83r2290w24.fsf@HIDDEN> <ab7c7b7c-0699-c317-58b2-e3b60a1b2c4f@HIDDEN>
 <83pnhs6wwp.fsf@HIDDEN> <c1108254-91bf-578d-3ac5-747e59a33145@HIDDEN>
 <83k1806qca.fsf@HIDDEN> <acf6952e-a36b-0031-97a1-cde6398c9801@HIDDEN>
 <8336en7giv.fsf@HIDDEN> <81264049-4f88-fae7-6448-e0ac5d977268@HIDDEN>
 <83a78u5s8y.fsf@HIDDEN> <17cbad77-efb8-9e9e-9a14-99e2e2bc5782@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 38181
Cc: jonas@HIDDEN, 38181 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: jonas@HIDDEN, 38181 <at> debbugs.gnu.org
> From: martin rudalics <rudalics@HIDDEN>
> 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"?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.

Message received at 38181 <at> debbugs.gnu.org:


Received: (at 38181) by debbugs.gnu.org; 17 Nov 2019 18:21:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 17 13:21:55 2019
Received: from localhost ([127.0.0.1]:42560 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iWPBL-0004Ge-Ec
	for submit <at> debbugs.gnu.org; Sun, 17 Nov 2019 13:21:55 -0500
Received: from mout.gmx.net ([212.227.17.20]:35155)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1iWPBK-0004GR-5i
 for 38181 <at> debbugs.gnu.org; Sun, 17 Nov 2019 13:21:54 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1574014906;
 bh=CGkocnsRVG5+T5ekQSgp4mSsatN0B/8NWwbgNu1Q+7M=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=WPXys4vFSAbK1ANblOfbG5uj/04nX+bHZ6/eilgyi3bjJd6hkguS8QpGXfU2OVewM
 tWh082iBzEiLrbfLZ3kCPeEauXRED6HzE4oU6osRnG45y4NnpvJ/MmlBx7JeG/IeuM
 +LX3SWCVcMtUD7BF3SvuMvBmFXWCWi84LhIZnAV0=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.100] ([46.125.249.38]) by mail.gmx.com (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MTAFb-1iRGfT3XKh-00UYCb; Sun, 17
 Nov 2019 19:16:28 +0100
Subject: Re: bug#38181: Actual height of mode-line not taken into account
To: Eli Zaretskii <eliz@HIDDEN>
References: <87eeyd3ul0.fsf@HIDDEN> <83d0dt2qt6.fsf@HIDDEN>
 <83r2290w24.fsf@HIDDEN> <ab7c7b7c-0699-c317-58b2-e3b60a1b2c4f@HIDDEN>
 <83pnhs6wwp.fsf@HIDDEN> <c1108254-91bf-578d-3ac5-747e59a33145@HIDDEN>
 <878sofon8v.fsf@HIDDEN> <837e3z7pzo.fsf@HIDDEN>
 <ec09e70e-24e1-1e0a-4441-c94cf82a5936@HIDDEN> <831ru77ghg.fsf@HIDDEN>
 <9700fac4-b75d-cd6e-3360-78bd0f8c7db0@HIDDEN> <83blta5sep.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <5db0ddbf-7473-ca8e-8279-7f8435297771@HIDDEN>
Date: Sun, 17 Nov 2019 19:16:32 +0100
MIME-Version: 1.0
In-Reply-To: <83blta5sep.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: de-AT
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:jxdhMrZ9ORwFcOsazYZnqxdn3BnZgux0tNlpoW0Ha333BW2Aqhj
 fW/XTIyMvT4vQ0qlafGUA3znOTWU9NG/aIfHBIMKY46KjWccJkqkvgskkhCgmUJ2imFglgp
 hhO70pCiCWyEQYLnP/nLHmDaRKb1s9MxRlFTf3E1qxXHEpcM1qANkVyHTJ68JuogXFqFqlk
 0+yy+t3/St2A3MfVGSVew==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:VN6dN/I1QHQ=:Z9OGC/KMYL3XsuebFT9mLK
 lf0lTU8em+rqNnxRXK5wSXXSew1dDW4c51oiTiJA3HBSzfSuoNPGB1a3fR4TSnuztL2wntjMO
 f3nz1AGf6RG10ioHBvvXCLRJ3QmFZrdqu4Mm0jR2cEu/tVhWZs2ENTPTStMFD0w0Ccfx9J6ye
 O+zRq89B6AaRconBEZWnWpjijj2h5lrpUVV/SDdJsjkI7WcrHFreOaDfm80UTvHL4yW5ngavQ
 kF+uzUXJthHd87IPaEal1E4BfVSYW+6ZEp6EpbsKafUVNe/4r5HHD42cu9BjUkD6q60cTGh8+
 NQy80wpx5FeXUz//b58qLaYz+dCLoxnDAEkluvTey3CA1R3WmHKWEId5DWi0fxa/HFnuD+5oc
 l1m/XIwUnk2UfB2X63SiMisViGdhpOCX7wghbt1SH1nCCYH7K3jyah1u384asVPMxMvxD+w2R
 LDms6UuUjw9x9xHt0eRWM8StbIMZIGbM7iCas/NwUQEmzCDl/87E97uGi2NY7ZNfeCM5+frGW
 GJ4bG1B04Y9oKf/KWCkYs70fdpigxhodEA1knHTTdQZeak/20rMtc6vj2T3mvdFekF9NKgmGP
 wPdp59cF57maDgXtAtlCZc4jiNzKZ1uFSbbVZEp70roQn3oB47fiGpipxnETNwQNsgkbqjxU5
 MmTxYKSmHiY1n1ffOetk6TAOtyFbgo18DweMhUYFzAomCovuWgCoQLU9L6Lj+HdopI1RY+P4B
 kYySkf+/Klgch/1iOeZ1wQ6UZprfprW38uXi8hCYlg94dT39AwH4qc1Un2TbS6r0wMwb3SbKi
 ytW0D6Dx0P2ZkLksBvqd2bxPsDpSNR0v5/kmqdLin82qlunPEQTtHqT9MyJsbo2JrAjfLyzWs
 0pZWJYNQZIR00t9FvlcF4FrO+iVYOSMhIg1C+Gn2bdkenj5PBgVKcyqDcbTJSIXwTAR+ebDf0
 f+g807omW0LeGave3aBZQzMQu1MgE191JkC2m90habUcv0MoMwerBGBIWSpzx5Qac7Kffa7Xd
 iCDNikUOv8c57JSkGigyFydhMQqlPElRE30zXg7iOFjlXtTFq+vFCO7oGJH4eWODJua0V3eeq
 OQnnrV6wyhqYiB8n7kyiM7M1LT04eA2Vk+ccmrT3Fzxsk54u6Z+/TrOyzPwOc9hx+i7DhfLDX
 KCOgEGF4+44BuSJeowKqO8GbFxJpiJTfNJ+IAidK7yCwpVSq8/kBwbuPdRzsTJtPh1CgQ9Xwm
 moQS0RhJtlVCOozyKGqmU+1TPYW25Ef5ezl4iJ3JHNStU+YfGQfqTmzxwExY=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 38181
Cc: jonas@HIDDEN, 38181 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 > I'd prefer a hook, because the problem probably isn't limited to
 > fit-window-to-buffer.

The display engine has to be able to ultimately control the behavior
to avoid ending up in an infinite loop.  Hooks are dangerous (though
evaluating the mode line can be dangerous too IIRC).

 > Wait, don't we already call window-size-change-functions in this case?
 > If not, would it help if we did?

That's precisely what I would like to avoid.  Note that we do not
re-run window change functions when they, for example, change the size
of a window.  Such changes are, in a sense, lost to the next redisplay
cycle.

 >> display_mode_lines sets refit_window_to_buffer to 2 provided it is 1
 >> and the mode line height of this window has changed.
 >
 > The detection of the change in mode-line height is outside
 > display_mode_lines, see the snippet I posted up-thread.

Right.  It should be done there.

 >> The display engine eventually calls 'fit-window-to-buffer' for all
 >> windows that have refit_window_to_buffer equal 2 and sets it to 3.
 >
 > We need to figure out the "eventually" part.  It should happen after
 > the windows have their dimensions updated due to the mode-line
 > changes.  Do you know where this happens?

Nowhere, hopefully.  Managing the mode-line happens in the display
engine only.  Note that a function like 'window-text-height', for
example, detracts the mode line, header line and now even the tab line
heights on-the-fly from the stored pixel_height and might even use
estimate_mode_line_height.  The stored text_height _does_ include mode
and header line.

 >> This might be tricky for windows stored in configurations and states.
 >
 > Why tricky?  A stored configuration shouldn't be affected by any
 > changes after it's tored, no?

When we restore a configuration we probably should nullify the
bit-field to avoid unwanted re-runs.  Or not nullify to ensure
re-runs?

 > Mmm... actually, it could be that we cannot resize windows during
 > redisplay at all.  See, for example, how resize_mini_window does its
 > tricky job.  We may need to call this outside of redisplay.

Inherently, resize_mini_window does what 'fit-window-to-buffer' does
and it gets called from redisplay_internal.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.

Message received at 38181 <at> debbugs.gnu.org:


Received: (at 38181) by debbugs.gnu.org; 17 Nov 2019 18:15:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 17 13:15:59 2019
Received: from localhost ([127.0.0.1]:42550 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iWP5b-000474-7d
	for submit <at> debbugs.gnu.org; Sun, 17 Nov 2019 13:15:59 -0500
Received: from mout.gmx.net ([212.227.17.20]:57927)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1iWP5Z-00046p-Me
 for 38181 <at> debbugs.gnu.org; Sun, 17 Nov 2019 13:15:58 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1574014544;
 bh=5D4Zoc1sgeO/OGr0wI4OiEE6A3LuSNSTHzErBgBtqs0=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=QPOFTZYCTBR739csauiCgN4XE1wN1pZN/FaQY00qRpUeOKldYlIV5Rk+GKJmQbOD5
 SjxZSc8+hXE3/Y5N51mow6FZWo+82dZqvf3+AHEpBFOH6SA6mCJFwW7yf632k8b/s2
 tpj2r6z3X5v9YtgQQYR1W3lOoE2rVCLpM91puUTM=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.100] ([46.125.249.38]) by mail.gmx.com (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MJE6F-1iHL2p0o6F-00KgQg; Sun, 17
 Nov 2019 19:15:44 +0100
Subject: Re: bug#38181: Actual height of mode-line not taken into account
To: Eli Zaretskii <eliz@HIDDEN>
References: <87eeyd3ul0.fsf@HIDDEN> <83d0dt2qt6.fsf@HIDDEN>
 <83r2290w24.fsf@HIDDEN> <ab7c7b7c-0699-c317-58b2-e3b60a1b2c4f@HIDDEN>
 <83pnhs6wwp.fsf@HIDDEN> <c1108254-91bf-578d-3ac5-747e59a33145@HIDDEN>
 <83k1806qca.fsf@HIDDEN> <acf6952e-a36b-0031-97a1-cde6398c9801@HIDDEN>
 <8336en7giv.fsf@HIDDEN> <81264049-4f88-fae7-6448-e0ac5d977268@HIDDEN>
 <83a78u5s8y.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <17cbad77-efb8-9e9e-9a14-99e2e2bc5782@HIDDEN>
Date: Sun, 17 Nov 2019 19:15:44 +0100
MIME-Version: 1.0
In-Reply-To: <83a78u5s8y.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: de-AT
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:5kcSupGYz/jipbUFDFRlS9Zp/RtMG8gRdm6714peSnvT9MGfQq6
 +xHdigUMjio1fVMN6dgGLface0hQuYX754oUXapa6DPxTJ31metuRg1DFkZgTBpHRxoF805
 H2sXq1Un0hwRerT+sP2S0g0XhNqJfQ6Fc8bilKnIcJar5h+E/Ea2W9eXGZOdZhhtuV7/uJx
 cGuVMwKNx56w193qrkJUg==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:tuiZwnASH68=:M6wnvZir9LcE6qcLgyCxSg
 k2TfZcGudOADI7OkffkJ95JgbzpY5nLvaCbkM0qGViJJLPtcSCb6mOyyS4IhHQubX6yHCbPrO
 p9FPg7IFVLyhboKiPebBbQ+e/P5u482Q7NPKCpo2Ov5qvVKKjnpAW0ogf9mKogsIeWLesU1IG
 a4LZ3370+hnvaaycCsH9bYQ1J8I59QQmQEkMsT5rGkm6E0kM2W3lyV2tWOuQDFLUTkIbuKnMv
 6hyzZ1jnxZ4gKaJQ5lfeZRM72UWOG8xNEFI8GVblXjCG5VknuKkrmndusXAMFtak2sa1Ub7nF
 d/TvwIIscLP1RgtfpdiJoNjN5VFhESudOQNAR/q5XbsKLmUd8SsvD+J2bX7Y8EDAedtigLrLm
 g7h9CY/NRHAl4E4I3edPcI0qgBoPoZ+E6GTJXkiCJ2SDy2xxhI23w1ZJy8bYIwmhM1A7g6Dzn
 zzBMCCx0Type0BaYjMhDtmVgb94NjneeQU7krl1OsacpWI2UIlnehID50we/2CgVgDuX5TYI4
 XSuLpWJ2kVikTHyEZYL+/BEpyU9ZvdikBi+hm2QtsfYW8i70s0f7jS1jQZtcSUGFmSynkcc3q
 Qy6tP77zRQyndTJsm+BF3JE07ItVgGTYDHH5Isa2oRl+4gnuaZL2NpF/nWkQXCWo8jZqxg9F9
 blLsr0zT/8xGywbYMXL/aX4JE5rFyGaqrRVQ+ULmO2gt3OaNN07uWFtyjMjU4vIL8BOBMT0II
 zN7iCOksIGT3he/MXdR3qu8QMHGRCVkV+Vkr8p0AlEP9w0WRPuVg52r7ajYO+3qEAUGqYA6ic
 CCC4d0v6JfELY+C8r+pzahCKjY2JSmpBF9SoF102EJx6aTvJtDHQu9zqpu7peTTNyeQzFeI3S
 g2y6llVps5PPEkTeopGqhxHm/7AzgKxQAHKfwMqfb5DbB2uiPzeISg3Og4OgkRCFHpk9j42EQ
 xidyvw6Ic7fVgQz38ZhbXfkFQoSEoPDEBYVZiZK8qT7FOQS4qtep2q1wBl4OIpETXHP92a8VD
 DBiLJtb0xHqgSHs1ZkhAIEbElZCR0D6MjU+TZIc86WeCHWlXz1pXCx7Eiyt0+mJPuwzAnQVox
 zH/FNuOJxUzEiUEJOAe0nFxk5i9xgd4ASZ19uL006JnG0a2uFN17Q5HyUzEhD3fY/inJq/IV0
 S2Do0ejEzETKb04Ae7ONKSYqT+QTX4eSZuSmaLY5aJdaZvEMnkqJ6QF18wL1rC/wtgQjJ9sii
 4zRAuvqzaHPETsFQStWsPJmCpAxgGSjPRoCU2cQ==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 38181
Cc: jonas@HIDDEN, 38181 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 > 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).

 > 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
=E2=80=98fit-window-to-buffer=E2=80=99 call (without a redisplay, though)=
=2E

martin





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.

Message received at 38181 <at> debbugs.gnu.org:


Received: (at 38181) by debbugs.gnu.org; 17 Nov 2019 17:26:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 17 12:26:35 2019
Received: from localhost ([127.0.0.1]:42526 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iWOJm-0002wH-Rb
	for submit <at> debbugs.gnu.org; Sun, 17 Nov 2019 12:26:35 -0500
Received: from eggs.gnu.org ([209.51.188.92]:58702)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iWOJe-0002vx-La
 for 38181 <at> debbugs.gnu.org; Sun, 17 Nov 2019 12:26:33 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:36741)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iWOJZ-00009y-Hq; Sun, 17 Nov 2019 12:26:21 -0500
Received: from [176.228.60.248] (port=4774 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1iWOJY-0003IW-I4; Sun, 17 Nov 2019 12:26:21 -0500
Date: Sun, 17 Nov 2019 19:26:21 +0200
Message-Id: <83a78u5s8y.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
In-reply-to: <81264049-4f88-fae7-6448-e0ac5d977268@HIDDEN> (message from
 martin rudalics on Sun, 17 Nov 2019 09:55:47 +0100)
Subject: Re: bug#38181: Actual height of mode-line not taken into account
References: <87eeyd3ul0.fsf@HIDDEN> <83d0dt2qt6.fsf@HIDDEN>
 <83r2290w24.fsf@HIDDEN> <ab7c7b7c-0699-c317-58b2-e3b60a1b2c4f@HIDDEN>
 <83pnhs6wwp.fsf@HIDDEN> <c1108254-91bf-578d-3ac5-747e59a33145@HIDDEN>
 <83k1806qca.fsf@HIDDEN> <acf6952e-a36b-0031-97a1-cde6398c9801@HIDDEN>
 <8336en7giv.fsf@HIDDEN> <81264049-4f88-fae7-6448-e0ac5d977268@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 38181
Cc: jonas@HIDDEN, 38181 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: jonas@HIDDEN, 38181 <at> debbugs.gnu.org
> From: martin rudalics <rudalics@HIDDEN>
> Date: Sun, 17 Nov 2019 09:55:47 +0100
> 
>  > But I thought we'd established that mode-line height calculation is
>  > not the culprit, the culprit is the fact that a window's height is not
>  > recomputed when the mode-line height changes.  Did I misunderstand?
> 
> I don't think we contradicted each other's sayings here.  To
> recapitulate what we found out so far:
> 
> (1) To operate correctly in the user's sense, 'fit-window-to-buffer'
>      has to know the height of the mode line of the window it operates
>      on as it will be shown by the next redisplay.

I didn't see where fit-window-to-buffer looks at the height of the
mode line.  What did I miss?

> (2) When users or applications (maybe implicitly) change the mode line
>      appearance, they have no generally established way to tell Emacs
>      that this happened.  The display engine has to find out by herself
>      but then it's already too late for telling 'fit-window-to-buffer'.

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?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.

Message received at 38181 <at> debbugs.gnu.org:


Received: (at 38181) by debbugs.gnu.org; 17 Nov 2019 17:23:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 17 12:23:03 2019
Received: from localhost ([127.0.0.1]:42521 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iWOGL-0002qh-Cm
	for submit <at> debbugs.gnu.org; Sun, 17 Nov 2019 12:23:02 -0500
Received: from eggs.gnu.org ([209.51.188.92]:58418)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iWOGJ-0002qU-Tk
 for 38181 <at> debbugs.gnu.org; Sun, 17 Nov 2019 12:23:00 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:36688)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iWOGD-0006M2-WF; Sun, 17 Nov 2019 12:22:54 -0500
Received: from [176.228.60.248] (port=4559 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1iWOGD-0002mL-9x; Sun, 17 Nov 2019 12:22:53 -0500
Date: Sun, 17 Nov 2019 19:22:54 +0200
Message-Id: <83blta5sep.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
In-reply-to: <9700fac4-b75d-cd6e-3360-78bd0f8c7db0@HIDDEN> (message from
 martin rudalics on Sun, 17 Nov 2019 10:01:44 +0100)
Subject: Re: bug#38181: Actual height of mode-line not taken into account
References: <87eeyd3ul0.fsf@HIDDEN> <83d0dt2qt6.fsf@HIDDEN>
 <83r2290w24.fsf@HIDDEN> <ab7c7b7c-0699-c317-58b2-e3b60a1b2c4f@HIDDEN>
 <83pnhs6wwp.fsf@HIDDEN> <c1108254-91bf-578d-3ac5-747e59a33145@HIDDEN>
 <878sofon8v.fsf@HIDDEN> <837e3z7pzo.fsf@HIDDEN>
 <ec09e70e-24e1-1e0a-4441-c94cf82a5936@HIDDEN> <831ru77ghg.fsf@HIDDEN>
 <9700fac4-b75d-cd6e-3360-78bd0f8c7db0@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 38181
Cc: jonas@HIDDEN, 38181 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: jonas@HIDDEN, 38181 <at> debbugs.gnu.org
> From: martin rudalics <rudalics@HIDDEN>
> Date: Sun, 17 Nov 2019 10:01:44 +0100
> 
>  > Maybe fit-window-to-buffer should set some hook, which redisplay
>  > should call if it finds out that the mode-line height changed?
> 
> Maybe a two-bits sticky bit-field in the window structure called
> refit_window_to_buffer.  The Lisp interface to it is a function called
> 'refit-window-to-buffer' setting refit_window_to_buffer to 1 if it is
> zero.  'fit-window-to-buffer' always calls 'refit-window-to-buffer'.

I'd prefer a hook, because the problem probably isn't limited to
fit-window-to-buffer.

Wait, don't we already call window-size-change-functions in this case?
If not, would it help if we did?

> display_mode_lines sets refit_window_to_buffer to 2 provided it is 1
> and the mode line height of this window has changed.

The detection of the change in mode-line height is outside
display_mode_lines, see the snippet I posted up-thread.

> The display engine eventually calls 'fit-window-to-buffer' for all
> windows that have refit_window_to_buffer equal 2 and sets it to 3.

We need to figure out the "eventually" part.  It should happen after
the windows have their dimensions updated due to the mode-line
changes.  Do you know where this happens?

> This might be tricky for windows stored in configurations and states.

Why tricky?  A stored configuration shouldn't be affected by any
changes after it's tored, no?

> And always remember the fact that in one and the same display cycle
> 'fit-window-to-buffer' may have been called for two windows above each
> other.

Mmm... actually, it could be that we cannot resize windows during
redisplay at all.  See, for example, how resize_mini_window does its
tricky job.  We may need to call this outside of redisplay.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.

Message received at 38181 <at> debbugs.gnu.org:


Received: (at 38181) by debbugs.gnu.org; 17 Nov 2019 16:21:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 17 11:21:21 2019
Received: from localhost ([127.0.0.1]:42459 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iWNIf-0005sN-5I
	for submit <at> debbugs.gnu.org; Sun, 17 Nov 2019 11:21:21 -0500
Received: from mail.hostpark.net ([212.243.197.30]:48862)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jonas@HIDDEN>) id 1iWNIc-0005sF-QH
 for 38181 <at> debbugs.gnu.org; Sun, 17 Nov 2019 11:21:19 -0500
Received: from localhost (localhost [127.0.0.1])
 by mail.hostpark.net (Postfix) with ESMTP id 364D516651;
 Sun, 17 Nov 2019 17:21:18 +0100 (CET)
X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net
Received: from mail.hostpark.net ([127.0.0.1])
 by localhost (mail1.hostpark.net [127.0.0.1]) (amavisd-new, port 10124)
 with ESMTP id 48JWTTOvrer7; Sun, 17 Nov 2019 17:21:17 +0100 (CET)
Received: from customer (localhost [127.0.0.1])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mail.hostpark.net (Postfix) with ESMTPSA id A45D016620;
 Sun, 17 Nov 2019 17:21:17 +0100 (CET)
References: <87eeyd3ul0.fsf@HIDDEN> <83d0dt2qt6.fsf@HIDDEN>
 <83r2290w24.fsf@HIDDEN> <ab7c7b7c-0699-c317-58b2-e3b60a1b2c4f@HIDDEN>
 <83pnhs6wwp.fsf@HIDDEN> <c1108254-91bf-578d-3ac5-747e59a33145@HIDDEN>
 <878sofon8v.fsf@HIDDEN> <837e3z7pzo.fsf@HIDDEN>
User-agent: mu4e 1.1.0; emacs 27.0.50
From: Jonas Bernoulli <jonas@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#38181: Actual height of mode-line not taken into account
In-reply-to: <837e3z7pzo.fsf@HIDDEN>
Date: Sun, 17 Nov 2019 17:21:17 +0100
Message-ID: <87k17ya2yq.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 38181
Cc: rudalics@HIDDEN, 38181 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)


Eli Zaretskii <eliz@HIDDEN> writes:

> You are right saying that displaying a window causes a redisplay, but
> keep in mind that redisplay triggered by that happens _after_ the
> command which enlarged the mode-line height finishes, and by that time
> fit-window-to-buffer will have already run (using stale window
> dimensions).

Thanks for that reminder.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.

Message received at 38181 <at> debbugs.gnu.org:


Received: (at 38181) by debbugs.gnu.org; 17 Nov 2019 16:17:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 17 11:17:41 2019
Received: from localhost ([127.0.0.1]:42450 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iWNF6-0005m6-Uq
	for submit <at> debbugs.gnu.org; Sun, 17 Nov 2019 11:17:41 -0500
Received: from mail.hostpark.net ([212.243.197.30]:48520)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jonas@HIDDEN>) id 1iWNF5-0005lx-3l
 for 38181 <at> debbugs.gnu.org; Sun, 17 Nov 2019 11:17:39 -0500
Received: from localhost (localhost [127.0.0.1])
 by mail.hostpark.net (Postfix) with ESMTP id B1DEB16620;
 Sun, 17 Nov 2019 17:17:37 +0100 (CET)
X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net
Received: from mail.hostpark.net ([127.0.0.1])
 by localhost (mail1.hostpark.net [127.0.0.1]) (amavisd-new, port 10124)
 with ESMTP id BZJGF0NolHKc; Sun, 17 Nov 2019 17:17:37 +0100 (CET)
Received: from customer (localhost [127.0.0.1])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mail.hostpark.net (Postfix) with ESMTPSA id 426501660F;
 Sun, 17 Nov 2019 17:17:37 +0100 (CET)
References: <87eeyd3ul0.fsf@HIDDEN> <83d0dt2qt6.fsf@HIDDEN>
 <87a78xnrp0.fsf@HIDDEN> <835zjl2mzs.fsf@HIDDEN>
 <87eey8og08.fsf@HIDDEN> <83o8xc6wsn.fsf@HIDDEN>
 <87bltbooqq.fsf@HIDDEN> <838sof7qxy.fsf@HIDDEN>
User-agent: mu4e 1.1.0; emacs 27.0.50
From: Jonas Bernoulli <jonas@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#38181: Actual height of mode-line not taken into account
In-reply-to: <838sof7qxy.fsf@HIDDEN>
Date: Sun, 17 Nov 2019 17:17:36 +0100
Message-ID: <87mucua34v.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 38181
Cc: 38181 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)


Eli Zaretskii <eliz@HIDDEN> writes:

> The problem is that
> this data is recalculated only when the window is redisplayed, so
> without the call to 'redisplay' we use stale data until the next
> redisplay cycle.
>
> However, if all the mode lines have the same height, then the problem
> shouldn't have happened, and so now I wonder what am I missing.

I think the culprit is that we are not reusing some existing window to
display a new buffer but actually split an existing window in two and
then display the new buffer in the new window which never had its mode-
line height calculated.

> If
> you simulate the situation where the mode line changes, while keeping
> its height (even if that height is unusually large), does the problem
> with fit-window-to-buffer still happen?

No, if the mode-line (height) can be "reused", then there is no problem.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.

Message received at 38181 <at> debbugs.gnu.org:


Received: (at 38181) by debbugs.gnu.org; 17 Nov 2019 09:01:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 17 04:01:58 2019
Received: from localhost ([127.0.0.1]:40265 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iWGRS-00021p-4A
	for submit <at> debbugs.gnu.org; Sun, 17 Nov 2019 04:01:58 -0500
Received: from mout.gmx.net ([212.227.17.21]:49667)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1iWGRQ-0001w4-2K
 for 38181 <at> debbugs.gnu.org; Sun, 17 Nov 2019 04:01:56 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1573981305;
 bh=RePeYdgb1sbk1BjcfPz0ShTwgIGCD30OJMBDbnZTME4=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=QUlei22XUUrT/JVTv/zZAjdc/Zuqn+GSwa3z0jWoUtPj7tuuYshfyTvDboMq+Gqwz
 w3ujjuePEVbEnF7L6Reh28ps7b5Yf13OOXauill4lcCoKthXPsUufBM3DC69JoevTD
 aja5ZEYadoo3PBmBEYdtwymLSbKfS8J6v8vV8ipU=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.103] ([212.95.5.179]) by mail.gmx.com (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M6Udt-1iTnaj3ykT-006zPk; Sun, 17
 Nov 2019 10:01:45 +0100
Subject: Re: bug#38181: Actual height of mode-line not taken into account
To: Eli Zaretskii <eliz@HIDDEN>
References: <87eeyd3ul0.fsf@HIDDEN> <83d0dt2qt6.fsf@HIDDEN>
 <83r2290w24.fsf@HIDDEN> <ab7c7b7c-0699-c317-58b2-e3b60a1b2c4f@HIDDEN>
 <83pnhs6wwp.fsf@HIDDEN> <c1108254-91bf-578d-3ac5-747e59a33145@HIDDEN>
 <878sofon8v.fsf@HIDDEN> <837e3z7pzo.fsf@HIDDEN>
 <ec09e70e-24e1-1e0a-4441-c94cf82a5936@HIDDEN> <831ru77ghg.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <9700fac4-b75d-cd6e-3360-78bd0f8c7db0@HIDDEN>
Date: Sun, 17 Nov 2019 10:01:44 +0100
MIME-Version: 1.0
In-Reply-To: <831ru77ghg.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: de-AT
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:9MFuOhzYrOYl+RdcNDITTOJ1mr5Cu3vopvjxVlShcH449b8/b3B
 SDiUSxwgxVUPy8azXBa1/PqIhXZS7CZRYT6j1HLd8Z8Q8AhOVu/hTwrN3Ic3NiwpUfdfO/A
 tc8Cg4BlQKz+dQD/FRb0NJ+pBi0chgHgNhqmfRstIZ8ugRIycsbekyHUR+YYr87oWvhN3Ds
 PIM0i+0fox6OesIgAYCbw==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:+9iNtlQ0eQ4=:dLUotddIwrchA+DcZEuBO2
 CcgN08hr+DSkwMemZ8EThLyZh+oceTPRk5V48fa8jXaEjnad4CNajdOnt+5Z2aGjgrna5Xvou
 cs+kT42HU9AuW8OOaPJeXaq8TLNdCH3ejwRgviiuEqjCzbpH4LsjldUydgQUVqVPzn+o/DXGF
 LJDSyxmaRJICMQ5nHezrfIDrfH/wJfhjN0xCOJfBj2GLn8TBlABLa30r8P11e0gRNrEmKfKoO
 gKq3bQNvdJ8HbYirzSJWx/uIuGcN/4VNMcn8N6rr323YiecPI7A2hsqpwRIxlTIXVgA+Avu1t
 XJhGZnM6KEthn+K59wSj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38181 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 > Maybe fit-window-to-buffer should set some hook, which redisplay
 > should call if it finds out that the mode-line height changed?

Maybe a two-bits sticky bit-field in the window structure called
refit_window_to_buffer.  The Lisp interface to it is a function called
'refit-window-to-buffer' setting refit_window_to_buffer to 1 if it is
zero.  'fit-window-to-buffer' always calls 'refit-window-to-buffer'.

display_mode_lines sets refit_window_to_buffer to 2 provided it is 1
and the mode line height of this window has changed.  The display
engine eventually calls 'fit-window-to-buffer' for all windows that
have refit_window_to_buffer equal 2 and sets it to 3.  When the
display engine is done with redisplay it resets refit_window_to_buffer
for all windows to 0.

This might be tricky for windows stored in configurations and states.
And always remember the fact that in one and the same display cycle
'fit-window-to-buffer' may have been called for two windows above each
other.  So this is definitely not for Emacs 27.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.

Message received at 38181 <at> debbugs.gnu.org:


Received: (at 38181) by debbugs.gnu.org; 17 Nov 2019 08:56:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 17 03:56:07 2019
Received: from localhost ([127.0.0.1]:40258 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iWGLm-0000AU-RT
	for submit <at> debbugs.gnu.org; Sun, 17 Nov 2019 03:56:07 -0500
Received: from mout.gmx.net ([212.227.17.21]:46237)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1iWGLk-00009z-RR
 for 38181 <at> debbugs.gnu.org; Sun, 17 Nov 2019 03:56:05 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1573980948;
 bh=EYgOeHX2UiTJkW+hu/cmR4wbxG14NzdV0oCpen/Xk34=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=UFy2IwXODp65sfvDma30AtC9XttWR7r9c8cztYD8dvGNKVxFH11KW9hurc3d8WcEO
 NOfANyX5vay7J8qqmTPCrvt1zJQfAyM10yH/FW6ATlJZGlHnuv9rle2gRhSiLa7A3s
 9S0maEi3gOJAalMWJoy69aM9nehT5oqR0nJxOhHA=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.103] ([212.95.5.179]) by mail.gmx.com (mrgmx105
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MRTNF-1iBB7R2v6D-00NQuz; Sun, 17
 Nov 2019 09:55:48 +0100
Subject: Re: bug#38181: Actual height of mode-line not taken into account
To: Eli Zaretskii <eliz@HIDDEN>
References: <87eeyd3ul0.fsf@HIDDEN> <83d0dt2qt6.fsf@HIDDEN>
 <83r2290w24.fsf@HIDDEN> <ab7c7b7c-0699-c317-58b2-e3b60a1b2c4f@HIDDEN>
 <83pnhs6wwp.fsf@HIDDEN> <c1108254-91bf-578d-3ac5-747e59a33145@HIDDEN>
 <83k1806qca.fsf@HIDDEN> <acf6952e-a36b-0031-97a1-cde6398c9801@HIDDEN>
 <8336en7giv.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <81264049-4f88-fae7-6448-e0ac5d977268@HIDDEN>
Date: Sun, 17 Nov 2019 09:55:47 +0100
MIME-Version: 1.0
In-Reply-To: <8336en7giv.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: de-AT
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:Zg0Sg/8BxSR5czgSTvIJE4IMbXD7QU8n+A+uxSHbUdSQfi8PQWb
 IgEdirn9EFBOGBvQHMVaFEMVpS+JDgx+J8ndu+U7dGCylzVj9cEVW7Te/hLKDekZR0DJEgW
 tCTvLWS9ssoDqTMQhWGrLBDS7McNvrOWXiAZfrueDY9DsaLHWyFLxU5h/N7G9BdUTcHNSFI
 V5vtfH58tqDVq6cbh7Gaw==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:ZevKaqskI0g=:VUdMGWWG3vcdkK3PIIj0lx
 H3eUFTc9oIN7z053Xq43+dtIGYLtsfeOZtmv6B8ozaKwfGCUL3db0vd34/qmQUY+3PX4SDEPx
 KLLvL8em/f/Vd1exd6QLoIfaEfReXx/zt+T40+3S/36bYTv6dkb5dJZxSjF/E/7WENNTYLHCl
 u2uW+YAOpdE2qF/12nbsujPxGeVQvmla0RnXmPUD4dRfED6vXFQwy1ndRH/4QxENUYkmKiVoM
 SNL0Mj0h/cmH4vazr6xnlMaPclBc8cyleHbBdkGQPM6zsuHB2VE5gychLtHfyZS+KYBvr+FTr
 gPakU7GWXc9+Zo5XN3FPQFIaBI/mnMd3RRJCY0oA0VWgPuEjck0dY69OM6v/gMxH4N1RxbpqZ
 LjJLsVOvZ2TR/JrWx3ckOOv1vJOgGYDvigl4xp9X9YF5LusOSRt4XA67PtBw8aex//tMLsc+7
 2BENWGWHsAJDrASduzelVbS752Q+cpzzJLL4/wMDE3Unm063mTYO9VdXC+utglfnvuvvUkIFk
 50OIVC3Jqb91MVFUZ/Mf+bk8cvPVdF98FD0kQdiXB+8N/zsWD4DuCoFW/7U8LABg2xLGcWOsM
 Wkevyab1ytRsgfQE/M+Klr+EkUUkCGUJq5BBHRQ4V5N4VFNRR9yv4pBDKVXJZkD/ZYpE6VUek
 AnBECPGZXlNoK/Tn5ueqjkIV49osj3SyxI0qDDTPqidicayDpbfBBtHpw+T+4+NYjmClqEl/3
 AuZh2jv04upupWqCpe3mYQ3Y+f1ryf//mnrhNVXjPeZuSaus4atMKDvWOGOUfCmj5D7jV2tOi
 ydiWnU+WGDAgMW9k9lQ8EP/jaEXfreGx9X0wu5vxXYoK9UED9QiRojCyrDVtgvy2hMCf4NApa
 OohTBDBOkx5f/wQS0tRgfHTV6lcnU3O4QKEsjIF+bv7bv10d7GUXR7GzCuUltWjp9+twrhMTO
 8K6Fu+Cqc5NV8750g60ncLpiusIXZKrLSrGfecbEvJZLgXQB6Nkkprb7UWg833a5C97oEINJn
 wuuj5I7Hx9tRV8/CvHqQvnYfOXEjTE3KXi93ybgCLhlay0CZ/w2KPl7o8AlCRGfGGg5tHb1kU
 l+IPBmTHgOkupusnH5LwM3V9Vyo9RxkSQja31+RUeokYMflHt8eeQfhv+HBu7EUn9YHFeeweA
 qbM5SnfDyB6dJJOUxtuODJwY7ksUV5hYjntbXgSzHMwMyf4m4fBtJw+qIgwLDJzg6TukHzmvK
 XJqvRpYguhPx2bTSSj0s3CJKMpuadN6S9CaHdpZ8rOOWO64SxpjDHIe0UPd8=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 38181
Cc: jonas@HIDDEN, 38181 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 > But I thought we'd established that mode-line height calculation is
 > not the culprit, the culprit is the fact that a window's height is not
 > recomputed when the mode-line height changes.  Did I misunderstand?

I don't think we contradicted each other's sayings here.  To
recapitulate what we found out so far:

(1) To operate correctly in the user's sense, 'fit-window-to-buffer'
     has to know the height of the mode line of the window it operates
     on as it will be shown by the next redisplay.

(2) When users or applications (maybe implicitly) change the mode line
     appearance, they have no generally established way to tell Emacs
     that this happened.  The display engine has to find out by herself
     but then it's already too late for telling 'fit-window-to-buffer'.

The question we yet have to resolve is now "only" _whether_ we can
safely recompute a window's height after redisplay detects that the
mode line height has changed.  This may easily trigger window change
functions which might easily change the mode line height again ...

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.

Message received at 38181 <at> debbugs.gnu.org:


Received: (at 38181) by debbugs.gnu.org; 16 Nov 2019 19:45:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 16 14:45:26 2019
Received: from localhost ([127.0.0.1]:39739 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iW40c-0003kf-EV
	for submit <at> debbugs.gnu.org; Sat, 16 Nov 2019 14:45:26 -0500
Received: from eggs.gnu.org ([209.51.188.92]:39092)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iW40a-0003kT-Ee
 for 38181 <at> debbugs.gnu.org; Sat, 16 Nov 2019 14:45:24 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:52415)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iW40V-0003nu-9X; Sat, 16 Nov 2019 14:45:19 -0500
Received: from [176.228.60.248] (port=1257 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1iW40T-0003WX-RG; Sat, 16 Nov 2019 14:45:18 -0500
Date: Sat, 16 Nov 2019 21:45:15 +0200
Message-Id: <831ru77ghg.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
In-reply-to: <ec09e70e-24e1-1e0a-4441-c94cf82a5936@HIDDEN> (message from
 martin rudalics on Sat, 16 Nov 2019 20:30:55 +0100)
Subject: Re: bug#38181: Actual height of mode-line not taken into account
References: <87eeyd3ul0.fsf@HIDDEN> <83d0dt2qt6.fsf@HIDDEN>
 <83r2290w24.fsf@HIDDEN> <ab7c7b7c-0699-c317-58b2-e3b60a1b2c4f@HIDDEN>
 <83pnhs6wwp.fsf@HIDDEN> <c1108254-91bf-578d-3ac5-747e59a33145@HIDDEN>
 <878sofon8v.fsf@HIDDEN> <837e3z7pzo.fsf@HIDDEN>
 <ec09e70e-24e1-1e0a-4441-c94cf82a5936@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 38181
Cc: jonas@HIDDEN, 38181 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: 38181 <at> debbugs.gnu.org
> From: martin rudalics <rudalics@HIDDEN>
> Date: Sat, 16 Nov 2019 20:30:55 +0100
> 
>  > However, if after
>  > calling display_mode_lines we detect that the height of the mode line
>  > changed, we schedule an immediate thorough redisplay.
> 
> ... which, unfortunately, will not re-run ‘fit-window-to-buffer’ but
> just use its earlier computed values.

Maybe fit-window-to-buffer should set some hook, which redisplay
should call if it finds out that the mode-line height changed?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.

Message received at 38181 <at> debbugs.gnu.org:


Received: (at 38181) by debbugs.gnu.org; 16 Nov 2019 19:44:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 16 14:44:34 2019
Received: from localhost ([127.0.0.1]:39735 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iW3zl-0003if-Vh
	for submit <at> debbugs.gnu.org; Sat, 16 Nov 2019 14:44:34 -0500
Received: from eggs.gnu.org ([209.51.188.92]:38952)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iW3zk-0003iQ-7w
 for 38181 <at> debbugs.gnu.org; Sat, 16 Nov 2019 14:44:32 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:52401)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iW3ze-0003Fx-Di; Sat, 16 Nov 2019 14:44:26 -0500
Received: from [176.228.60.248] (port=1204 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1iW3zd-0003Qm-Gj; Sat, 16 Nov 2019 14:44:26 -0500
Date: Sat, 16 Nov 2019 21:44:24 +0200
Message-Id: <8336en7giv.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
In-reply-to: <acf6952e-a36b-0031-97a1-cde6398c9801@HIDDEN> (message from
 martin rudalics on Sat, 16 Nov 2019 20:28:10 +0100)
Subject: Re: bug#38181: Actual height of mode-line not taken into account
References: <87eeyd3ul0.fsf@HIDDEN> <83d0dt2qt6.fsf@HIDDEN>
 <83r2290w24.fsf@HIDDEN> <ab7c7b7c-0699-c317-58b2-e3b60a1b2c4f@HIDDEN>
 <83pnhs6wwp.fsf@HIDDEN> <c1108254-91bf-578d-3ac5-747e59a33145@HIDDEN>
 <83k1806qca.fsf@HIDDEN> <acf6952e-a36b-0031-97a1-cde6398c9801@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 38181
Cc: jonas@HIDDEN, 38181 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: jonas@HIDDEN, 38181 <at> debbugs.gnu.org
> From: martin rudalics <rudalics@HIDDEN>
> Date: Sat, 16 Nov 2019 20:28:10 +0100
> 
>  > What are the frequent calls?  Help and completions windows come to
>  > mind, but those are interactive, and so I'm not sure I see why calling
>  > redisplay would be a bad idea there.  Are there other callers which
>  > I'm missing?
> 
> The functions for displaying temporary buffers when
> 'temp-buffer-resize-mode' is on.  I do not think that the overhead for
> calculating the mode line height is excessive.  It's just that IIUC
> even Jonas changes the mode line height only once per window/buffer
> assignment so even for him this overhead is practically always lost.

But I thought we'd established that mode-line height calculation is
not the culprit, the culprit is the fact that a window's height is not
recomputed when the mode-line height changes.  Did I misunderstand?

>  >> Right.  But that same program could also redisplay all windows in
>  >> these cases, right?
>  >
>  > I meant that calling redisplay should do this automatically.
> 
> By calculating the mode line before drawing the scroll bars?

No, by triggering redrawing of scroll bars when we detect that the
mode line changed its height.  In this place of redisplay_window:

      display_mode_lines (w);

      /* If mode line height has changed, arrange for a thorough
	 immediate redisplay using the correct mode line height.  */
      if (window_wants_mode_line (w)
	  && CURRENT_MODE_LINE_HEIGHT (w) != DESIRED_MODE_LINE_HEIGHT (w))
	{
	  f->fonts_changed = true;
	  w->mode_line_height = -1;
	  MATRIX_MODE_LINE_ROW (w->current_matrix)->height
	    = DESIRED_MODE_LINE_HEIGHT (w);
	}

Or maybe in redisplay_internal, when we see that f->fonts_changed is
set.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.

Message received at 38181 <at> debbugs.gnu.org:


Received: (at 38181) by debbugs.gnu.org; 16 Nov 2019 19:31:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 16 14:31:13 2019
Received: from localhost ([127.0.0.1]:39726 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iW3mr-0003QX-BL
	for submit <at> debbugs.gnu.org; Sat, 16 Nov 2019 14:31:13 -0500
Received: from mout.gmx.net ([212.227.17.22]:32879)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1iW3mp-0003QJ-4I
 for 38181 <at> debbugs.gnu.org; Sat, 16 Nov 2019 14:31:11 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1573932655;
 bh=PCPFyDuMkL0MIQtVvf8BHP9BbGFx5CW8I2pAScdR48s=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=Yq6dcQ4J30n4+Sa4io6u9Nq+fhhbC50+59M9MQxkQV2XJpRx/I/BLmbUP5WMc0cYG
 TefP6SSFC3E2pueXblL2fglQXqr/GbSmUf5TuTqdplgqtyXYKBlVTlvSuPkbB6NH+4
 wUJhvie3iFBzf2eZyac6NVyDLsiXpa3EU/r3l5u4=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.101] ([212.95.5.86]) by mail.gmx.com (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MzQgC-1hawxT1HAe-00vN7k; Sat, 16
 Nov 2019 20:30:55 +0100
Subject: Re: bug#38181: Actual height of mode-line not taken into account
To: Eli Zaretskii <eliz@HIDDEN>, Jonas Bernoulli <jonas@HIDDEN>
References: <87eeyd3ul0.fsf@HIDDEN> <83d0dt2qt6.fsf@HIDDEN>
 <83r2290w24.fsf@HIDDEN> <ab7c7b7c-0699-c317-58b2-e3b60a1b2c4f@HIDDEN>
 <83pnhs6wwp.fsf@HIDDEN> <c1108254-91bf-578d-3ac5-747e59a33145@HIDDEN>
 <878sofon8v.fsf@HIDDEN> <837e3z7pzo.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <ec09e70e-24e1-1e0a-4441-c94cf82a5936@HIDDEN>
Date: Sat, 16 Nov 2019 20:30:55 +0100
MIME-Version: 1.0
In-Reply-To: <837e3z7pzo.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: de-AT
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:+VGC5EwaExBeqsmOoaX6JZyhouhOjsqgwA1zB/QkhI4aVm/OMGF
 F+RnAtt/dq4EdxqFtCSSXOGzICv7dZqUfPgNSRDHX9vcWAaQWqm8DPHaVNGrtqug4+oeghQ
 F+XNLYrQ56xLZOpuCOV5XEooSPym4wf+UoR0UnlNnfBkWF2OviSWTkaKHXFx4EuvW7VhhHN
 iV+K/6ABmuiPg/CUPtH7Q==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:OIWFvKqLtxo=:XW0Uu1AsEn8k6aeNBvhOiZ
 tVzmUAQ0o5MVq244F1E4akMJw2QgY6XJMM2aJMWYYzmVo7Kao+/CecEkLCnthaOZhNQkUl2V+
 kNoBVpjIkZSSOYYtzIBJBPWhFOyeimNTSYc5aTlW8cYdPzv8iDuQWSHsONNaYhvubaDuH2N+X
 k6X9anuur5hOQj3gMcGjw16P087eO+bfpFmQIbgWebbty89mbruIvzlDF0qsQ0cbaYLnSEpyu
 NSJxLwjBWJDsTlcdtCOQV32xbiTPOvHt/pGvVCgmwCsNxsqfJr4z9DwwVGOjBDrz193GDyHCh
 fUmoNLdIqs2Q/XILuPZNWRVeBdMcTQ6Kq/Tw59HDNlyeQyKb5Idfonbfc7yHJwv9LPXtctVET
 YrMyGkWh3neIlYoaxLcBXRKYigm6LWZKXv+u4Kvui1kvc+bJ0uA18ZHu7etWyKkZM+d69fz9w
 h2x4K5aQwBdOA36elKgDSp9hCVqEtIXERXYojgfnBxiMxOzwkPOgqpLUHqHjUZw76fCVp/jCv
 UiMLQDEz4k5Cn1Yulgw3tZi61FjF5kfMftf3IVdHBpo82nXnufgsSRzmde1kPcdRq4QOsFzp/
 /XHW4OlegW14nlkHDSahAYR6UZxA00Sz2jxZDtmxEt+Yn5vCi7doNqtPFVTA0lSR3C2c7otGO
 nfdkKmWDYMLl+gmqUHVWhcKD2X5oPSgzhkOb+tLMxH8xATHlxo2dT8hW1JwXLee+gvjrfDi+4
 /5WfnAzTFiRWRGmlWPOz/WiR/KTuj/5cX43dL1VrUcyYebUaRgXWcDmFrY7cI3G8C4G0Y1qOR
 ETCVQ5UgnWH8OAkm0xHjKgxpqrJhDvKcviHvQjt9192bzxh5rmg4j0WRQT6tzVh00C2eQDs64
 cO3Vrz9LjdgnQ/WNRl5Pexx2HprKRdcryK8mPUD3Xjs5wh+GJH9+TnAH+TPODrc37LUDzfSJi
 HjBuRY5ConmIAUMh+MvsqElDRaKTHejV3NfWJgI9fPq7Lr4eBQLvwgrWN8k0Jtg+qRDFPnCPX
 MSWni3po+tz842EnZDRqYoaX1NFYg4UZkreiz/9A8KV2D989zJeh94sF1hAbDyIQcoKzx0Ndb
 Fkoia43NREI01HofF9z2LSWVm/Txpm7DspHZdwAR43/C4qoJKJ8MR5ylubFh8Vm0rkB51VVdy
 is/dKiDi7CwIZuLGTveQItO6ufX5KrKyvFK3d9GVC+hpMqLH/cZNQqaLqgtS4netelkuDFfYC
 uAEIz3TcszGw0SjWnjaTWIUIzwCaaNKyQkoZQtLY2qYPU1g974v9OIv2QgRc=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 38181
Cc: 38181 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 > However, if after
 > calling display_mode_lines we detect that the height of the mode line
 > changed, we schedule an immediate thorough redisplay.

=2E.. which, unfortunately, will not re-run =E2=80=98fit-window-to-buffer=
=E2=80=99 but
just use its earlier computed values.  Theoretically, 'redisplay'
could check the 'preserve-size' parameter of each window and try to
preserve the text height when resizing the mode line.  But I wouldn't
want to think of all the tricky details of such an approach.

martin





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.

Message received at 38181 <at> debbugs.gnu.org:


Received: (at 38181) by debbugs.gnu.org; 16 Nov 2019 19:30:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 16 14:30:22 2019
Received: from localhost ([127.0.0.1]:39722 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iW3m1-0003P4-Tq
	for submit <at> debbugs.gnu.org; Sat, 16 Nov 2019 14:30:22 -0500
Received: from mout.gmx.net ([212.227.17.21]:40805)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1iW3ly-0003Oo-DT
 for 38181 <at> debbugs.gnu.org; Sat, 16 Nov 2019 14:30:18 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1573932612;
 bh=tl0HPEOMgL3TiqpXTd2dLaeXLQrrsdj6XehvjdUHjV4=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=RD9a6xEYGByO0zM1HHS/sp44kZxAHl7Oe9VFHyDtjcBU+OuIS16aJDDCbz5VOhrLA
 KxbHAecG887cx+7MQfSqDQKFpbB8CISTZDSNyexiFgEhtieUV3aDPEbd0CWQvCUjQA
 vIez6g324SIsegaKsO2JnUzoWUdnqruv6B7XihVM=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.101] ([212.95.5.86]) by mail.gmx.com (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MKbg4-1iHg9Q1LjQ-00KxRk; Sat, 16
 Nov 2019 20:30:12 +0100
Subject: Re: bug#38181: Actual height of mode-line not taken into account
To: Jonas Bernoulli <jonas@HIDDEN>
References: <87eeyd3ul0.fsf@HIDDEN> <83d0dt2qt6.fsf@HIDDEN>
 <83r2290w24.fsf@HIDDEN> <ab7c7b7c-0699-c317-58b2-e3b60a1b2c4f@HIDDEN>
 <83pnhs6wwp.fsf@HIDDEN> <c1108254-91bf-578d-3ac5-747e59a33145@HIDDEN>
 <878sofon8v.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <f8b4e279-f24b-e294-58d7-fcd33b55aa7b@HIDDEN>
Date: Sat, 16 Nov 2019 20:30:11 +0100
MIME-Version: 1.0
In-Reply-To: <878sofon8v.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: de-AT
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:earPChNY/BcSwyL4PTkabyUhnpO99Td+eMfvJjjk7fnfFcIQ7La
 5l2OBEHrCMFnJrdTAnXVTjjgc6ap+dGboHpFZ+dlgC0HOTaC1RYC1xNNJXeBiUtZtTM6v3q
 9FtirHM6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dZ8K675w3FuyLxwB9f3YNVm3ZcqTAGJXGcOK7/coOJN90+s47r1pxKNO6kL
 qZRBaloJpNaNHh0UZRy+PInBOS9JaReXbQxqcWDTiHx4B9ZaVUBlogCgshsOzVKKY8aALgK5d
 k9t33L5RMwEwBbVEPn+MIp0a6mhk0IZdm52zQXkrfZHitrYrG1R+Nb9WRMuzOMqTsQcgEZ/ar
 a1if2SWKbBi0PlAx3+UhLpP887YTdPD3JWqXui3uhpiCmFz6CcrI5aaZp4KLJIhsrqQBCgBl2
 VJol61nzSW6ZFM6p2XwnGfHWmSyD8jMLZ0Ex8VmzBEIrol/A8jftsQxvBGC6181vtvtXsZxI2
 rD6vWNsKQFWuLO10znkHE3NGwmsYmQ6RcizhrvaQMHzTL64olxk8nAWmstGg=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 38181
Cc: Eli Zaretskii <eliz@HIDDEN>, 38181 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 > Again, the mode-line-prettifiers are not the ones who create new buffers
 > and then call fit-buffer-to-window.  It's arbitrary other packages that
 > do that.  An optional argument therefore would not help because when one
 > of the prettifier modes is active, then each and every third-party
 > caller of fit-buffer-to-window would have to pass that optional
 > argument.

I see.  Maybe a function 'set-default-mode-line-format' would be
useful here.  Anyway: At the time you prettify a mode line or show a
new buffer in a window with a to be prettified mode line, would doing
an immediate redisplay work around future problems?

 > This is the advice I currently use:
 >
 > (defvar-local moody--size-hacked-p nil)
 >
 > (defun moody-redisplay (&optional _force &rest _ignored)
 >    (unless moody--size-hacked-p
 >      (setq moody--size-hacked-p t)
 >      (redisplay t)))
 >
 > (advice-add 'fit-window-to-buffer :before #'moody-redisplay)
 >
 > Of course fit-buffer-to-window itself could be changed to do that and it
 > could also be taught to only do so iff the user opted in to doing it.

If we don't want 'fit-window-to-buffer' to do that always we'd need
some variable, either buffer local or even a window parameter, that
'fit-window-to-buffer' would inspect once and reset immediately in
order to perform only the redisplay call that's really needed.

 > Creating and displaying a new buffer and creating and resizing a new
 > window surely *already* causes a "redisplay" without the programmer
 > having to explicitly call `redisplay'.  So if we explicitly tell
 > fit-window-to-buffer to redisplay, then that means that we are
 > redisplaying twice, right?

I think so.  Maybe 'fit-window-to-buffer' could use the string
returned by 'format-mode-line' instead and calculate its height
without redisplaying anything.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.

Message received at 38181 <at> debbugs.gnu.org:


Received: (at 38181) by debbugs.gnu.org; 16 Nov 2019 19:28:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 16 14:28:31 2019
Received: from localhost ([127.0.0.1]:39717 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iW3kF-0003Kt-FO
	for submit <at> debbugs.gnu.org; Sat, 16 Nov 2019 14:28:31 -0500
Received: from mout.gmx.net ([212.227.17.21]:45509)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1iW3kD-0003Kg-Is
 for 38181 <at> debbugs.gnu.org; Sat, 16 Nov 2019 14:28:30 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1573932491;
 bh=bXj7kQ/7KmAooHkByXAxVnXCvBEW54gx7NOSXpWqxGs=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=Gn9eIO5dhkrQLDPOfK0eFe1JGFdqZ9ftby0kDArsiI2/uKJqkOXGIpfHjXeo7OtuR
 eIf72kuDkNEmaa+FL2y7jmbecgKggivmkagjBqNV3RJlVTG4xfGdvc4UBDDTfpLGr7
 Zi0Uj6GDy5nHQIhDD5KrUH83OzHFlujvhv8i+Q0c=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.101] ([212.95.5.86]) by mail.gmx.com (mrgmx105
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N7zBb-1hkblY1cxP-014zWw; Sat, 16
 Nov 2019 20:28:11 +0100
Subject: Re: bug#38181: Actual height of mode-line not taken into account
To: Eli Zaretskii <eliz@HIDDEN>
References: <87eeyd3ul0.fsf@HIDDEN> <83d0dt2qt6.fsf@HIDDEN>
 <83r2290w24.fsf@HIDDEN> <ab7c7b7c-0699-c317-58b2-e3b60a1b2c4f@HIDDEN>
 <83pnhs6wwp.fsf@HIDDEN> <c1108254-91bf-578d-3ac5-747e59a33145@HIDDEN>
 <83k1806qca.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <acf6952e-a36b-0031-97a1-cde6398c9801@HIDDEN>
Date: Sat, 16 Nov 2019 20:28:10 +0100
MIME-Version: 1.0
In-Reply-To: <83k1806qca.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: de-AT
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:cz5Vu7DjdRzUtgJ/L2q82y4zpP8RHKUCaIqrmcMjTNZXNcHx14t
 LFsX54FCp2mExS1PnMrvnUnaEQS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jpUCXB2Jav4oCkoBQXe6eods6BiNDsd2ErDU/mZaa52W/u34PQXj4m1QC+
 j+qj7pS0QPlfkUM+uXP6S1oeEFovlWUvvanEwJjAYbFTSmlOKzn3Y1lThfZv9S98S0Sy+TiLz
 o8OK3Nm+ztFhzOMKJYRGbrEx5VFN6KuwLwIBrninx+tsw/vo1FrbVFpBP95NGiMTvSrKCp18W
 YEofXwjDEJR+oAomYm0DF6GFpNuY5+fsoCTW4uUpNmeQ6Oe7kWJ6kPDfs1dfkfc1AfoW4kTE8
 K2GLoIaGj9yE6s+kVkX3jaR4q7po21hK1iGQOoYAY8SpnKY8mA4ZJOwyjvKdyQqAoqn2FpsLQ
 XwXji+OtDe2g/Bo8R11571Tnma9ZW3M+Cksf9bSjfCE4e1RRHrrh3RLosateEIni9ML8xQRVx
 jWl+zH3inqEFfydIb1feYeG8Y1CxgDFAiDBzpjDZ/XsaQm7/Yv0CjtCHFiXo=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 38181
Cc: jonas@HIDDEN, 38181 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 > What are the frequent calls?  Help and completions windows come to
 > mind, but those are interactive, and so I'm not sure I see why calling
 > redisplay would be a bad idea there.  Are there other callers which
 > I'm missing?

The functions for displaying temporary buffers when
'temp-buffer-resize-mode' is on.  I do not think that the overhead for
calculating the mode line height is excessive.  It's just that IIUC
even Jonas changes the mode line height only once per window/buffer
assignment so even for him this overhead is practically always lost.

 >> Right.  But that same program could also redisplay all windows in
 >> these cases, right?
 >
 > I meant that calling redisplay should do this automatically.

By calculating the mode line before drawing the scroll bars?

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.

Message received at 38181 <at> debbugs.gnu.org:


Received: (at 38181) by debbugs.gnu.org; 16 Nov 2019 16:20:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 16 11:20:20 2019
Received: from localhost ([127.0.0.1]:39613 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iW0o7-0007Fc-M3
	for submit <at> debbugs.gnu.org; Sat, 16 Nov 2019 11:20:19 -0500
Received: from eggs.gnu.org ([209.51.188.92]:48132)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iW0o6-0007FO-30
 for 38181 <at> debbugs.gnu.org; Sat, 16 Nov 2019 11:20:18 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:50859)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iW0o0-000768-4u; Sat, 16 Nov 2019 11:20:12 -0500
Received: from [176.228.60.248] (port=4186 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1iW0nx-0005Ue-DU; Sat, 16 Nov 2019 11:20:11 -0500
Date: Sat, 16 Nov 2019 18:19:55 +0200
Message-Id: <837e3z7pzo.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Jonas Bernoulli <jonas@HIDDEN>
In-reply-to: <878sofon8v.fsf@HIDDEN> (message from Jonas Bernoulli on Sat, 
 16 Nov 2019 16:27:12 +0100)
Subject: Re: bug#38181: Actual height of mode-line not taken into account
References: <87eeyd3ul0.fsf@HIDDEN> <83d0dt2qt6.fsf@HIDDEN>
 <83r2290w24.fsf@HIDDEN> <ab7c7b7c-0699-c317-58b2-e3b60a1b2c4f@HIDDEN>
 <83pnhs6wwp.fsf@HIDDEN> <c1108254-91bf-578d-3ac5-747e59a33145@HIDDEN>
 <878sofon8v.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 38181
Cc: rudalics@HIDDEN, 38181 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Jonas Bernoulli <jonas@HIDDEN>
> Cc: Eli Zaretskii <eliz@HIDDEN>, 38181 <at> debbugs.gnu.org
> Date: Sat, 16 Nov 2019 16:27:12 +0100
> 
> >> Could fit-window-to-buffer invoke
> >> 'redisplay' internally, perhaps?
> >
> > It could but it's called way too often to warrant such behavior by
> > default.  But we could give it a separate optional argument so users
> > can avoid the advice.  I think Jonas could easily write and a test a
> > patch along this idea.
> 
> Again, the mode-line-prettifiers are not the ones who create new buffers
> and then call fit-buffer-to-window.  It's arbitrary other packages that
> do that.

So how are mode-line-prettifiers triggered by those packages creating
and showing new buffers?

> Of course fit-buffer-to-window itself could be changed to do that and it
> could also be taught to only do so iff the user opted in to doing it.

Can you suggest a way of knowing that this situation happened?

> Creating and displaying a new buffer and creating and resizing a new
> window surely *already* causes a "redisplay" without the programmer
> having to explicitly call `redisplay'.  So if we explicitly tell
> fit-window-to-buffer to redisplay, then that means that we are
> redisplaying twice, right?

Yes.  But if you don't call 'redisplay' _before_ fit-window-to-buffer,
that function will use stale data about the window's text area height,
computed before the mode line was updated.

You are right saying that displaying a window causes a redisplay, but
keep in mind that redisplay triggered by that happens _after_ the
command which enlarged the mode-line height finishes, and by that time
fit-window-to-buffer will have already run (using stale window
dimensions).

> I am under the impression (but this is just wild speculation) that
> redisplay only performs some of the necessary size calculations before
> doing the actual redisplaying.  But some other calculations (including
> those concerning the mode-lien) are done only after the actual
> redisplaying has already happened.  That is too late for this redisplay
> round but causes the values to be in place for all subsequent
> redisplays.  So the fix could be to do the mode-line based calculations
> earlier?

If you look at the code of redisplay_window, which is the function
that handles redisplay of each window, you will see that it indeed
calls display_mode_lines near its end (because the mode line includes
constructs that depend on position of point and other state, and that
could change as result of redisplaying a window).  However, if after
calling display_mode_lines we detect that the height of the mode line
changed, we schedule an immediate thorough redisplay.  So your theory
doesn't sound correct, at least not when taken at face value.

And once again, please keep in mind that by the time redisplay runs
(without an explicit call to 'redisplay' inside the recipe you
posted), 'fit-window-to-buffer' was already called, and it already
used stale value of height stored in the window object.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.

Message received at 38181 <at> debbugs.gnu.org:


Received: (at 38181) by debbugs.gnu.org; 16 Nov 2019 15:59:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 16 10:59:31 2019
Received: from localhost ([127.0.0.1]:39604 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iW0Tz-0006l1-FY
	for submit <at> debbugs.gnu.org; Sat, 16 Nov 2019 10:59:31 -0500
Received: from eggs.gnu.org ([209.51.188.92]:46714)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iW0Tx-0006kp-Md
 for 38181 <at> debbugs.gnu.org; Sat, 16 Nov 2019 10:59:30 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:50684)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iW0Tr-0007af-W8; Sat, 16 Nov 2019 10:59:24 -0500
Received: from [176.228.60.248] (port=2938 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1iW0Tr-0000sC-EW; Sat, 16 Nov 2019 10:59:23 -0500
Date: Sat, 16 Nov 2019 17:59:21 +0200
Message-Id: <838sof7qxy.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Jonas Bernoulli <jonas@HIDDEN>
In-reply-to: <87bltbooqq.fsf@HIDDEN> (message from Jonas Bernoulli on Sat, 
 16 Nov 2019 15:54:53 +0100)
Subject: Re: bug#38181: Actual height of mode-line not taken into account
References: <87eeyd3ul0.fsf@HIDDEN> <83d0dt2qt6.fsf@HIDDEN>
 <87a78xnrp0.fsf@HIDDEN> <835zjl2mzs.fsf@HIDDEN>
 <87eey8og08.fsf@HIDDEN> <83o8xc6wsn.fsf@HIDDEN>
 <87bltbooqq.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 38181
Cc: 38181 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Jonas Bernoulli <jonas@HIDDEN>
> Cc: 38181 <at> debbugs.gnu.org
> Date: Sat, 16 Nov 2019 15:54:53 +0100
> 
> > If this is to make the mode line prettier, then it should be done
> > once, at the beginning of a session, right?  In that case, why calling
> > redisplay after loading the package or enabling a feature is not a
> > solution?
> 
> No that won't work.  Each buffer has its own mode-line so when
> a new buffer is created, then its height has to be calculated.

Ouch!

> In practice all mode-lines have the same height, so if Emacs could
> use the height "that all the other buffers/windows are using" when
> it does not know the actual height, then that would help.

fit-window-to-buffer doesn't use (or know, really) the height of the
mode line in the scenario you presented.  Instead, it gets the height
of the window's text area (which excludes the mode line and the header
line) from the data stored in the window object.  The problem is that
this data is recalculated only when the window is redisplayed, so
without the call to 'redisplay' we use stale data until the next
redisplay cycle.

However, if all the mode lines have the same height, then the problem
shouldn't have happened, and so now I wonder what am I missing.  If
you simulate the situation where the mode line changes, while keeping
its height (even if that height is unusually large), does the problem
with fit-window-to-buffer still happen?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.

Message received at 38181 <at> debbugs.gnu.org:


Received: (at 38181) by debbugs.gnu.org; 16 Nov 2019 15:27:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 16 10:27:20 2019
Received: from localhost ([127.0.0.1]:39582 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iVzyn-0005xz-Dd
	for submit <at> debbugs.gnu.org; Sat, 16 Nov 2019 10:27:17 -0500
Received: from mail.hostpark.net ([212.243.197.30]:60168)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jonas@HIDDEN>) id 1iVzyk-0005xo-Qo
 for 38181 <at> debbugs.gnu.org; Sat, 16 Nov 2019 10:27:15 -0500
Received: from localhost (localhost [127.0.0.1])
 by mail.hostpark.net (Postfix) with ESMTP id 5BE9916640;
 Sat, 16 Nov 2019 16:27:13 +0100 (CET)
X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net
Received: from mail.hostpark.net ([127.0.0.1])
 by localhost (mail1.hostpark.net [127.0.0.1]) (amavisd-new, port 10124)
 with ESMTP id aT2etsM1HJr3; Sat, 16 Nov 2019 16:27:12 +0100 (CET)
Received: from customer (localhost [127.0.0.1])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mail.hostpark.net (Postfix) with ESMTPSA id D0F40165CB;
 Sat, 16 Nov 2019 16:27:12 +0100 (CET)
References: <87eeyd3ul0.fsf@HIDDEN> <83d0dt2qt6.fsf@HIDDEN>
 <83r2290w24.fsf@HIDDEN> <ab7c7b7c-0699-c317-58b2-e3b60a1b2c4f@HIDDEN>
 <83pnhs6wwp.fsf@HIDDEN> <c1108254-91bf-578d-3ac5-747e59a33145@HIDDEN>
User-agent: mu4e 1.1.0; emacs 27.0.50
From: Jonas Bernoulli <jonas@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#38181: Actual height of mode-line not taken into account
In-reply-to: <c1108254-91bf-578d-3ac5-747e59a33145@HIDDEN>
Date: Sat, 16 Nov 2019 16:27:12 +0100
Message-ID: <878sofon8v.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 38181
Cc: Eli Zaretskii <eliz@HIDDEN>, 38181 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> Could fit-window-to-buffer invoke
>> 'redisplay' internally, perhaps?
>
> It could but it's called way too often to warrant such behavior by
> default.  But we could give it a separate optional argument so users
> can avoid the advice.  I think Jonas could easily write and a test a
> patch along this idea.

Again, the mode-line-prettifiers are not the ones who create new buffers
and then call fit-buffer-to-window.  It's arbitrary other packages that
do that.  An optional argument therefore would not help because when one
of the prettifier modes is active, then each and every third-party
caller of fit-buffer-to-window would have to pass that optional
argument.

This is the advice I currently use:

(defvar-local moody--size-hacked-p nil)

(defun moody-redisplay (&optional _force &rest _ignored)
  (unless moody--size-hacked-p
    (setq moody--size-hacked-p t)
    (redisplay t)))

(advice-add 'fit-window-to-buffer :before #'moody-redisplay)

Of course fit-buffer-to-window itself could be changed to do that and it
could also be taught to only do so iff the user opted in to doing it.

----

Creating and displaying a new buffer and creating and resizing a new
window surely *already* causes a "redisplay" without the programmer
having to explicitly call `redisplay'.  So if we explicitly tell
fit-window-to-buffer to redisplay, then that means that we are
redisplaying twice, right?

I am under the impression (but this is just wild speculation) that
redisplay only performs some of the necessary size calculations before
doing the actual redisplaying.  But some other calculations (including
those concerning the mode-lien) are done only after the actual
redisplaying has already happened.  That is too late for this redisplay
round but causes the values to be in place for all subsequent
redisplays.  So the fix could be to do the mode-line based calculations
earlier?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.

Message received at 38181 <at> debbugs.gnu.org:


Received: (at 38181) by debbugs.gnu.org; 16 Nov 2019 14:54:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 16 09:54:58 2019
Received: from localhost ([127.0.0.1]:37864 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iVzTW-0004nz-Ka
	for submit <at> debbugs.gnu.org; Sat, 16 Nov 2019 09:54:58 -0500
Received: from mail.hostpark.net ([212.243.197.30]:35616)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jonas@HIDDEN>) id 1iVzTU-0004np-7o
 for 38181 <at> debbugs.gnu.org; Sat, 16 Nov 2019 09:54:56 -0500
Received: from localhost (localhost [127.0.0.1])
 by mail.hostpark.net (Postfix) with ESMTP id B0CAB16618;
 Sat, 16 Nov 2019 15:54:54 +0100 (CET)
X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net
Received: from mail.hostpark.net ([127.0.0.1])
 by localhost (mail0.hostpark.net [127.0.0.1]) (amavisd-new, port 10124)
 with ESMTP id 5d3HH2CszVCI; Sat, 16 Nov 2019 15:54:54 +0100 (CET)
Received: from customer (localhost [127.0.0.1])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mail.hostpark.net (Postfix) with ESMTPSA id 24C69165F1;
 Sat, 16 Nov 2019 15:54:54 +0100 (CET)
References: <87eeyd3ul0.fsf@HIDDEN> <83d0dt2qt6.fsf@HIDDEN>
 <87a78xnrp0.fsf@HIDDEN> <835zjl2mzs.fsf@HIDDEN>
 <87eey8og08.fsf@HIDDEN> <83o8xc6wsn.fsf@HIDDEN>
User-agent: mu4e 1.1.0; emacs 27.0.50
From: Jonas Bernoulli <jonas@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#38181: Actual height of mode-line not taken into account
In-reply-to: <83o8xc6wsn.fsf@HIDDEN>
Date: Sat, 16 Nov 2019 15:54:53 +0100
Message-ID: <87bltbooqq.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 38181
Cc: 38181 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)


Eli Zaretskii <eliz@HIDDEN> writes:

>> From: Jonas Bernoulli <jonas@HIDDEN>
>> Cc: 38181 <at> debbugs.gnu.org
>> Date: Sat, 16 Nov 2019 00:51:19 +0100
>>
>> > An alternative would be to scale the image so that it doesn't enlarge
>> > the mode line, btw.  Is that possible in your use cases?
>>
>> No because enlarging the mode-line is one of the things I did in order
>> to make it prettier (imo).  It's a goal not a means or side-effect.
>
> If this is to make the mode line prettier, then it should be done
> once, at the beginning of a session, right?  In that case, why calling
> redisplay after loading the package or enabling a feature is not a
> solution?

No that won't work.  Each buffer has its own mode-line so when
a new buffer is created, then its height has to be calculated.

In practice all mode-lines have the same height, so if Emacs could
use the height "that all the other buffers/windows are using" when
it does not know the actual height, then that would help.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.

Message received at 38181 <at> debbugs.gnu.org:


Received: (at 38181) by debbugs.gnu.org; 16 Nov 2019 10:57:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 16 05:57:51 2019
Received: from localhost ([127.0.0.1]:37787 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iVvm3-0003eU-Hs
	for submit <at> debbugs.gnu.org; Sat, 16 Nov 2019 05:57:51 -0500
Received: from eggs.gnu.org ([209.51.188.92]:46640)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iVvm1-0003eI-Nt
 for 38181 <at> debbugs.gnu.org; Sat, 16 Nov 2019 05:57:50 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:47670)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iVvlw-000101-17; Sat, 16 Nov 2019 05:57:44 -0500
Received: from [176.228.60.248] (port=2093 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1iVvlu-00023n-UK; Sat, 16 Nov 2019 05:57:43 -0500
Date: Sat, 16 Nov 2019 12:57:41 +0200
Message-Id: <83k1806qca.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
In-reply-to: <c1108254-91bf-578d-3ac5-747e59a33145@HIDDEN> (message from
 martin rudalics on Sat, 16 Nov 2019 09:57:40 +0100)
Subject: Re: bug#38181: Actual height of mode-line not taken into account
References: <87eeyd3ul0.fsf@HIDDEN> <83d0dt2qt6.fsf@HIDDEN>
 <83r2290w24.fsf@HIDDEN> <ab7c7b7c-0699-c317-58b2-e3b60a1b2c4f@HIDDEN>
 <83pnhs6wwp.fsf@HIDDEN> <c1108254-91bf-578d-3ac5-747e59a33145@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 38181
Cc: jonas@HIDDEN, 38181 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: jonas@HIDDEN, 38181 <at> debbugs.gnu.org
> From: martin rudalics <rudalics@HIDDEN>
> Date: Sat, 16 Nov 2019 09:57:40 +0100
> 
>  > Then I'm not sure we can fix such use cases at all, without causing
>  > display flickering in much more popular use cases.  Do you have any
>  > ideas for a possible fix?  Could fit-window-to-buffer invoke
>  > 'redisplay' internally, perhaps?
> 
> It could but it's called way too often to warrant such behavior by
> default.

What are the frequent calls?  Help and completions windows come to
mind, but those are interactive, and so I'm not sure I see why calling
redisplay would be a bad idea there.  Are there other callers which
I'm missing?

> But we could give it a separate optional argument so users can avoid
> the advice.

That's possible, of course.

>  >> But, as I mentioned earlier, the problem shows up with the
>  >> scroll bar immediately when Jonas' form is evaluated, see the attached
>  >> screenshot.
>  >
>  > That just means we (or a Lisp program which makes these mode-line
>  > modifications) need to recreate and redisplay the scroll bars anew in
>  > these cases, right?
> 
> Right.  But that same program could also redisplay all windows in
> these cases, right?

I meant that calling redisplay should do this automatically.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.

Message received at 38181 <at> debbugs.gnu.org:


Received: (at 38181) by debbugs.gnu.org; 16 Nov 2019 08:57:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 16 03:57:56 2019
Received: from localhost ([127.0.0.1]:37721 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iVttz-0000mn-Qw
	for submit <at> debbugs.gnu.org; Sat, 16 Nov 2019 03:57:56 -0500
Received: from mout.gmx.net ([212.227.15.19]:57461)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1iVttx-0000mY-1Z
 for 38181 <at> debbugs.gnu.org; Sat, 16 Nov 2019 03:57:53 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1573894663;
 bh=ZDyP8/kJGGcgr/GIyULQ1l2OEN9h5Ui9CZl4p3DPvDI=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=KBxOnJYBLPDryoGwHBdPced2hCRQP2BOrlzbrHmgTNMNnn+F+tAca2cecniB+3pKq
 X5SZWhzD4SmDaP0PYs8w1JJ3zCEHSXs1BPvnjQvdN9xwEx9GCxet4hBAR4K24X6HUV
 UbysBLRvVSCDx0MIOv/c5p8xHVn9Z2JMExVlGfXw=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.104] ([46.125.249.58]) by mail.gmx.com (mrgmx004
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1McpJg-1hw0ur01AI-00Zxlm; Sat, 16
 Nov 2019 09:57:43 +0100
Subject: Re: bug#38181: Actual height of mode-line not taken into account
To: Eli Zaretskii <eliz@HIDDEN>
References: <87eeyd3ul0.fsf@HIDDEN> <83d0dt2qt6.fsf@HIDDEN>
 <83r2290w24.fsf@HIDDEN> <ab7c7b7c-0699-c317-58b2-e3b60a1b2c4f@HIDDEN>
 <83pnhs6wwp.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <c1108254-91bf-578d-3ac5-747e59a33145@HIDDEN>
Date: Sat, 16 Nov 2019 09:57:40 +0100
MIME-Version: 1.0
In-Reply-To: <83pnhs6wwp.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: de-AT
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:nt9tB0kuFblBiPLFis/euTam/CUoxZ034W7NdHqqLlNZF0SDXJQ
 +IIPIEMEhWA5cb1VOoQmqYUgmOG2qPTlxy2IbUmSXFHgGeYkbhExkWMJLzenOdKNAGLrAtO
 tPmivQHsQCxwBIfgQlB/dtNsA5YLC4VnC40Dq2L56ces3bHayqAcjNgJfIydQjW9qmN0DWc
 AR8beOZzc0ls3fQsuVSTQ==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:Fa02vbCNyRk=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xl
 d7FKpzqC4C2s+Q4z42ikTZjRVntS3jmu+p5iLXq1kbZoGko4Vc8EDpC+TU9OXqL5mv8gmF/x/
 pMTvl2b1UuTs1AqGBHJkftxCmyjwfOKTiR7psnQH6P6+MURkSv2Y01ITFq9bIoOtQkM/958Y6
 Fws/lkNUYdyKvd5HU6Y/GiU/Xwyi7zH/DU1DZ10aTOl7IlMSlosxxMnkRSLq9nDwuT3gmAWkv
 TqL9cV6Ih9WOIl6Uje6H5dMqBoD+Yo5e/7Ge2Mw==
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 38181
Cc: jonas@HIDDEN, 38181 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

 >>   > I think fit-window-to-buffer relies on window's metrics (like the
 >>   > number of lines in the text area) to be up to date, and that is only
 >>   > true after a window was redisplayed once since changing the mode-line
 >>   > height.  Martin, is this correct?
 >>
 >> Yes.
 >
 > Then I'm not sure we can fix such use cases at all, without causing
 > display flickering in much more popular use cases.  Do you have any
 > ideas for a possible fix?  Could fit-window-to-buffer invoke
 > 'redisplay' internally, perhaps?

It could but it's called way too often to warrant such behavior by
default.  But we could give it a separate optional argument so users
can avoid the advice.  I think Jonas could easily write and a test a
patch along this idea.

 >> But, as I mentioned earlier, the problem shows up with the
 >> scroll bar immediately when Jonas' form is evaluated, see the attached
 >> screenshot.
 >
 > That just means we (or a Lisp program which makes these mode-line
 > modifications) need to recreate and redisplay the scroll bars anew in
 > these cases, right?

Right.  But that same program could also redisplay all windows in
these cases, right?

 > It's a separate problem, right?

For some value of right ...

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.

Message received at 38181 <at> debbugs.gnu.org:


Received: (at 38181) by debbugs.gnu.org; 16 Nov 2019 08:38:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 16 03:38:27 2019
Received: from localhost ([127.0.0.1]:37696 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iVtb9-0000JK-2a
	for submit <at> debbugs.gnu.org; Sat, 16 Nov 2019 03:38:27 -0500
Received: from eggs.gnu.org ([209.51.188.92]:47390)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iVtb6-0000J5-3l
 for 38181 <at> debbugs.gnu.org; Sat, 16 Nov 2019 03:38:25 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:46688)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iVtb0-0005Wu-Vi; Sat, 16 Nov 2019 03:38:19 -0500
Received: from [176.228.60.248] (port=1550 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1iVtb0-0000ne-7f; Sat, 16 Nov 2019 03:38:18 -0500
Date: Sat, 16 Nov 2019 10:38:16 +0200
Message-Id: <83o8xc6wsn.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Jonas Bernoulli <jonas@HIDDEN>
In-reply-to: <87eey8og08.fsf@HIDDEN> (message from Jonas Bernoulli on Sat, 
 16 Nov 2019 00:51:19 +0100)
Subject: Re: bug#38181: Actual height of mode-line not taken into account
References: <87eeyd3ul0.fsf@HIDDEN> <83d0dt2qt6.fsf@HIDDEN>
 <87a78xnrp0.fsf@HIDDEN> <835zjl2mzs.fsf@HIDDEN>
 <87eey8og08.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 38181
Cc: 38181 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Jonas Bernoulli <jonas@HIDDEN>
> Cc: 38181 <at> debbugs.gnu.org
> Date: Sat, 16 Nov 2019 00:51:19 +0100
> 
> > An alternative would be to scale the image so that it doesn't enlarge
> > the mode line, btw.  Is that possible in your use cases?
> 
> No because enlarging the mode-line is one of the things I did in order
> to make it prettier (imo).  It's a goal not a means or side-effect.

If this is to make the mode line prettier, then it should be done
once, at the beginning of a session, right?  In that case, why calling
redisplay after loading the package or enabling a feature is not a
solution?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.

Message received at 38181 <at> debbugs.gnu.org:


Received: (at 38181) by debbugs.gnu.org; 16 Nov 2019 08:36:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 16 03:36:05 2019
Received: from localhost ([127.0.0.1]:37692 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iVtYr-0000Fo-Ke
	for submit <at> debbugs.gnu.org; Sat, 16 Nov 2019 03:36:05 -0500
Received: from eggs.gnu.org ([209.51.188.92]:47226)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iVtYn-0000FI-HU
 for 38181 <at> debbugs.gnu.org; Sat, 16 Nov 2019 03:36:04 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:46673)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iVtYh-000455-FZ; Sat, 16 Nov 2019 03:35:55 -0500
Received: from [176.228.60.248] (port=1402 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1iVtYg-0000fL-MR; Sat, 16 Nov 2019 03:35:55 -0500
Date: Sat, 16 Nov 2019 10:35:50 +0200
Message-Id: <83pnhs6wwp.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
In-reply-to: <ab7c7b7c-0699-c317-58b2-e3b60a1b2c4f@HIDDEN> (message from
 martin rudalics on Sat, 16 Nov 2019 09:20:27 +0100)
Subject: Re: bug#38181: Actual height of mode-line not taken into account
References: <87eeyd3ul0.fsf@HIDDEN> <83d0dt2qt6.fsf@HIDDEN>
 <83r2290w24.fsf@HIDDEN> <ab7c7b7c-0699-c317-58b2-e3b60a1b2c4f@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 38181
Cc: jonas@HIDDEN, 38181 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: 38181 <at> debbugs.gnu.org
> From: martin rudalics <rudalics@HIDDEN>
> Date: Sat, 16 Nov 2019 09:20:27 +0100
> 
>  > I think fit-window-to-buffer relies on window's metrics (like the
>  > number of lines in the text area) to be up to date, and that is only
>  > true after a window was redisplayed once since changing the mode-line
>  > height.  Martin, is this correct?
> 
> Yes.

Then I'm not sure we can fix such use cases at all, without causing
display flickering in much more popular use cases.  Do you have any
ideas for a possible fix?  Could fit-window-to-buffer invoke
'redisplay' internally, perhaps?

> But, as I mentioned earlier, the problem shows up with the
> scroll bar immediately when Jonas' form is evaluated, see the attached
> screenshot.

That just means we (or a Lisp program which makes these mode-line
modifications) need to recreate and redisplay the scroll bars anew in
these cases, right?  It's a separate problem, right?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.

Message received at 38181 <at> debbugs.gnu.org:


Received: (at 38181) by debbugs.gnu.org; 16 Nov 2019 08:20:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 16 03:20:43 2019
Received: from localhost ([127.0.0.1]:37679 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iVtJz-0008JX-GP
	for submit <at> debbugs.gnu.org; Sat, 16 Nov 2019 03:20:43 -0500
Received: from mout.gmx.net ([212.227.17.21]:38177)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1iVtJx-0008JH-2z
 for 38181 <at> debbugs.gnu.org; Sat, 16 Nov 2019 03:20:42 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1573892428;
 bh=1hxo5lq2IrYhioJm7QDJYvT03GElraFEr4CRDbVhvDE=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=X7J6tvumR7PU3+uKk7nKgPh2RDpG4NX/VS7pWmxBVYADPYy3rA6V4xHWR9x8z9l5L
 JpRppqA5QwwtiX8q9ra6Rrf/qyBoYgXF05/CbhT+s3BfefxXQsTKlJpixEMnW4E3xM
 TdgKYyxDp35InAkZnBSOWBsyHNUr355mPv9E11ZE=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.104] ([46.125.249.58]) by mail.gmx.com (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MsHnm-1hcHrC2ERO-00tkaS; Sat, 16
 Nov 2019 09:20:28 +0100
Subject: Re: bug#38181: Actual height of mode-line not taken into account
To: Eli Zaretskii <eliz@HIDDEN>, jonas@HIDDEN
References: <87eeyd3ul0.fsf@HIDDEN> <83d0dt2qt6.fsf@HIDDEN>
 <83r2290w24.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <ab7c7b7c-0699-c317-58b2-e3b60a1b2c4f@HIDDEN>
Date: Sat, 16 Nov 2019 09:20:27 +0100
MIME-Version: 1.0
In-Reply-To: <83r2290w24.fsf@HIDDEN>
Content-Type: multipart/mixed; boundary="------------EEAD7462F06F3F75B4F2F9A7"
Content-Language: de-AT
X-Provags-ID: V03:K1:ucGkFA0LKF0KEix6aJPqPjtzFWfcWnreTUXtiyTXLK8COz8zv2/
 s27GNYqvNF7gFsTFr0mOhWUch0kUE75DdqsCxu9PZUtNMpVODF5jNUQFS0TrBUPjybhszlD
 4vKHaZVc6erLT3uLzQygkXdA7m5gjaCblFfCg6wsAFPN2/doUq0GwAIb9mfhDjg+Db1dcwm
 l4pD+8wvlZlNoN/pC1hGg==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:Wpnqartv9cA=:NrEwcsHKggJY64eK1tFzh9
 gmRWPIaywXkyj+dZ3zVpysDETJz1ZUrL4htCF7cXdVGAWGNF1t7+TQRjuBjw9r9LKt573dpgO
 ekunQng9ry3dC/+hcqXANGdvUwdoTw1OQ5XUFwYFM+Cm7qiMcDOutHwegXrsHbX1FUjsOK7e5
 WAImwEkniu1+0ubKhB3p1amNUnfXdNwHvPe+n9kNqbhO3PR4Ix5+2uAxo9pyh9vN0Yw8uZNnE
 ncqweWK6eKJl3D1ZUvk+glTerQNyMGGR0xkfBtN7yAY6IHe0P4v4SvivyPgubPw0UGXgowCBG
 TdvXpWbOLKQs0mgIqOsEo/lRnkiLpqK3DAFeIkIU6yP+BbYkgVmZAcYtHDkw0vmsO3+Bzf8S1
 Tr0v5GMxJePIG0LfI4gUzQX54b0cbTkDjmJcVdNh7gxM0bRfQMyNF2Txi8XvmWMCEMPIITChF
 YBCnSGqH+4bzts73XOu4frVMaa3KoA35JNCACS4cW/GfKfTT0JSHxbaLS9aBPIZ9MMrl39/0w
 jj3WaqFhr6J6PaOIGYGFtuEK1HWD78T3ma1Mutf9v9X3v6VanPKWOaOCk84NC3IKSTTeqFETf
 uuixW+C4yRn0VLhsW9CNDg5YxeJvILD3dP+Ed5e1Ltnl+AU8oAL64mos3x+cAE/WPJ5wRXowc
 z+Yg1zzrrrRhVhxnd8MEbfgKjFqFQxr/G/oiSYYyGoalGAcgxyRSdu9Fm39rhJb5BNbjL/mgC
 kByxkWL6dXuOtW0BU5m79HvF7AFzGG8WaSsclacKUfjy89DH8AhwDvMGeSO0d7oM7bZt97oge
 1m7/8CVMATpyK+QrILU23L+Ry9PhKrDaBHXbkl210LrEP+re+eFFE/PPYCWLiSIo8q8cIMxDT
 nD07Wo9XbNcZuWlcP4b8RTndpI4RlQ/cdfOlL0nf9XDJw7Xmz+Ix3/u4Oxdl3OsNLVLG8QyM8
 A4f51L6dyTg/OSSy+yd7LeVdojMtcmdVP3RWhZzMvwAqqc0GFrb/Z6JL5cD4cd52XKQoNg7bv
 Q/HfALQk2vqKiiavvtDVeWOZv/o7+JdixQlIcYIw925+Sa7kBg2U6VeaJNem2uhswNpBlGgZ5
 0dHsJUTcFE+ylMxPpicr5ETRb1dN3pvObaq+f/JqRTVpjFq1Ch+RbXFFetwuqYqXOskk9+L85
 e8gJF618jFdVDTbbR3VqmygkIV7Tvaf2Tji6Inr3rQopuVSkmRWKcce9Wmf5TxRB3C8Lz+qrQ
 v1uwaUGQI46imRNA2MxE+JAs8Spjlk6on992LKA==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 38181
Cc: 38181 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

This is a multi-part message in MIME format.
--------------EEAD7462F06F3F75B4F2F9A7
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit

 > I think fit-window-to-buffer relies on window's metrics (like the
 > number of lines in the text area) to be up to date, and that is only
 > true after a window was redisplayed once since changing the mode-line
 > height.  Martin, is this correct?

Yes.  But, as I mentioned earlier, the problem shows up with the
scroll bar immediately when Jonas' form is evaluated, see the attached
screenshot.  Code like 'fit-window-to-buffer' works on the text area
only, it doesn't care whether a scroll bar or mode line changed size
since last redisplay.

martin

--------------EEAD7462F06F3F75B4F2F9A7
Content-Type: image/png;
 name="mode-line-vs-scroll-bar.png"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="mode-line-vs-scroll-bar.png"

iVBORw0KGgoAAAANSUhEUgAAAqgAAAKTCAIAAABaZ21lAAAACXBIWXMAAA7DAAAOwwHHb6hk
AAAgAElEQVR4nO3de3xU9Z3/8c/JjZvIXVHGALlwiU1B+WkciphQow2yipeg2y4sum5ok7UG
0Ra0unZthQoxsW6yhWplQ+1DjPdiokU7EVnSyKJW1nBJCBAGQbkFQpAkM3N+f5yZyWQyM5lJ
JgnJ9/V85I/JmTPne77nzJn3+X7Pmflq06bPEAAAoIYoEXlt3fLeXg0AAFrd85NVr/xXj2ZT
D5f4y9w1SyZc1mPFrT1w5N8LHhaRu7JWRfRYqQAAoNdFBX5ad4gWISJSV3O6bp+94WyEJvrF
w/QJiVGXj79YdNF15wwAAODCFyj4jdQ/aj378Ye2+ubRA4cP1SIjW5rsB2rPf7rzzOWjv5l9
85D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75B4F2F9A7--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.

Message received at 38181 <at> debbugs.gnu.org:


Received: (at 38181) by debbugs.gnu.org; 15 Nov 2019 23:53:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 15 18:53:02 2019
Received: from localhost ([127.0.0.1]:37502 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iVlOg-00073t-C7
	for submit <at> debbugs.gnu.org; Fri, 15 Nov 2019 18:53:02 -0500
Received: from mail.hostpark.net ([212.243.197.30]:58052)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jonas@HIDDEN>) id 1iVlOe-00073U-Do
 for 38181 <at> debbugs.gnu.org; Fri, 15 Nov 2019 18:53:01 -0500
Received: from localhost (localhost [127.0.0.1])
 by mail.hostpark.net (Postfix) with ESMTP id F174D16618;
 Sat, 16 Nov 2019 00:52:58 +0100 (CET)
X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net
Received: from mail.hostpark.net ([127.0.0.1])
 by localhost (mail0.hostpark.net [127.0.0.1]) (amavisd-new, port 10124)
 with ESMTP id iWgy6QbeR9HN; Sat, 16 Nov 2019 00:51:24 +0100 (CET)
Received: from customer (localhost [127.0.0.1])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mail.hostpark.net (Postfix) with ESMTPSA id 26F83165F1;
 Sat, 16 Nov 2019 00:51:24 +0100 (CET)
References: <87eeyd3ul0.fsf@HIDDEN> <83d0dt2qt6.fsf@HIDDEN>
 <87a78xnrp0.fsf@HIDDEN> <835zjl2mzs.fsf@HIDDEN>
User-agent: mu4e 1.1.0; emacs 27.0.50
From: Jonas Bernoulli <jonas@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#38181: Actual height of mode-line not taken into account
In-reply-to: <835zjl2mzs.fsf@HIDDEN>
Date: Sat, 16 Nov 2019 00:51:19 +0100
Message-ID: <87eey8og08.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 38181
Cc: 38181 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)


Eli Zaretskii <eliz@HIDDEN> writes:

> Why the need to use advising?  Your recipe shows that calling
> redisplay before fit-window-to-buffer also solves the problem.  Can't
> you do something like that only when you add such tall images to the
> mode line?

This is about packages like powerline, spaceline, doom-modeline and my
moody.  These packages add images to the global mode-line-format to make
them prettier.  These packages do not create any buffers of their own
and they never call fit-window-to-buffer themselves, but whenever that
function is called for a new buffer redisplay has to be run first, so
the advice is needed.

> An alternative would be to scale the image so that it doesn't enlarge
> the mode line, btw.  Is that possible in your use cases?

No because enlarging the mode-line is one of the things I did in order
to make it prettier (imo).  It's a goal not a means or side-effect.

You can see a screenshot on https://github.com/tarsius/moody.
Many other "mode-line prettifiers" also increase its height.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.

Message received at 38181 <at> debbugs.gnu.org:


Received: (at 38181) by debbugs.gnu.org; 15 Nov 2019 19:38:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 15 14:38:55 2019
Received: from localhost ([127.0.0.1]:37407 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iVhQk-0005ad-Ji
	for submit <at> debbugs.gnu.org; Fri, 15 Nov 2019 14:38:54 -0500
Received: from eggs.gnu.org ([209.51.188.92]:50997)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iVhQc-0005aG-PQ
 for 38181 <at> debbugs.gnu.org; Fri, 15 Nov 2019 14:38:53 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:36395)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iVhQX-0000Tj-4m; Fri, 15 Nov 2019 14:38:41 -0500
Received: from [176.228.60.248] (port=2117 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1iVhQW-0001Tg-HW; Fri, 15 Nov 2019 14:38:40 -0500
Date: Fri, 15 Nov 2019 21:38:27 +0200
Message-Id: <83r2290w24.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: jonas@HIDDEN
In-reply-to: <83d0dt2qt6.fsf@HIDDEN> (message from Eli Zaretskii on Fri, 15
 Nov 2019 15:48:53 +0200)
Subject: Re: bug#38181: Actual height of mode-line not taken into account
References: <87eeyd3ul0.fsf@HIDDEN> <83d0dt2qt6.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 38181
Cc: 38181 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Fri, 15 Nov 2019 15:48:53 +0200
> From: Eli Zaretskii <eliz@HIDDEN>
> Cc: 38181 <at> debbugs.gnu.org
> 
> > From: Jonas Bernoulli <jonas@HIDDEN>
> > Date: Tue, 12 Nov 2019 17:52:59 +0100
> > 
> > If the height of the mode-line is increased by inserting an image into
> > it, then that height is not taken into account in a buffer/window until
> > `redisplay' has been called at least once since the buffer was created.
> 
> AFAIR, the mode line display is done lazily, because otherwise the
> mode line would flicker.  When you change the face, that triggers a
> thorough redisplay, because any change in faces does that (it could
> mean many faces now have a different appearance).  Adding an image to
> the mode line doesn't have that effect, which is why you need to force
> redisplay manually.

Btw, I was wrong above: enlarging the mode-line faces also causes a
similar problem.  Try this slightly modified recipe:

  (defun test-popup ()
    (interactive)
    (set-face-attribute 'mode-line nil :height 350)
    (set-face-attribute 'mode-line-inactive nil :height 350)
    (with-current-buffer (generate-new-buffer "*test*")
      (save-excursion
	(insert "one\ntwo\nthree\nfour\nfive"))
      (let ((win (display-buffer (current-buffer)
				 '(display-buffer-in-side-window
				   (side . bottom)))))
	(fit-window-to-buffer win))))

and you will see that the buffer *test* isn't shown in its entirety,
either.

I think fit-window-to-buffer relies on window's metrics (like the
number of lines in the text area) to be up to date, and that is only
true after a window was redisplayed once since changing the mode-line
height.  Martin, is this correct?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.

Message received at 38181 <at> debbugs.gnu.org:


Received: (at 38181) by debbugs.gnu.org; 15 Nov 2019 15:11:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 15 10:11:45 2019
Received: from localhost ([127.0.0.1]:37237 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iVdGC-0007fA-OE
	for submit <at> debbugs.gnu.org; Fri, 15 Nov 2019 10:11:44 -0500
Received: from eggs.gnu.org ([209.51.188.92]:60230)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iVdGA-0007eu-Db
 for 38181 <at> debbugs.gnu.org; Fri, 15 Nov 2019 10:11:42 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:58316)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iVdG4-0000UR-Vk; Fri, 15 Nov 2019 10:11:37 -0500
Received: from [176.228.60.248] (port=1362 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1iVdG2-0000Nz-AT; Fri, 15 Nov 2019 10:11:36 -0500
Date: Fri, 15 Nov 2019 17:11:19 +0200
Message-Id: <835zjl2mzs.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Jonas Bernoulli <jonas@HIDDEN>
In-reply-to: <87a78xnrp0.fsf@HIDDEN> (message from Jonas Bernoulli on Fri, 
 15 Nov 2019 15:24:11 +0100)
Subject: Re: bug#38181: Actual height of mode-line not taken into account
References: <87eeyd3ul0.fsf@HIDDEN> <83d0dt2qt6.fsf@HIDDEN>
 <87a78xnrp0.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 38181
Cc: 38181 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Jonas Bernoulli <jonas@HIDDEN>
> Cc: 38181 <at> debbugs.gnu.org
> Date: Fri, 15 Nov 2019 15:24:11 +0100
> 
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> 
> > So much for theory.  Now for the practical aspects: how bad is it to
> > have to invoke redisplay by hand in these cases?  After all, they
> > don't sound like something a Lisp program would do frequently.
> 
> Currently I do the manual redisplay by advising fit-window-to-buffer,
> which I don't think can be avoided.  This results in some flickering,
> so I make sure it is only done once per buffer.

Why the need to use advising?  Your recipe shows that calling
redisplay before fit-window-to-buffer also solves the problem.  Can't
you do something like that only when you add such tall images to the
mode line?

An alternative would be to scale the image so that it doesn't enlarge
the mode line, btw.  Is that possible in your use cases?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.

Message received at 38181 <at> debbugs.gnu.org:


Received: (at 38181) by debbugs.gnu.org; 15 Nov 2019 14:24:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 15 09:24:21 2019
Received: from localhost ([127.0.0.1]:35870 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iVcWK-0006Ah-US
	for submit <at> debbugs.gnu.org; Fri, 15 Nov 2019 09:24:21 -0500
Received: from mail.hostpark.net ([212.243.197.30]:54330)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jonas@HIDDEN>) id 1iVcWI-0006AY-VR
 for 38181 <at> debbugs.gnu.org; Fri, 15 Nov 2019 09:24:19 -0500
Received: from localhost (localhost [127.0.0.1])
 by mail.hostpark.net (Postfix) with ESMTP id 9F8A01667E;
 Fri, 15 Nov 2019 15:24:17 +0100 (CET)
X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net
Received: from mail.hostpark.net ([127.0.0.1])
 by localhost (mail1.hostpark.net [127.0.0.1]) (amavisd-new, port 10124)
 with ESMTP id 8N7Tck_ViUp7; Fri, 15 Nov 2019 15:24:17 +0100 (CET)
Received: from customer (localhost [127.0.0.1])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mail.hostpark.net (Postfix) with ESMTPSA id 3710A16680;
 Fri, 15 Nov 2019 15:24:17 +0100 (CET)
References: <87eeyd3ul0.fsf@HIDDEN> <83d0dt2qt6.fsf@HIDDEN>
User-agent: mu4e 1.1.0; emacs 27.0.50
From: Jonas Bernoulli <jonas@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#38181: Actual height of mode-line not taken into account
In-reply-to: <83d0dt2qt6.fsf@HIDDEN>
Message-ID: <87a78xnrp0.fsf@HIDDEN>
Date: Fri, 15 Nov 2019 15:24:11 +0100
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 38181
Cc: 38181 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)


Eli Zaretskii <eliz@HIDDEN> writes:

> So much for theory.  Now for the practical aspects: how bad is it to
> have to invoke redisplay by hand in these cases?  After all, they
> don't sound like something a Lisp program would do frequently.

Currently I do the manual redisplay by advising fit-window-to-buffer,
which I don't think can be avoided.  This results in some flickering,
so I make sure it is only done once per buffer.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.

Message received at 38181 <at> debbugs.gnu.org:


Received: (at 38181) by debbugs.gnu.org; 15 Nov 2019 13:50:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 15 08:50:37 2019
Received: from localhost ([127.0.0.1]:35838 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iVbzh-0005ND-8j
	for submit <at> debbugs.gnu.org; Fri, 15 Nov 2019 08:50:37 -0500
Received: from eggs.gnu.org ([209.51.188.92]:46302)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iVbzf-0005Mz-Un
 for 38181 <at> debbugs.gnu.org; Fri, 15 Nov 2019 08:50:36 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:57033)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iVbza-00014J-01; Fri, 15 Nov 2019 08:50:30 -0500
Received: from [176.228.60.248] (port=4383 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1iVbzV-0002jj-3c; Fri, 15 Nov 2019 08:50:27 -0500
Date: Fri, 15 Nov 2019 15:50:08 +0200
Message-Id: <83bltd2qr3.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
In-reply-to: <2d8a9ed2-4152-338a-06ef-fd69b9d2830f@HIDDEN> (message from
 martin rudalics on Wed, 13 Nov 2019 09:03:56 +0100)
Subject: Re: bug#38181: Actual height of mode-line not taken into account
References: <87eeyd3ul0.fsf@HIDDEN>
 <2d8a9ed2-4152-338a-06ef-fd69b9d2830f@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 38181
Cc: jonas@HIDDEN, 38181 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: martin rudalics <rudalics@HIDDEN>
> Date: Wed, 13 Nov 2019 09:03:56 +0100
> 
> When I evaluate that specification, the scroll bars are screwed up for
> all windows and remain so for all unselected windows.

Doesn't happen here, FWIW.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.

Message received at 38181 <at> debbugs.gnu.org:


Received: (at 38181) by debbugs.gnu.org; 15 Nov 2019 13:49:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 15 08:49:20 2019
Received: from localhost ([127.0.0.1]:35834 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iVbyR-0005Ky-Qy
	for submit <at> debbugs.gnu.org; Fri, 15 Nov 2019 08:49:20 -0500
Received: from eggs.gnu.org ([209.51.188.92]:46085)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iVbyO-0005Kl-Ve
 for 38181 <at> debbugs.gnu.org; Fri, 15 Nov 2019 08:49:17 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:57010)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iVbyJ-0000CL-6N; Fri, 15 Nov 2019 08:49:11 -0500
Received: from [176.228.60.248] (port=4307 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1iVbyG-0002eX-QZ; Fri, 15 Nov 2019 08:49:10 -0500
Date: Fri, 15 Nov 2019 15:48:53 +0200
Message-Id: <83d0dt2qt6.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Jonas Bernoulli <jonas@HIDDEN>
In-reply-to: <87eeyd3ul0.fsf@HIDDEN> (message from Jonas Bernoulli on Tue, 
 12 Nov 2019 17:52:59 +0100)
Subject: Re: bug#38181: Actual height of mode-line not taken into account
References: <87eeyd3ul0.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 38181
Cc: 38181 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Jonas Bernoulli <jonas@HIDDEN>
> Date: Tue, 12 Nov 2019 17:52:59 +0100
> 
> If the height of the mode-line is increased by inserting an image into
> it, then that height is not taken into account in a buffer/window until
> `redisplay' has been called at least once since the buffer was created.

AFAIR, the mode line display is done lazily, because otherwise the
mode line would flicker.  When you change the face, that triggers a
thorough redisplay, because any change in faces does that (it could
mean many faces now have a different appearance).  Adding an image to
the mode line doesn't have that effect, which is why you need to force
redisplay manually.

So much for theory.  Now for the practical aspects: how bad is it to
have to invoke redisplay by hand in these cases?  After all, they
don't sound like something a Lisp program would do frequently.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.

Message received at 38181 <at> debbugs.gnu.org:


Received: (at 38181) by debbugs.gnu.org; 13 Nov 2019 08:04:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 13 03:04:10 2019
Received: from localhost ([127.0.0.1]:58797 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iUndJ-0005Qp-TL
	for submit <at> debbugs.gnu.org; Wed, 13 Nov 2019 03:04:10 -0500
Received: from mout.gmx.net ([212.227.17.20]:45589)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1iUndG-0005QH-RA
 for 38181 <at> debbugs.gnu.org; Wed, 13 Nov 2019 03:04:08 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1573632238;
 bh=chSJA4EUWxP2SikFdpsU0p6bEHLnT0u5R/rZdgDln+Y=;
 h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To;
 b=hhRTVTK39QC/puA4+DuOgdqrICgpgirQK4sVU0oUmzI9UpyNKf/d6QxgVG2oAe/Vk
 P61zEvr6e9lUshgNAUrT0wOwbMJsXjyQrxWvVNU9l0Vm8BVU+BAdi7+OeKdWeeyqM4
 13r3QdTKMpgmiAWAs1h+gsS/a+wVjotOgLRJ0g3k=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.103] ([46.125.249.127]) by mail.gmx.com (mrgmx105
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1My32F-1hgOEk3apD-00zVyV; Wed, 13
 Nov 2019 09:03:58 +0100
Subject: Re: bug#38181: Actual height of mode-line not taken into account
To: Jonas Bernoulli <jonas@HIDDEN>, 38181 <at> debbugs.gnu.org
References: <87eeyd3ul0.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <2d8a9ed2-4152-338a-06ef-fd69b9d2830f@HIDDEN>
Date: Wed, 13 Nov 2019 09:03:56 +0100
MIME-Version: 1.0
In-Reply-To: <87eeyd3ul0.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: de-AT
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:hNnBOviDMQZkkCygUDkeM1n9As8h0+phy3buM8oNeH7L5wfGDv7
 e1+o9Ph8+k/EY742wpyfn2GDVxZpxJgHLqoUFDKbdkGZmG0PixfJW4A03NvfVvjC/zcjIc2
 BD/FoDi0tFQemVO3azRQ7MWweJ0bAdJg/Vpr4HJbwGU/d3aRujJZYaNFhjmkJ7isuZvyTIH
 0mabZCeaf4a8q/dPLVBSQ==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:+c5zJvLeZHM=:07ki1KiV5Zj9kHpgh6OoG4
 9TtmbcpCJse3FdwDIZcZs7qcVbcoH6hOCalXCJJatbOOyoXtfcrv5xYsbMt/VXKr+UgD/wzwl
 YM95eZEpK9+OYqC0dpjQEJvjsO2d8Cbq8AuiWMIJWzhHWvDTYDz+xi6J++RxzYaDEkvp9lGSG
 BsLHReugOcuGapo6LtAIH8HnTYFkdU8fMxyzFhE9FtR26VWFjqzz5NJc+/2mv6JxzXnzi34WF
 8biVs85VpuCR26p7uxPS2j5kdbZK7VRHta5DoyK3zCxLGCYRfs6sm4s6OMxxRb2pMLW/lOBrS
 /He3cthTfOHeRmtCJtAcJ3pNZgljwa04mL/yM+7PVRQhHIStreiVtFAEz67PJvLX4jGSIwUoD
 mLpa6oHB0MsQrEVa/1jWiNK9M0Y9TUhbJv6rY23IrDOx7Xd8wu0wRTP8FVB1wD0qT5oQ4CZyx
 6+xMNcNifFAVd8oYjEqfibfUdOfxkWsuDQ4lTHjx8Xe/TrkGD2++RWftKy1/Hmtfckx5sKXjE
 rPvIvnDJNw4TsfE/6S+XMeOesxSQmWl1RNbl3ACuMsB81iknSXM8abW1EyaQ3bwcdajfjNoJI
 EHPLnnkmIdOfw0yjbbRSTHAr5Ntf/mq8iQqZu0Ab4jSNtkJNhYUKx9kgQRcZX2BXWF8LsVZSe
 d21iyjO/yKHqd638thFRU+/Wm/bgtBujKjd+9quwLUsYLuH5vu6cOQei38nnhuMVNKL95oS1p
 w1S21zuYAmI5NrkPAt3yfYKTpCmNxUc6Bni96XiPK4we9x+VcwTp2RAZnM0GUQWmauxdKWtRL
 2/SUh5ijfy0u3+1YkT+/nKIJ6f4oUmciLZehU7bOFoso1k18lAO9d2ehkMy+ddl40ETuH7neW
 hhQ8Kf5QrdCxC4tTCQ6571d6w8ZQceoEVrbf3QbfALX03zBf8ecNjTockQGg8Kqwx66dcElLW
 YtvF5nxVwVm1d2u7bI6R6qias3OD27IXb4Kdrx6PLV2MsTLNDsUqKgvI79bVyldxKsbYHcK8a
 TJmY5pqrqV968XeKm0MhH7w3LVm3/n/2dOhrzri9yEqJ8bHYugTzq8UOqvtyABdSP6Ta10JuF
 1WCNryhefOCz+QfqoqwL+rgoaWv+do/g+1EDrJXcpRTXWJbVa6QTIAA4pcQKx33Zh74XW96NM
 Bfozx1rSTTp4/+7pwVa9EwHffekqMnP6yYtm3940PYTPkKcevwsiV1B6Vf5HIM5dZ2JCnIK2y
 YYFtKWgCmDNRh8SZrT63fI2UvLTwp3Sw1FHIKF+god+QgvZ4qhMjnKM7pIdY=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 38181
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 > (setq-default
 >   mode-line-format
 >   (cons (propertize " " 'display
 >                     (create-image "/* XPM */ static char * image[] = {
 > \"3 60 1 1\",
 > \"0 c #00aaff\",
 > \"000\",\n\"000\",\n\"000\",\n\"000\",\n\"000\",
 > \"000\",\n\"000\",\n\"000\",\n\"000\",\n\"000\",
 > \"000\",\n\"000\",\n\"000\",\n\"000\",\n\"000\",
 > \"000\",\n\"000\",\n\"000\",\n\"000\",\n\"000\",
 > \"000\",\n\"000\",\n\"000\",\n\"000\",\n\"000\",
 > \"000\",\n\"000\",\n\"000\",\n\"000\",\n\"000\",
 > \"000\",\n\"000\",\n\"000\",\n\"000\",\n\"000\",
 > \"000\",\n\"000\",\n\"000\",\n\"000\",\n\"000\",
 > \"000\",\n\"000\",\n\"000\",\n\"000\",\n\"000\",
 > \"000\",\n\"000\",\n\"000\",\n\"000\",\n\"000\",
 > \"000\",\n\"000\",\n\"000\",\n\"000\",\n\"000\",
 > \"000\",\n\"000\",\n\"000\",\n\"000\",\n\"000\"
 > };" 'xpm t :ascent 'center))
 >         mode-line-format))


When I evaluate that specification, the scroll bars are screwed up for
all windows and remain so for all unselected windows.  So this problem
is not pertinent to 'fit-window-to-buffer' only.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 12 Nov 2019 16:53:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 12 11:53:11 2019
Received: from localhost ([127.0.0.1]:58295 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iUZPj-0004Tc-2v
	for submit <at> debbugs.gnu.org; Tue, 12 Nov 2019 11:53:11 -0500
Received: from lists.gnu.org ([209.51.188.17]:37767)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jonas@HIDDEN>) id 1iUZPh-0004TV-J3
 for submit <at> debbugs.gnu.org; Tue, 12 Nov 2019 11:53:10 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:56465)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <jonas@HIDDEN>) id 1iUZPg-00013v-CL
 for bug-gnu-emacs@HIDDEN; Tue, 12 Nov 2019 11:53:09 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_LOW
 autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <jonas@HIDDEN>) id 1iUZPf-0000Cw-8g
 for bug-gnu-emacs@HIDDEN; Tue, 12 Nov 2019 11:53:08 -0500
Received: from mail.hostpark.net ([212.243.197.30]:55814)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <jonas@HIDDEN>) id 1iUZPf-0000CO-2v
 for bug-gnu-emacs@HIDDEN; Tue, 12 Nov 2019 11:53:07 -0500
Received: from localhost (localhost [127.0.0.1])
 by mail.hostpark.net (Postfix) with ESMTP id 730181663E
 for <bug-gnu-emacs@HIDDEN>; Tue, 12 Nov 2019 17:53:04 +0100 (CET)
X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net
Received: from mail.hostpark.net ([127.0.0.1])
 by localhost (mail1.hostpark.net [127.0.0.1]) (amavisd-new, port 10124)
 with ESMTP id DLoXplHuE8ux for <bug-gnu-emacs@HIDDEN>;
 Tue, 12 Nov 2019 17:53:04 +0100 (CET)
Received: from customer (localhost [127.0.0.1])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mail.hostpark.net (Postfix) with ESMTPSA id 0305916618
 for <bug-gnu-emacs@HIDDEN>; Tue, 12 Nov 2019 17:53:03 +0100 (CET)
User-agent: mu4e 1.1.0; emacs 27.0.50
From: Jonas Bernoulli <jonas@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: Actual height of mode-line not taken into account
Message-ID: <87eeyd3ul0.fsf@HIDDEN>
Date: Tue, 12 Nov 2019 17:52:59 +0100
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-Received-From: 212.243.197.30
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

If the height of the mode-line is increased by inserting an image into
it, then that height is not taken into account in a buffer/window until
`redisplay' has been called at least once since the buffer was created.

This function can be used for testing:

(defun test-popup ()
  (interactive)
  (with-current-buffer (generate-new-buffer "*test*")
    (save-excursion
      (insert "one\ntwo\nthree\nfour\nfive"))
    (let ((win (display-buffer (current-buffer)
                               '(display-buffer-in-side-window
                                 (side . bottom)))))
      ;; (redisplay)
      (fit-window-to-buffer win))))

First we can see that if we increase the height by modifying the
`mode-line' and `mode-line-inactive' faces, then that IS taken into
account.

(set-face-attribute 'mode-line nil :height 250)
(set-face-attribute 'mode-line-inactive nil :height 250)

Now decrease the height again and try this instead:

(setq-default
 mode-line-format
 (cons (propertize " " 'display
                   (create-image "/* XPM */ static char * image[] = {
\"3 60 1 1\",
\"0 c #00aaff\",
\"000\",\n\"000\",\n\"000\",\n\"000\",\n\"000\",
\"000\",\n\"000\",\n\"000\",\n\"000\",\n\"000\",
\"000\",\n\"000\",\n\"000\",\n\"000\",\n\"000\",
\"000\",\n\"000\",\n\"000\",\n\"000\",\n\"000\",
\"000\",\n\"000\",\n\"000\",\n\"000\",\n\"000\",
\"000\",\n\"000\",\n\"000\",\n\"000\",\n\"000\",
\"000\",\n\"000\",\n\"000\",\n\"000\",\n\"000\",
\"000\",\n\"000\",\n\"000\",\n\"000\",\n\"000\",
\"000\",\n\"000\",\n\"000\",\n\"000\",\n\"000\",
\"000\",\n\"000\",\n\"000\",\n\"000\",\n\"000\",
\"000\",\n\"000\",\n\"000\",\n\"000\",\n\"000\",
\"000\",\n\"000\",\n\"000\",\n\"000\",\n\"000\"
};" 'xpm t :ascent 'center))
       mode-line-format))

When you call the command now, then the lower parts of the buffer are
not visible because the window is not high enough.

A work-around is to call `redisplay' before calling
`fit-window-to-buffer', which could be done by advising that function.




Acknowledgement sent to Jonas Bernoulli <jonas@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#38181; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.