martin rudalics writes: >> this idea seems pretty good, I don't see any downside to this. I'll >> have a go at it. But will this work with your earilier magic patch that >> would somehow automaitclly reconsutruct parent windows? > > 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. >>> Attached find my latest diffs (the documentation has not been completed >>> yet) and window-rotate.el. >> >> I applied the patches, and found your think works well in most cases, >> however it fails to work in windows of file attached > > I don't see that here. IIUC you can get that initial configuration via > > C-x 3 C-x o C-x 2 C-x 3 C-x 2 C-x 3 C-x 3 > > and it rotates fine here. What are the contents of *foo* after > attempting to rotate? 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 >> Wait, now that I look at it, it does not work for windows with >2 >> siblings, for example C-x 3 C-x 3 gives me 'wrong argument type' error > > Strange. If that happened within 'split-window' it should have been > caught by the 'condition-case'. If it happens elsewhere, you would have > to run it via edebug. In either case *foo* should tell how far it got. I'll see if you can tell anything by looking at foo, otherwise I will have to do that. 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.