GNU bug report logs - #45792
28.0.50; regression in commit c7c154bb, minibuffer is not closed after opening a file

Previous Next

Package: emacs;

Reported by: Platon Pronko <platon7pronko <at> gmail.com>

Date: Mon, 11 Jan 2021 16:11:01 UTC

Severity: normal

Found in version 28.0.50

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Alan Mackenzie <acm <at> muc.de>
To: Platon Pronko <platon7pronko <at> gmail.com>
Cc: martin rudalics <rudalics <at> gmx.at>, 45792 <at> debbugs.gnu.org
Subject: bug#45792: 28.0.50; regression in commit c7c154bb, minibuffer is not closed after opening a file
Date: Sun, 31 Jan 2021 11:50:57 +0000
Hello, Platon.

On Sun, Jan 31, 2021 at 11:54:24 +0300, Platon Pronko wrote:
> Hi!

> > No problem, but I don't think you did.  There were real bugs connected
> > with input methods, and I think your initial scenario highlighted one of
> > these bugs.

> I'm glad to hear that!

> > It hasn't gone away for me.  

> This is quite strange. (minibufferp) guard was supposed to avoid running
> any code whatsoever on minibuffer, so there shouldn't be any calls
> to activate-input-method and associated bugs shouldn't be triggered.

> Here's the code I'm talking about, just in case:

> (define-minor-mode dvorak-minor-mode "Use english-dvorak input method." :lighter nil
>    (if (and dvorak-minor-mode (not (minibufferp)))
>      (activate-input-method "english-dvorak")))
> (define-global-minor-mode global-dvorak-mode dvorak-minor-mode dvorak-minor-mode)
> (global-dvorak-mode t)

Apologies, I'd not paid enough attention to your test code.  With the
(minibufferp) check, the bug indeed doesn't show itself.

However, I think users ought to be able to use input methods in
minibuffers too.

What was triggering the bug without the (minibufferp) check was the
minibuffer's transition from fundamental-mode to
minibuffer-inactive-mode.  A change in major mode triggers a call to
global minor modes.  Here, the activate-input-method causes "guidance"
to be displayed on the mode line and an infinite wait to start.  This is
normally OK, because the user's command has just been completed, but
this isn't the case when a minibuffer has just been used.

So I've committed a patch which suppresses the display of "guidance" in
an expired minibuffer.  The aim is that you can omit the (minibufferp)
check from your code if you want, and have the input method working in
minibuffers.

Could you please try out the new code, and let me know whether it's
working properly, or what's still not quite right.  Then I can either
close the bug or start fixing it again.  Thanks!

> Best regards,
> Platon Pronko

-- 
Alan Mackenzie (Nuremberg, Germany).




This bug report was last modified 4 years and 106 days ago.

Previous Next


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