I have a bunch of one off functions to do frame/window layout. But an issue I run into is that if I do, say
(set-frame-size (selected-frame) 255 80)
(some-other-function-that-looks-at-frame-size-to-split-windows)
Half the time the resize hasn't finished by the time the split function runs, and so it splits incorrectly. I'm assuming the resize happens asynchronously, but I don't see a hook or event I can make use of to make sure I'm splitting after the fact. Is there something I'm missing? Sleeping doesn't seem to fix it because that just delays the resize as well.
I would love to modernize the emacs core, but rewrites are usually destined to fail, more likely the older the project being rewritten is. And emacs is very old.
How about this approach. Emacs only got dynamic modules in v26, fivish years ago? All the junk compiled into the core was done so because there wasn't something like dynamic modules. Someone (I hope I'm not signing myself up for this) should do a project to move all functionality other than the lisp engine itself and maybe some basic primitives out into dynamic modules. When the lisp engine is isolated via a stable abi, then you can redesign it without fear. Similarly with any of the modules themselves.