GNU bug report logs - #46097
27.1; Minibuffer may not be current when running minibuffer-exit-hook

Previous Next

Package: emacs;

Reported by: klubujevetru <klubujevetru <at> cock.li>

Date: Mon, 25 Jan 2021 10:58:01 UTC

Severity: normal

Found in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: klubujevetru <klubujevetru <at> cock.li>
Cc: 46097 <at> debbugs.gnu.org
Subject: bug#46097: 27.1; Minibuffer may not be current when running minibuffer-exit-hook
Date: Mon, 13 Jun 2022 21:08:39 +0200
klubujevetru <klubujevetru <at> cock.li> writes:

> Open the minibuffer with C-x C-f, switch to another window with C-x o
> and abort the minibuffer with C-] (abort-recursive-edit).
> minibuffer-exit-hook ends up running without the minibuffer being the
> current buffer.
>
> This may cause problems if a minibuffer adds a cleanup function the hook
> locally, see for example discussion at
> https://github.com/oantolin/embark/issues/114
> The cleanup function fails to run in this situation because the local
> value of the hook isn't considered.

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

I can reproduce this in Emacs 27.1, but this has apparently been changed
sometime after this -- in Emacs 29, the hook seems to always be run with
the minibuffer as the active buffer, so I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




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

Previous Next


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