>> It wasn't magic - so far I was not able to make it work here. In all >> approaches that work here, I have to pass a (window . parent) cons to >> 'split-window' as REFER argument. I do no exclude that one can make it >> work but it's not simple and very likely requires the normal window >> handling routines to keep an old parent for each window around. > > Ah, I see. This approach definetly seems better tho, cause there is no > hidden stuff going on. But the caller has to remember which parent was the old one and pass it as argument. > I attached the contents of foo, but with the simpler split of > C-x 3 C-x o C-x 3 which still has the same error I suspect you're testing an old version of window-rotate.el or the wrong patch for 'split-window'. I resend them both. > I'll see if you can tell anything by looking at foo, otherwise I will > have to do that. This is definitively an old version. The new version outputs something like ((# (buffer . #) (parent . #) (prev . #) (next) (width . 0.25) (height . 1.0)) (# (buffer . #) (parent . #) (prev . #) (next . #) (width . 0.25) (height . 1.0)) (# (buffer . #) (parent . #) (prev) (next . #) (width . 0.5) (height . 1.0)) (# (left . #) (top) (parent) (prev) (next . #) (first . #) (width . 1.0) (height . 1.0) (combination-limit) (no-rotate))) First # v # N # [nil|#] S 385 T v # N # [#|#] S 192 F to *foo* where the last lines explain the 'split-window' calls and are interpreted, from left to right - "v" represents a split below ("^" above "<" left and ">" right are the other indicators) - the window to split - "N" is followed by the live window to recreate, a next sibling (it could also be "F" for first descendant) - [|] specify the old and new parent of the window to split - "S" is followed by the new size in pixels of the window to split - a final "T" or "F" stand for the combination limit of the parent. With C-x 3 C-x 3 there must be at least one line terminated by an "F" which means a horizontal combination of at least three windows was made. You can see that also in the parent windows that were used: The first split resurrects window 14 as parent of 11 and 15. The second split reuses window 14 as new parent of windows 15 and 16. > Looking at the code, you have not set the size argument yet, meaning that it > sis splitting only half and half approach. > > When you do this you will see the flaw of splitting parent windows: When > you split a parent window, all the child of the window being split are > scaled equally. Emacs does not handle this properly, for example look > at the screenshot I attached, this is why I initally did not want to > split parent windows. Try again with the code I attached. martin