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

From: "John Hurst" <[email-masked]>
Date: Sun, 27 Oct 2024 18:32:55 +1100

G'day Martin,

I have to admit that I am getting out of my depth here.  I have written lots of emacs lisp programs, but not using many of the features that you talk about.  Hence I may get confused at times (:-(

Comments in text ...

On Sat, 26 Oct 2024, at 19:43, martin rudalics wrote:
>> 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?

Unfortunately, no.  Still same small window, and 4 GTK warnings

>
> 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?  

No.  

> Do you have some .emacs files around that emacs could have
> read (it may look into several directories)?  

Not at the top level of $HOME.  There are backups in a directory $HOME/Archives, and in my Pictures and Videos directories.  But they are only minor variations on the $HOME/.emacs, and when I delete them, the behaviour remains.

> What does
>
> (frame-geometry)
>
> tell for the frame you created here?

I think it was
((outer-position 1214 . 79) (outer-size 220 . 300) (external-border-size 14 . 17) (outer-border-width . 0) (title-bar-size 0 . 32) (menu-bar-external . t) (menu-bar-size 192 . 25) (tab-bar-size 0 . 0) (tool-bar-external . t) (tool-bar-position . top) (tool-bar-size 192 . 41) (internal-border-width . 0))
but I had to resize the window to read it!
>
> 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.

I presume I should make another frame after running 'emacs -Q'?  In any case, it made another frame the same small size.

>
>  > 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?

No, those values just do not appear.
>
>  > But
>  > the GNU Emacs splash screen does not appear.
>
> Do you see it normally when starting emacs?

Yes, if I explicitly load my .emacs and eval-buffer that!

> martin

cheers,
-- John Hurst
--
-- ajh AT ajhurst DOT org                       ~ ~~~&#:
--  (mob 0407 569 292)              _..___  ---____@___H__
-- (local)  ajh.co                  |_____[_|_________[__]_
-- (global) ajhurst.org              oo oo  oo O--O--O o=o
--
-- Hurst's Third Law of telecommunications: 
--    ISPs are not as smart as spammers