>>From what I understand, the main problems are happening when destroying > and recreating the window arragnment. How about adding a function that > toggles or changes the window arrangment non recursivly, which will deal > with all the backend details, and the main rotate function can just > recursivly call that on all windows. I attach a function 'resurrect-window' that rotate/transpose/flip functions can call to resurrect the previous windows after having deleted them. Tested with: (let ((dead (split-window nil nil t))) (set-window-buffer dead "*Messages*") (message "%s" (next-window)) (sit-for 2) (delete-window dead) (let ((live (split-window))) (resurrect-window dead live) (message "%s" (next-window)))) martin