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: Tue, 12 Jan 2021 19:00:14 +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="17536"; 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 Tue Jan 12 20:06:22 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 1kzOzm-0004Sx-Fx for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Jan 2021 20:06:22 +0100 Original-Received: from localhost ([::1]:32864 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kzOzl-00053q-Hd for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Jan 2021 14:06:21 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33130) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzOud-0001Qz-SV for bug-gnu-emacs@gnu.org; Tue, 12 Jan 2021 14:01:06 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49829) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kzOub-0007LN-SH for bug-gnu-emacs@gnu.org; Tue, 12 Jan 2021 14:01:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kzOub-00044o-Oe for bug-gnu-emacs@gnu.org; Tue, 12 Jan 2021 14:01: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: Tue, 12 Jan 2021 19:01: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: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.161047803115629 (code B ref -1); Tue, 12 Jan 2021 19:01:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Jan 2021 19:00:31 +0000 Original-Received: from localhost ([127.0.0.1]:33142 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kzOu6-000440-DZ for submit@debbugs.gnu.org; Tue, 12 Jan 2021 14:00:30 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:46786) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kzOu3-00043s-E1 for submit@debbugs.gnu.org; Tue, 12 Jan 2021 14:00:29 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:32998) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzOu1-00017N-Rb for bug-gnu-emacs@gnu.org; Tue, 12 Jan 2021 14:00:26 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:38392 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.90_1) (envelope-from ) id 1kzOtx-00073I-SP for bug-gnu-emacs@gnu.org; Tue, 12 Jan 2021 14:00:25 -0500 Original-Received: (qmail 38290 invoked by uid 3782); 12 Jan 2021 19:00:15 -0000 Original-Received: from acm.muc.de (p4fe15df3.dip0.t-ipconnect.de [79.225.93.243]) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 12 Jan 2021 20:00:14 +0100 Original-Received: (qmail 11043 invoked by uid 1000); 12 Jan 2021 19:00:14 -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:197835 Archived-At: Hello, Platon. Thanks for such a high quality bug report, and thanks for investigating it as far as you have done. 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. It seems to be a redisplay problem. Emacs is doing everything to visit the new file _except_ the final redisplay action. Any keypress (or mouse action) triggers that missing redisplay. > I bisected the problem to commit c7c154bb, "Fix incompleteness in the > implementation of minibuffer-follows-selected-frame". OK. > Problem is somehow related to the fact that I use dvorak input method. I spent yesterday evening trying to narrow it down more. The define-global-minor-mode causes dvorak-minor-mode to get added to three hooks. Of these, either (most likely both of them, too) of change-major-mode-hook or after-change-major-mode-hook will cause the bug when dvorak-minor-mode is added to it. > The problem goes away if I comment out the section under "We've exited > the recursive edit without an error" in minibuf.c. I'm trying to work out, from my notes, exactly why I put that section of code in. I might well just take it out. But it would be good to understand the mechanism of the bug, first. > 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) As you've said yourself in another post, the testing for " *Minibuf-0*" doesn't seem to effect the bug. So, it would appear to be the adding of dvorak-minor-mode to these two hooks. (See above.) > 2. Start emacs with: ./src/emacs -Q --eval '(load-file "~/.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. As already said, the file probably is being opened, it just isn't getting displayed. I'll be carrying on looking at this. > 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 > Configured using: > 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib > --localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games > --with-sound=alsa --with-modules --without-gconf --without-gsettings > --with-x-toolkit=gtk3 --without-xaw3d' [ .... ] -- Alan Mackenzie (Nuremberg, Germany).