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#58808: map-y-or-n-p should use read-key, not read-event Date: Thu, 27 Oct 2022 08:58:53 +0300 Message-ID: <83fsf9n6xu.fsf@gnu.org> References: <26bfd854bff2e7ccb0de0f1acb20ce2ced6e006a@teknik.io> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38267"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58808@debbugs.gnu.org To: meedstrom@teknik.io, Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 27 08:03:17 2022 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 1onvz2-0009g8-KE for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 27 Oct 2022 08:03:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1onvw8-0008Vq-De; Thu, 27 Oct 2022 02:00:17 -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 1onvvv-0008Q4-ET for bug-gnu-emacs@gnu.org; Thu, 27 Oct 2022 02:00:04 -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 1onvvv-0005YS-25 for bug-gnu-emacs@gnu.org; Thu, 27 Oct 2022 02:00:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1onvvu-0005kY-Mh for bug-gnu-emacs@gnu.org; Thu, 27 Oct 2022 02: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: Thu, 27 Oct 2022 06:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58808 X-GNU-PR-Package: emacs Original-Received: via spool by 58808-submit@debbugs.gnu.org id=B58808.166685035022007 (code B ref 58808); Thu, 27 Oct 2022 06:00:02 +0000 Original-Received: (at 58808) by debbugs.gnu.org; 27 Oct 2022 05:59:10 +0000 Original-Received: from localhost ([127.0.0.1]:55950 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onvv4-0005it-1c for submit@debbugs.gnu.org; Thu, 27 Oct 2022 01:59:10 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:52894) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onvv1-0005ie-KA for 58808@debbugs.gnu.org; Thu, 27 Oct 2022 01:59:08 -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 1onvuw-0005Qd-7W; Thu, 27 Oct 2022 01:59:02 -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=UqXS087l1RGHof7Q2/Pc2BJqk6tjBTaMbheJQBRpynU=; b=bmboE2ZAwONx YNiZocw3B0GyKnN0NL1iuw18uhG5GcMH1u+Umhwpy/98SxwxttGXvS+MB6pKDtegsc205b0BXuzbQ e8sJGtMSmcWlkoscVFjktlFc1d/kvpcXWxUZmwphwWE9QDGnYOQRCiRmxN7gORRgzSohBuUT+JMEH 9o6QDvA+zyDMoI3CNjAVjaTyW0jBf34v18h6KFXS1LMtBHm1kLhXKhXIEgeK8XhN7gi1Q9x5bs1yX QHcUbSz1XfKHhn0o7bjkeUQJKgpKbE9e403qg/mHRjOF98ETC4ewBAuxbd08qS5lJRK0Yse/kUY9t 6w/KihM7wvcHhorstPX2xw==; 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 1onvuv-0001Ay-Ib; Thu, 27 Oct 2022 01:59:01 -0400 In-Reply-To: <26bfd854bff2e7ccb0de0f1acb20ce2ced6e006a@teknik.io> (bug-gnu-emacs@gnu.org) 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: , Original-Sender: "bug-gnu-emacs" Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:246271 Archived-At: > Date: Wed, 26 Oct 2022 23:59:46 +0000 > From: meedstrom--- via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > I found that map-y-or-n-p uses read-event, not read-key (still the case in master as of 2022-10-27). Will you > accept a patch if I try to rewrite it? > > Background: I like to translate to C-g, so I can hit the physical Esc key. It almost always works, > except in two cases; when Emacs freezes, and when something calls map-y-or-n-p, like the command M-x > save-some-buffers. > > An additional concern is that while map-y-or-n-p is doing its thing, even the triplet ESC ESC ESC does not > work! > > Steps to reproduce: > > 1. Start Emacs -Q > 2. Eval (define-key function-key-map (kbd "") (kbd "C-g")) > 3. Edit some new file > 4. Type C-x s to trigger save-some-buffers > 5. Attempt to cancel by hitting the Escape key Isn't there some translation map that could help you? Adding Stefan to CC, in case he has comments. (I'd assume that map-y-or-n-p would work like y-or-n-p, including support for y-or-n-p-use-read-key, but evidently it doesn't, which is surprising, I think.)