[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#45072: 28.0.50; Emacs switches other buffer back uncontrollably, if
From: |
Juri Linkov |
Subject: |
bug#45072: 28.0.50; Emacs switches other buffer back uncontrollably, if other window's buffer is changed by user during minibuffer editing |
Date: |
Mon, 19 Apr 2021 21:09:59 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) |
>>> It seems that problem is that read_minibuf messes up the windows so much,
>>> that at the end currently the only way to fix this mess is by restoring
>>> the previous window configuration. This means that there is a need
>>> to fix read_minibuf to restore all previous window states without using
>>> restore_window_configuration. Only then it will be possible to add
>>> a user option to disable using restore_window_configuration.
>>
>> But without such an option, it's hard to find and fix the problems,
>> because they're hidden by the `restore_window_configuration`.
>> So maybe we should introduce such an option, and then force ourselves to
>> live with it and then fix the problems we encounter.
>
> Exiting from and quitting `read-minibuffer' is hairy, in particular with
> multiple frames. IIRC it's hard to tell for an application how to clean
> up the state when the user quits and throws it back to the top level.
Since restore_window_configuration doesn't restore multiple frames,
we already don't clean up the previous state completely. So maybe
really it should be sufficient for a new option just to select
the original window if it still exists.