all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Platon Pronko <platon7pronko@gmail.com>
Cc: 45792@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	[thread overview]
Message-ID: <YBaZoZS1+1p3fYOG@ACM> (raw)
In-Reply-To: <a112790c-c929-0af5-c7a6-544ed5ff900a@gmail.com>

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).





  reply	other threads:[~2021-01-31 11:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-11 16:09 bug#45792: 28.0.50; regression in commit c7c154bb, minibuffer is not closed after opening a file Platon Pronko
2021-01-12  9:06 ` martin rudalics
2021-01-12 10:29   ` Platon Pronko
2021-01-12 19:00 ` Alan Mackenzie
2021-01-16 16:36 ` Alan Mackenzie
2021-01-17  7:50   ` Platon Pronko
2021-01-30 18:35     ` Alan Mackenzie
2021-01-31  8:54       ` Platon Pronko
2021-01-31 11:50         ` Alan Mackenzie [this message]
2021-01-31 12:11           ` Platon Pronko
2021-01-31 17:01             ` Alan Mackenzie
2021-01-31 19:37               ` Platon Pronko
2021-01-31 20:06                 ` Alan Mackenzie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YBaZoZS1+1p3fYOG@ACM \
    --to=acm@muc.de \
    --cc=45792@debbugs.gnu.org \
    --cc=platon7pronko@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.