Ihor Radchenko <[email protected]> writes:

>> How so? I'm not sure I fully understand. Reading the manual on quitting
>> windows doesn't mention anything on window configuration. The logic is
>> quite complex to be honest. I also don't see any mention about raising 
>> frames.
>
> I think it simply boils down to
> (quit-window 'kill) instead of kill-buffer, which should take care about
> restoring the window configuration.
>
> I have to say that I do agree that quit-restore staff is complex, and I may 
> be wrong.
> But the situation we are discussing sounds similar to what quit/restore
> feature is designed to handle.

I have investigated various ways how to handle the quit-window, and it
does not look like it is going to help here.
I thus installed an updated version of your patch onto main.
Fixed on main.

I made a number of changes to the patch:
1. org-log-note-window-configuration meaning is no longer changed.
   I instead used a new variable to store window configuration after
   popup - org-log-note-popup-window-configuration
2. I use select-frame-set-input-focus instead of simple raise-frame
   because raise-frame does not put the cursor back to the original
   frame.
3. Changelog entry is removed as the new variant of the patch should
   exclusively affect the situation with new frame being raised,
   restoring the expected behavior. Thus, it is a bugfix.

https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=75d50b85e

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to