GNU bug report logs - #45072
28.0.50; Emacs switches other buffer back uncontrollably, if other window's buffer is changed by user during minibuffer editing

Previous Next

Package: emacs;

Reported by: Jean Louis <bugs <at> gnu.support>

Date: Sun, 6 Dec 2020 14:09:01 UTC

Severity: minor

Tags: fixed

Fixed in version 28.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #161 received at 45072 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: martin rudalics <rudalics <at> gmx.at>, Eli Zaretskii <eliz <at> gnu.org>,
 bugs <at> gnu.support, 45072 <at> debbugs.gnu.org
Subject: Re: 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
>> +  ;; 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);




This bug report was last modified 3 years and 292 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.