bug-gnu-emacs
[Top][All Lists]
Advanced

[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: Wed, 04 Aug 2021 11:39:04 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

>> +  ;; When read_minibuf doesn't restore all previous windows,
>> +  ;; then at least pop down the completions window.
>> +  (unless read-minibuffer-restore-windows
>> +    (minibuffer-hide-completions))
>
> Hm...  Well, I guess that's what most people would want...  but...

The new option read-minibuffer-restore-windows is quite unusable
without the above change: selecting a completion from the
completions buffer will leave the completions buffer on the screen.

> should it be user-controllable?  Perhaps read_minibuffer_restore_windows
> shouldn't be a boolean, but allow values like t, 'completions and nil,
> where 'completions would trigger this behaviour?

Then I propose a new hook, e.g. read-minibuffer-restore-functions
with the default value '(minibuffer-hide-completions).  Then such hook
could be run instead of restoring the window configuration, i.e.
the logic could be:

  if (read_minibuffer_restore_windows)
    record_unwind_protect (restore_window_configuration,
                           list3 (Fcurrent_window_configuration (Qnil),
                                  Qt, Qt));
  else
    safe_run_hooks (Qread_minibuffer_restore_functions);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]