martin rudalics writes: >> As of rn, compiling emacs bug outs for leim for some reason, so I can't >> compile with the improvemnt, but I got it to work. > > What is the bug? It was when byte comping emacs/lisp/leim/leim-list.el, so I just removed the whole thing along with the quail library. Then after than it was another thing where it would just spam me with 'temacs' warnings, and then segmentation fault. >> One thing you do in the code is check if parent of prev is equal to >> current window, which is my mind must be true cuz is it isn't, then it >> would go thoruhg another level of nesting. > > That's possible. I told you that my code is likely over-engineered. > > Your last version reuses all parent windows as expected so we should be > done in principle. Finally! Thanks for your patiance, it feels like we are getting somewhere again after the spliting parent window saga. > > Could you try using 'window-normal-size' as I did in window-rotate.el? > It should be able to preserve initial sizes better than using the real > sizes as you do. The only clue here is that the normal size of a window > is always relative to the size of its parent and not to that of the root > window. Ok, I did that, and it now works fine. I made progress with atom windows and fixed size windows. It just gives message if you have any of those and do-not-convert-size is non-nil (as in transpose and rotate window), but the strucuture preservign thing works in flip functions. I know it's theoreticly possible to do atom-windows when size is converted, but it's a nightmare iiuc. Also what do you want to happen with dedicated-windows in cycle-windows command? Technically it'll work fine, but it's unitutve as the user gets the expression buffers have changed but window remains the same, evo tho only windows have changed. So in atom windows, there is a bug where they do not remain atomic after the functino is called, although the strucutre and proportions are preserved,. I have prepared an gourmet bug experiance for you. Just insert the test in any buffer, and go C-x C-e at end. I don't think it'll work if you do M-:. Use the updated window-transpose.el.