Subject: bug#78418: 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 09:21:05 +0200

In GNU Emacs 31.0.50 (build 1, aarch64-apple-darwin24.5.0, NS
 appkit-2575.60 Version 15.5 (Build 24F74)) of 2025-05-13 built on pro2

The transient-posframe display changed which I bisected to

  6017c6a986fd958732facb1bb6ea2c040981b023 is the first bad commit
  commit 6017c6a986fd958732facb1bb6ea2c040981b023
  Author: Martin Rudalics <[email-masked]>
  Date:   Mon Dec 23 10:59:11 2024 +0100
      Make 'fit-frame-to-buffer' work around size hints (Bug#74866)

      * lisp/window.el (fit-frame-to-buffer-1): When
      'frame-resize-pixelwise' is nil, round up requested sizes to avoid
      that lines get wrapped (Bug#74866).
      * doc/lispref/windows.texi (Resizing Windows): Mention that with
      size hints one may have to set 'frame-resize-pixelwise' to make
      'fit-frame-to-buffer' fit the buffer exactly.
   doc/lispref/windows.texi |  4 +++-
   lisp/window.el           | 20 ++++++++++++++++++++
   2 files changed, 23 insertions(+), 1 deletion(-)

After that change, an additional line is displayed at the bottom of the
child frame that transient-posframe uses to display a transient.

Screen shot from the NS GUI on macOS:

On ttys, the pixel-wide line above the additional line is not present,
of course.

Added Martin and the author of transient-posframe in CC.