Subject: Re: bug#38181: Actual height of mode-line not taken into account

From: martin rudalics <[email-masked]>
Date: Fri, 15 Oct 2021 10:35:25 +0200

> But the problem I'm seeing now is that the first time
 > org-set-tags-command is executed its popup is correctly sized (with
 > said workaround in place, of course), but further executions show a
 > popup with the wrong geometry that trims part of the text off. If I
 > remove the "just once" clause in the workaround, so that the redisplay
 > is forced after each fit-window-to-buffer execution, then the layout
 > is correct every time. It goes without saying that
 > org-set-tags-command is ultimately triggering the execution of
 > fit-window-to-buffer, but that stuff you probably know much better
 > than me. Thing is, there was no enlargement of the modeline
 > in-between, as far as I can understand and see nothing changed in this
 > regard between the first and the second execution of
 > org-set-tags-command.

I'm not sure I follow.  What is the purpose of "the redisplay is forced
after each fit-window-to-buffer execution"?  If you want a new mode line
height to be taken into account by 'fit-window-to-buffer', you probably
should do any such redisplay _before_ executing 'fit-window-to-buffer'.
Or what am I missing?

martin