Subject: Re: 31.0.50; Change in fit-frame-to-buffer doesn't work with transient-posframe

From: Gerd Möllmann <[email-masked]>
Date: Wed, 14 May 2025 10:26:50 +0200

martin rudalics <[email-masked]> writes:

>> Added Martin and the author of transient-posframe in CC.
>
> In this piece of code
>
> 	(setq text-minus-body-height
> 	      (+ text-minus-body-height
> 		 (- char-height
> 		    (% text-minus-body-height char-height)))))
>
> what are the values of 'text-minus-body-height' and 'char-height' when
> the problem happens?
>
> martin

text-minus-body-height 0, char-height 1

with

modified   lisp/window.el
@@ -10157,6 +10157,8 @@ fit-frame-to-buffer-1
 	      (+ text-minus-body-width
 		 (- char-width
 		    (% text-minus-body-width char-width))))
+        (message "text-minus-body-height %S, char-height %S"
+                 text-minus-body-height char-height)
 	(setq text-minus-body-height
 	      (+ text-minus-body-height
 		 (- char-height

in an Emacs on tty.