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: Sat, 16 Jan 2021 16:36:42 +0000 Message-ID: References: <75aca8c3-6c8f-2a66-399e-7116d99c91d3@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4093"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, 45792@debbugs.gnu.org To: Platon Pronko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 16 17:37:34 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 1l0oZx-0000vG-On for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 Jan 2021 17:37:33 +0100 Original-Received: from localhost ([::1]:39068 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0oZw-0002ed-Q8 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 Jan 2021 11:37:32 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58462) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0oZR-0002dH-U7 for bug-gnu-emacs@gnu.org; Sat, 16 Jan 2021 11:37:01 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60574) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0oZR-0003SB-Li for bug-gnu-emacs@gnu.org; Sat, 16 Jan 2021 11:37:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l0oZR-0007uO-JL for bug-gnu-emacs@gnu.org; Sat, 16 Jan 2021 11:37:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Jan 2021 16:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45792 X-GNU-PR-Package: emacs X-Debbugs-Original-Cc: acm@muc.de, bug-gnu-emacs@gnu.org, martin rudalics Original-Received: via spool by submit@debbugs.gnu.org id=B.161081501530388 (code B ref -1); Sat, 16 Jan 2021 16:37:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 Jan 2021 16:36:55 +0000 Original-Received: from localhost ([127.0.0.1]:43887 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0oZK-0007u4-Kd for submit@debbugs.gnu.org; Sat, 16 Jan 2021 11:36:54 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:32954) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0oZJ-0007tw-6P for submit@debbugs.gnu.org; Sat, 16 Jan 2021 11:36:53 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58412) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0oZI-0002V1-Um for bug-gnu-emacs@gnu.org; Sat, 16 Jan 2021 11:36:52 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:19057 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.90_1) (envelope-from ) id 1l0oZE-0003JT-0t for bug-gnu-emacs@gnu.org; Sat, 16 Jan 2021 11:36:52 -0500 Original-Received: (qmail 81701 invoked by uid 3782); 16 Jan 2021 16:36:43 -0000 Original-Received: from acm.muc.de (p2e5d58b4.dip0.t-ipconnect.de [46.93.88.180]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 16 Jan 2021 17:36:42 +0100 Original-Received: (qmail 21015 invoked by uid 1000); 16 Jan 2021 16:36:42 -0000 Content-Disposition: inline In-Reply-To: <75aca8c3-6c8f-2a66-399e-7116d99c91d3@gmail.com> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de Received-SPF: pass client-ip=193.149.48.1; envelope-from=acm@muc.de; helo=mail.muc.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:198023 Archived-At: Hello again, Platon. On Mon, Jan 11, 2021 at 19:09:53 +0300, Platon Pronko wrote: > When I open a file using C-x C-f, minibuffer does not close after I > finish typing the filename > - current window does not change at all, minibuffer stays open (as if > Emacs "froze"). > Pressing C-g or any other key unfreezes the window and file is > displayed. What is happening is that Emacs is getting caught on a (sit-for 1000000) in quail-minibuffer-message. The good news is that it will respond eventually. The bad news is that 11½ days is a rather sluggish response time. > I bisected the problem to commit c7c154bb, "Fix incompleteness in the > implementation of minibuffer-follows-selected-frame". This commit has triggered the problem, which was there all along. It is not the cause of it. > Problem is somehow related to the fact that I use dvorak input method. More precisely, any input method which uses quail-activate to start itself. For testing, I actually switched to "german-postfix" in your recipe, so as to be able actually to use Emacs after applying it. ;-) > The problem goes away if I comment out the section under "We've exited > the recursive edit without an error" in minibuf.c. That may be so, but it is the trigger for an existing problem rather than being the problem itself. > Steps to reproduce: > 1. init.el contents: > (define-minor-mode dvorak-minor-mode "Use english-dvorak input method." :lighter nil > (if > (not (string= " *Minibuf-0*" (buffer-name (current-buffer)))) > (if dvorak-minor-mode (activate-input-method "english-dvorak")))) > (define-global-minor-mode global-dvorak-mode dvorak-minor-mode dvorak-minor-mode) > (global-dvorak-mode t) > 2. Start emacs with: ./src/emacs -Q --eval '(load-file "~/.emacs.d/init.el")' Just as a matter of interest, you can write that more easily as ./src/emacs -Q -l ~/.emacs.d/init.el. > 3. Type C-x C-f, type in some text-file filename, press Return. > 4. Observe no file being opened and "[DV@]" in minibuffer. What happens is that read-minibuffer does its thing, then a C function read_minibuf_unwind calls minibuffer-inactive-mode since the minibuffer is no longer live. This mode change calls (run-mode-hooks 'minibuffer-inactive-mode-hook), which as a side effect runs the hook after-change-major-mode-hook, onto which define-global-mode has put global-dvorak-mode-enable-in-buffers. g-d-m-e-i-b calls dvorak-minor-mode (for the expired minibuffer) which calls activate-input-method, ....., then quail-minibuffer-message. This last function is the one with the million second timeout. Clearly, changing mode to minibuffer-inactive-mode shouldn't trigger the input method mechanisms. I'm not sure at the moment how to stop this happening, so I can't as yet close the bug. > In GNU Emacs 28.0.50 (build 15, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.17.4) > of 2021-01-11 built on the-big-maker > Repository revision: c7c154bb5756e0ae71d342c5d8aabf725877f186 > Repository branch: HEAD > Windowing system distributor 'The X.Org Foundation', version 11.0.12010000 > System Description: Arch Linux [ .... ] -- Alan Mackenzie (Nuremberg, Germany).