Open rothmichaels opened 9 years ago
Don't worry, that's everything I've found / could think of so that's the last issue/pull-request for now ;)
My apologies, my suggestion above was incorrect (somehow must have pasted the wrong thing while working on debugging this). Here is what I meant to suggest.
(let ((the-window (frame-selected-window))
(the-buffer (current-buffer)))
(if (window-dedicated-p the-window)
(switch-to-buffer the-buffer)
(set-window-buffer the-window the-buffer)))
When working on #198, I was able to come to a better understanding of the issues I brought up with monkey-patch.el in #153.
live-mp-new-basic-save-buffer
callsset-window-buffer
to move the buffer that is pending a save to the current window. According to the documentation forset-window-buffer
, it will throw an error if called from a dedicated window:Some modes, such as ediff-mode, use a dedicated window as a control panel for enter commands to be run on buffers in other windows. In ediff-mode for example, the frame is divided into windows for the three buffers involved with the merge (base, current, and merged) and a fourth dedicated window for the
*Ediff Control Panel*
. When entering commands, including saving the merge, the*Ediff Control Panel*
is the current selected window and a call toset-window-buffer
will throw an error.One solution is to replace the call to
(set-window-buffer (frame-selected-window) (current-buffer))
with(switch-to-buffer (current-buffer))
. Ifswitch-to-buffer
will not give you your desired behavior, then I would suggest replacing the call only when in a dedicated buffer:If you like one of these solutions, let me know and I'll make a pull request.