Subject: bug#73244: Emacs29.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.41

From: martin rudalics <[email-masked]>
Date: Sat, 26 Oct 2024 10:43:44 +0200

> The two frame-size history files are
 >
 > 1) ---------------------------------------------------------------------
 > Frame size history of #<frame  *Minibuf-1* - GNU Emacs at newport 0x5a939cd6fe78>

This should be the history for running emacs from the launch bar with an
early-init.el file and no .emacs file.

 > ConfigureNotify, PS=1032x840, XS=1032x840, DS=1032x840
[...]
 > ConfigureNotify, PS=1032x840, XS=1920x977, DS=1032x840
[...]
 > change_frame_size (5), TS=1000x840~>1888x977, TC=100x40~>188x46, NS=1032x840~>1920x977, IS=1032x840~>1920x977, MS=20x42 IH IV
 > set_window_configuration (4), MS=100x105 IH IV

This history is remarkable because I nowhere see that small frame size
in the ConfigureNotify events you got.  Hence, you should not have seen
any strange resizings and no GTK warnings either.  Am I right?

At the very end it makes a frame that is 188x46 characters large so IIUC
more than you asked for.  Does this size figure anywhere in one of your
resources?  Do you have some .emacs files around that emacs could have
read (it may look into several directories)?  What does

(frame-geometry)

tell for the frame you created here?

Obviously my suggestion to put

(setq frame-size-history '(100))
(defun resize-me (frame)
    (set-frame-size frame 42 90))

into the early-init.el file was silly again - a NOOP and nothing else.
What I should have asked you for was to put there

(setq frame-size-history '(100))
(defun resize-me (frame)
    (set-frame-size frame 90 42))
(add-hook 'after-make-frame-functions 'resize-me)

instead.  Can you try with that again?  In either case, it seems that
putting something in the early-init.el file might change things to the
better and we should pursue that.

 > 2) -----------------------------------------------------------------------
 > Frame size history of #<frame  *Minibuf-1* - GNU Emacs at newport 0x5abd0a28b818>

Now this should be the history for running emacs from a terminal window
reading your usual .emacs.

 > ConfigureNotify, PS=1032x840, XS=200x175, DS=1032x840

This is the usual unpleasant ConfigureNotify event ...

 > xg_frame_resized, changed, PS=1032x840, XS=200x175
 > change_frame_size_1, delayed, PS=1032x840, XS=200x175, DS=1032x840
 > change_frame_size (5), TS=1000x840~>168x175, TC=100x40~>16x8, NS=1032x840~>200x175, IS=1032x840~>200x175, MS=20x42 IH IV

... that allots us a 16x8 window ...

 > ConfigureNotify, PS=200x175, XS=192x168

... here we get another ConfigureNotify with about the same size ...

 > xg_frame_resized, changed, PS=200x175, XS=192x168
 > change_frame_size_1, delayed, PS=200x175, XS=192x168
 > change_frame_size (5), TS=168x175~>160x168, NS=200x175~>192x168, IS=200x175~>192x168, MS=20x42 IH IV
 > tool-bar-lines (2), MS=100x105
 > xg_frame_set_char_size, visible, PS=192x168, XS=192x168

... which we here use in our own request (this one should cause the
usual GTK warnings) ...

 > ConfigureNotify, PS=192x168, XS=192x168
 > xg_frame_resized, unchanged, PS=192x168, XS=192x168
 > ConfigureNotify, PS=192x168, XS=1920x977

... but here we miraculously get a ConfigureNotify event ...

 > xg_frame_resized, changed, PS=192x168, XS=1920x977
 > change_frame_size_1, delayed, PS=192x168, XS=1920x977
 > change_frame_size (5), TS=160x168~>1888x977, TC=16x8~>188x46, NS=192x168~>1920x977, IS=192x168~>1920x977, MS=20x42 IH IV

... that makes us resize the frame to 188x46 characters as above.  You
seem to confirm that here ...

 > Now emacs still starts up with a small window (15x7), but it does seem
 > to have read more of the .emacs file than before (perhaps all?).

... but can you explain the 188x46 size from your .emacs?

 > But
 > the GNU Emacs splash screen does not appear.

Do you see it normally when starting emacs?

martin