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

From: martin rudalics <rudalics <at> gmx.at>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>, Juri Linkov <juri <at> linkov.net>
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: Mon, 19 Apr 2021 18:02:19 +0200
>>> But 'minibuffer-hide-completions' uses 'bury-buffer' which would delete
>>> the completions window unconditionally even when it was only reused for
>>> showing completions.  IMO 'bury-buffer' is practically always the wrong
>>> choice for Lisp functions to call.
>>
>> Maybe 'quit-window' is better?
>
> Part of the problem is one of documentation: it's hard to know which one
> to call just by reading the docstrings.
>
> Also the above quoted text sounds counter intuitive: "bury buffer"
> sounds like it's mostly focused on hiding the *buffer*, potentially
> hiding the window along the way if necessary, whereas "quit window"
> sounds like it's mostly going to eliminate the *window*.

That's why Lisp code should call `quit-restore-window' instead of
`quit-window'.

> Of course, there's also the fact that `quit-window` is fairly new
> (introduced in Emacs-24), whereas `bury-buffer` has been with us forever.

Both, `bury-buffer' and `quit-window' should be used interactively only.

martin




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

Previous Next


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