From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs 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 Message-ID: References: <75aca8c3-6c8f-2a66-399e-7116d99c91d3@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25306"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 45792@debbugs.gnu.org To: Platon Pronko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 31 13:11:35 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l6BZm-0006Uu-Vr for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 31 Jan 2021 13:11:34 +0100 Original-Received: from localhost ([::1]:37676 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l6BZm-0001Su-1X for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 31 Jan 2021 07:11:34 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34422) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6BGs-0002al-Fk for bug-gnu-emacs@gnu.org; Sun, 31 Jan 2021 06:52:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44961) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l6BGs-0005ry-78 for bug-gnu-emacs@gnu.org; Sun, 31 Jan 2021 06:52:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l6BGs-0005DD-5O for bug-gnu-emacs@gnu.org; Sun, 31 Jan 2021 06:52:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 31 Jan 2021 11:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45792 X-GNU-PR-Package: emacs Original-Received: via spool by 45792-submit@debbugs.gnu.org id=B45792.161209387319980 (code B ref 45792); Sun, 31 Jan 2021 11:52:02 +0000 Original-Received: (at 45792) by debbugs.gnu.org; 31 Jan 2021 11:51:13 +0000 Original-Received: from localhost ([127.0.0.1]:56507 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6BG3-0005CA-N5 for submit@debbugs.gnu.org; Sun, 31 Jan 2021 06:51:13 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:20475 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1l6BFx-0005Ba-El for 45792@debbugs.gnu.org; Sun, 31 Jan 2021 06:51:09 -0500 Original-Received: (qmail 68557 invoked by uid 3782); 31 Jan 2021 11:50:57 -0000 Original-Received: from acm.muc.de (p2e5d5e05.dip0.t-ipconnect.de [46.93.94.5]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 31 Jan 2021 12:50:57 +0100 Original-Received: (qmail 11341 invoked by uid 1000); 31 Jan 2021 11:50:57 -0000 Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:199001 Archived-At: 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).