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 #77 received at 45072 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Eli Zaretskii <eliz <at> gnu.org>, larsi <at> gnus.org, Jean Louis <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, 09 Dec 2020 21:11:39 +0200
>> Thanks, sometime ago I asked how this would be possible to do,
>> and now I'm testing your patch (it missed trailing spaces on diff
>> context lines, but still applies without problems).
>>
>> It seems to be really useful this option needs to keep only windows
>> implicitly created by the user, but remove windows created
>> automatically by mibibuffer-related commands such as the buffer
>> *Completions*.
>
> Such windows must be removed by the mechanism that created them.  I
> hardly ever see such windows here because I'm apparently using some
> arcane completions mechanism that always puts them in place right away.
> But if I'm not mistaken, several such windows may pop up during one and
> the same minibuffer input operation and IMO all of them should pop down
> automatically as soon as they served their purpose.
>
> A case could be made in the sense that by default the minibuffer window
> itself won't shrink back after the completions have been shown there.
> But I suppose that people using such a mechanism should also set
> 'resize-mini-windows' to t.

What do you think about let-binding a new variable
read-minibuffer-record-windows to nil around functions
that pop up completion windows?

I mean for example in minibuffer-completion-help:

  (let ((read-minibuffer-record-windows nil))
    (display-completion-list completions))

The default value of read-minibuffer-record-windows could be t,
so it will record new windows created by the user, e.g. by C-x 2.
But when let-bound to nil, it won't record windows created
by completion commands, so these windows won't be restored
after exiting the minibuffer.




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.