Looking for a solution on how to restore my window layout after an Ediff session, I found a blog post, where the author suggests:
(add-hook 'ediff-after-quit-hook-internal 'winner-undo)
This seems to almost work well for me. I say almost because I invoke
M-x ediff-buffers from
Helm, and quiting the Ediff session brings me back to the original layout with the dead Helm menu from where I chose
Let me explain:
- At any point I have several windows open with a window layout L1.
- I want to ediff some buffers, so I press
M-x: This re-uses one of the windows in L1 to open up a Helm autocompletion menu. So far so good.
- I choose
ediff-buffers, and then the two buffers to compare, one after the other
- This takes me to an
ediffsession where I can check differences etc.
- Once I am done. I quit my ediff-session.
- I would like to go back to my layout L1 in step #1. However, Emacs
(winner-mode)takes me back to step #2, where one of the Emacs windows in L1 was used to show the options in Helm. This is pointless since I am done with my ediff session.
How can I restore windows to my original layout L1?
This is all in
Emacs 22.214.171.124 on OS X. More specifically,
GNU Emacs 126.96.36.199 (x86_64-apple-darwin14.0.0, NS appkit-1343.16 Version 10.10.1 (Build 14B25))