From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#62355: 30.0.50; C-g doesn't always quit minibuffer on first press Date: Fri, 24 Mar 2023 14:56:38 +0300 Message-ID: <835yaqe51l.fsf@gnu.org> References: <831qlh79at.fsf@gnu.org> <87zg83e032.fsf@melete.silentflame.com> <83sfdv44df.fsf@gnu.org> <83r0teekzm.fsf@gnu.org> <87edpe7eiw.fsf@to1.studio> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9933"; mail-complaints-to="usenet@ciao.gmane.io" Cc: joaotavora@gmail.com, 62355@debbugs.gnu.org, spwhitton@spwhitton.name To: Toon Claes Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 24 16:46:23 2023 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 1pfjcT-0001z0-PS for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 24 Mar 2023 16:46:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pfg5a-0000xr-2c; Fri, 24 Mar 2023 08:00:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pfg5Y-0000xA-Su for bug-gnu-emacs@gnu.org; Fri, 24 Mar 2023 08:00:08 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pfg5V-00087x-B6 for bug-gnu-emacs@gnu.org; Fri, 24 Mar 2023 08:00:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pfg5S-0007JC-4M for bug-gnu-emacs@gnu.org; Fri, 24 Mar 2023 08:00:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Mar 2023 12:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62355 X-GNU-PR-Package: emacs Original-Received: via spool by 62355-submit@debbugs.gnu.org id=B62355.167965914427986 (code B ref 62355); Fri, 24 Mar 2023 12:00:02 +0000 Original-Received: (at 62355) by debbugs.gnu.org; 24 Mar 2023 11:59:04 +0000 Original-Received: from localhost ([127.0.0.1]:39957 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pfg4V-0007HK-SZ for submit@debbugs.gnu.org; Fri, 24 Mar 2023 07:59:04 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pfg46-0007GJ-GG for 62355@debbugs.gnu.org; Fri, 24 Mar 2023 07:59:02 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pfg3t-0007yo-4k; Fri, 24 Mar 2023 07:58:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=opphOk/EZCTYpsr/QC6ndD6dkS3iTYVgRE8RgNbtK20=; b=IrQiZ7cjYVsw MZEZIQgEYXCzGIcVwD7rFLcmPPYUiWOIAXuaBVgWPJqANrroaU3x7uqjGKhSHjAYP+v0Cp4nT5rdq TABnFD8KcsDzSygpJisiWE1IJUAbdTsQhglBjqNX73RxgEeIzPDBJHZ8dR9ZYLPAtKXxVr5rmAB/2 ubD9Mv7XY23r9OGxpuCWLqMj8402LTLHQKhOPkCkNsDDbYlNmPhrI4JVoKewz1pFOFwqub5U6ZGtc 7qFBa41FRGwhVLpMJ9PqOxRqL5+CNkmuGbw0W+bFMNNoaGR3SwltEw6LUUVH87uxxcOe3CR4Bha+8 WiNZ23olAcZzj025r48DeA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pfg3i-0001ab-PM; Fri, 24 Mar 2023 07:58:22 -0400 In-Reply-To: <87edpe7eiw.fsf@to1.studio> (message from Toon Claes on Fri, 24 Mar 2023 08:56:39 +0100) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:258506 Archived-At: > From: Toon Claes > Cc: Sean Whitton , 62355@debbugs.gnu.org, > joaotavora@gmail.com > Date: Fri, 24 Mar 2023 08:56:39 +0100 > > When I type "emacs -Q" , press "M-x" the minibuffer opens, I do > nothing else, I just type "C-g" to abort. Then I see "Quit" (no > brackets) in the echo area and the cursor is sent back to the original > buffer. This works as intended IMHO. Yes. > Now, the issue I'm having, I can repeat pressing alternating "M-x" "C-g" > a few times, and at some point the minibuffer shows "[Quit]" (with > brackets) and the minibuffer remains active. From this point my Emacs is > "tainted" and *every* action in the minibuffer requires "C-g" twice to > exit. In my opinion this is not intended behavior. The "[Quit]" part, and the fact that you need to type C-g twice _is_ the intended behavior -- in the situation that I described earlier, i.e. if the minibuffer was activated by another command. What might not be intentional is how you get to that situation. Since you haven't shown any reproducible recipe to recreate that situation, I don't know what it is and how you get to it. Just typing random sequences of M-x and C-g doesn't recreate it here. > So some of my theories: > * Some internal state gets stuck. If you can give me some guidance on > where in the source code this behavior to display "[Quit]" comes from, > I'm happy to attach gdb to dig a bit deeper. The "[Quit]" behavior is correct, so looking for it will not help. You need to show the sequence of commands you type to get to this state, then we will be making some progress. > * It feels like it's timing related. It starts happening from a random > number of actions. Show what "C-h l" tells you about the sequence. Enlarge the size of the recent-keys array if you have to, to let it record more. > * I cannot reproduce in "emacs -Q -nw", I'm not sure what to conclude > from that. We will know when we understand why it does happen in GUI sessions. But in general, C-g in a -nw session generates SIGINT, and so is processed differently than C-g in a GUI session. > I know it's a weird issue, and I'm willing to help debug. I can make a > screen recording if you want to see it in action? There's no need for that, I believe you even without the screen recording. And I see this behavior myself from time to time (except that in my case it happens when it should and when I expect it to happen).