GNU bug report logs - #74866
29.4; fit-frame-to-window + no vertical scroll bar + changed face height = mess

Previous Next

Package: emacs;

Reported by: toomas <at> rosin.ee

Date: Sat, 14 Dec 2024 12:58:04 UTC

Severity: normal

Merged with 74867

Found in version 29.4

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: toomas <at> rosin.ee, martin rudalics <rudalics <at> gmx.at>
Cc: 74866 <at> debbugs.gnu.org
Subject: bug#74866: 29.4; fit-frame-to-window + no vertical scroll bar + changed face height = mess
Date: Sat, 14 Dec 2024 15:26:18 +0200
> From: toomas <at> rosin.ee
> Date: Sat, 14 Dec 2024 14:57:31 +0200
> 
> 
> ----------------8<----------------8<----------------8<----------------
> 
> In "emacs -Q" under X (I have XFCE), evaluate:
> 
> (defun fit (lin col)
>   "Fit some text (LIN lines and COL columns) into a newly created frame."
>   (interactive)
>   (let ((buf (get-buffer-create "*foo*"))
>         (frm (make-frame '((z-group . above)))))
>     (with-current-buffer buf
>       (erase-buffer)
>       (setq mode-line-format '(""))
>       (dotimes (_ lin) (insert (format "%s\n" (make-string col ?x))))
>       (goto-char (point-min)))
>     (with-selected-frame frm
>       (switch-to-buffer buf)
>       (fit-frame-to-buffer))))
> ;;; LIN and COL are arbitrary, make them sufficiently small.
> (fit 9 23)
> 
> So far, so good.  Now evaluate the following:
> 
> (setq-default vertical-scroll-bar nil)
> (set-face-attribute 'default nil :height 75)
> (fit 9 23)
> 
> On my system, the frame's width is now one character short and the lines
> do not fit in the new frame any more.
> 
> ---------------->8---------------->8---------------->8----------------
> 
> In GNU Emacs 29.4 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.41,
>  cairo version 1.18.2) of 2024-12-10 built on localhost
> Windowing system distributor 'The X.Org Foundation', version 11.0.12101014
> System Description: Gentoo Linux

FWIW, I cannot reproduce this, neither in Emacs 29.2 nor in the
current emacs-30 branch (which will soon become Emacs 30.1).

Martin, any comments?




This bug report was last modified 180 days ago.

Previous Next


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