I ranted earlier about the horrid window behavior that occurs when using Slime.
Less ranting and more googling reveals that there are some scripts that can make it suck less. Winner mode seems nice for example; it lets you undo and redo window operations like opening/closing/splitting windows.
You can also store window layouts in registers and restore them. So I threw this together:
(defun save-window-layout () (interactive) (window-configuration-to-register ?z)) (defun load-window-layout () (interactive) (jump-to-register ?z)) (global-set-key [C-f1] 'save-window-layout) (global-set-key [f1] 'load-window-layout)
So C-F1 saves my current layout, and F1 restores it. This is enough to preserve my sanity. I only did those mappings because
C-r w z and
C-r j z are far too long to type.