emacs: refactor window recipe