From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#38181: Actual height of mode-line not taken into account Date: Fri, 15 Nov 2019 17:11:19 +0200 Message-ID: <835zjl2mzs.fsf@gnu.org> References: <87eeyd3ul0.fsf@bernoul.li> <83d0dt2qt6.fsf@gnu.org> <87a78xnrp0.fsf@bernoul.li> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="25723"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 38181@debbugs.gnu.org To: Jonas Bernoulli Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 15 16:12:14 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iVdGd-0006Yw-Q8 for geb-bug-gnu-emacs@m.gmane.org; Fri, 15 Nov 2019 16:12:11 +0100 Original-Received: from localhost ([::1]:40630 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iVdGc-0002ox-Mp for geb-bug-gnu-emacs@m.gmane.org; Fri, 15 Nov 2019 10:12:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41107) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iVdGW-0002oL-JB for bug-gnu-emacs@gnu.org; Fri, 15 Nov 2019 10:12:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iVdGV-0000kC-Cx for bug-gnu-emacs@gnu.org; Fri, 15 Nov 2019 10:12:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56649) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iVdGV-0000k4-9S for bug-gnu-emacs@gnu.org; Fri, 15 Nov 2019 10:12:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iVdGU-0007fe-1u for bug-gnu-emacs@gnu.org; Fri, 15 Nov 2019 10:12:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 Nov 2019 15:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38181 X-GNU-PR-Package: emacs Original-Received: via spool by 38181-submit@debbugs.gnu.org id=B38181.157383070529464 (code B ref 38181); Fri, 15 Nov 2019 15:12:02 +0000 Original-Received: (at 38181) by debbugs.gnu.org; 15 Nov 2019 15:11:45 +0000 Original-Received: from localhost ([127.0.0.1]:37237 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iVdGC-0007fA-OE for submit@debbugs.gnu.org; Fri, 15 Nov 2019 10:11:44 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:60230) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iVdGA-0007eu-Db for 38181@debbugs.gnu.org; Fri, 15 Nov 2019 10:11:42 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58316) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iVdG4-0000UR-Vk; Fri, 15 Nov 2019 10:11:37 -0500 Original-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 ) id 1iVdG2-0000Nz-AT; Fri, 15 Nov 2019 10:11:36 -0500 In-reply-to: <87a78xnrp0.fsf@bernoul.li> (message from Jonas Bernoulli on Fri, 15 Nov 2019 15:24:11 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:171674 Archived-At: > From: Jonas Bernoulli > Cc: 38181@debbugs.gnu.org > Date: Fri, 15 Nov 2019 15:24:11 +0100 > > > Eli Zaretskii 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?