From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: meedstrom--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#58808: map-y-or-n-p should use read-key, not read-event Date: Wed, 26 Oct 2022 23:59:46 +0000 Message-ID: <26bfd854bff2e7ccb0de0f1acb20ce2ced6e006a@teknik.io> Reply-To: meedstrom@teknik.io Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="2903ec6f-c75b-4c64-a0c6-2c48673c9b2d-1" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30645"; mail-complaints-to="usenet@ciao.gmane.io" To: 58808@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 27 03:02:50 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 1onrII-0007mg-NG for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 27 Oct 2022 03:02:50 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1onrHn-0007Om-Vc; Wed, 26 Oct 2022 21:02:21 -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 1onrGa-0006iw-01 for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2022 21:01: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 1onrGZ-00039G-I5 for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2022 21:01:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1onrGY-00063H-8v for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2022 21:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: meedstrom@teknik.io Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Oct 2022 01:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 58808 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.166683241123175 (code B ref -1); Thu, 27 Oct 2022 01:01:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 27 Oct 2022 01:00:11 +0000 Original-Received: from localhost ([127.0.0.1]:55609 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onrFi-00061i-CG for submit@debbugs.gnu.org; Wed, 26 Oct 2022 21:00:10 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:49866) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onrFd-00060S-Hs for submit@debbugs.gnu.org; Wed, 26 Oct 2022 21:00:09 -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 1onrFd-0004aZ-3H for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2022 21:00:05 -0400 Original-Received: from mail.teknik.io ([5.79.72.163]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1onrFY-0002lM-PC for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2022 21:00:03 -0400 dkim-signature: v=1; a=rsa-sha256; d=teknik.io; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From:Subject:Date:Message-ID:To:MIME-Version:Content-Type; bh=29v5LyKE50Z0xgJfw7VapkwfKRveCzlK11PiQPy9vdg=; b=lfGG5p4RcGzZJFTucT//IW6WFlctxLv2L34XeC5MM8j9c1gIZ/Jsg+JT6y+eMG0TbeH+Y7rB7dzx9W636NcLgnv37e66bQOPUyWluQ0UQinkSlZsLMWkFyrYoNZBNVFmoVjUKz6DFpQqA1wIzDP7KYV7ugifJyjD420fHBshM2DceaKUrj4F8msMFAznbU7aIp++I3k/jRVnm8sdy/S5zg+7jocd29iG2fjfbwdQ4W8QIUQVh1WW/fxEF4 qnwIhYVkWZAx5imTVUeHjjyDi0oE0c9lYnVgNsxXSiOOkNM/NiOmTHO7cfjds/GHN99GkbamK8sqQHyEz7dIU+8pVckA== Original-Received: from mail.teknik.io (TEKNIK-SERVER [5.79.72.163]) by mail.teknik.io with ESMTPSA (version=TLSv1.2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128) ; Wed, 26 Oct 2022 16:59:46 -0700 Received-SPF: pass client-ip=5.79.72.163; envelope-from=meedstrom@teknik.io; helo=mail.teknik.io X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, 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: , 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:246265 Archived-At: --2903ec6f-c75b-4c64-a0c6-2c48673c9b2d-1 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable I found that map-y-or-n-p uses read-event, not read-key (still the case i= n master as of 2022-10-27).=C2=A0 Will you accept a patch if I try to rew= rite it? Background: I like to translate to C-g, so I can hit the physica= l Esc key.=C2=A0 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 -------- In GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, ca= iro version 1.17.6) of 2022-09-12 built on frederik Windowing system distributor 'The X.Org Foundation', version 11.0.1210100= 4 System Description: Arch Linux Configured using: 'configure --sysconfdir=3D/etc --prefix=3D/usr --libexecdir=3D/usr/lib --localstatedir=3D/var --with-cairo --with-harfbuzz --with-libsystemd --with-modules --with-x-toolkit=3Dgtk3 'CFLAGS=3D-march=3Dx86-64 -mtune=3Dgeneric -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE= =3D2 -Wformat -Werror=3Dformat-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=3D/build/emacs/src=3D/usr/src/debug -flto=3Dauto' 'LDFLAGS=3D-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,n= ow -flto=3Dauto'' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB Important settings: =C2=A0 value of $LANG: en_US.UTF-8 =C2=A0 locale-coding-system: utf-8-unix Major mode: Fundamental Minor modes in effect: =C2=A0 tooltip-mode: t =C2=A0 global-eldoc-mode: t =C2=A0 show-paren-mode: t =C2=A0 electric-indent-mode: t =C2=A0 mouse-wheel-mode: t =C2=A0 tool-bar-mode: t =C2=A0 menu-bar-mode: t =C2=A0 file-name-shadow-mode: t =C2=A0 global-font-lock-mode: t =C2=A0 font-lock-mode: t =C2=A0 blink-cursor-mode: t =C2=A0 auto-composition-mode: t =C2=A0 auto-encryption-mode: t =C2=A0 auto-compression-mode: t =C2=A0 line-number-mode: t =C2=A0 indent-tabs-mode: t =C2=A0 transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map text-property-search seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date subr-x cl-loaddefs cl-lib iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 51060 7072) (symbols 48 6633 1) (strings 32 18318 1832) (string-bytes 1 604358) (vectors 16 13634) (vector-slots 8 183648 9467) (floats 8 22 46) (intervals 56 242 0) (buffers 992 12)) --2903ec6f-c75b-4c64-a0c6-2c48673c9b2d-1 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
I found that map-y-or-n-p us= es read-event, not read-key (still the case in master as of 2022-10-27).= =C2=A0 Will you accept a patch if I try to rewrite it?

Background: I like to translate <escape> to C-g, so I can hi= t the physical Esc key.=C2=A0 It almost always works, except in two cases= ; when Emacs freezes, and when something calls map-y-or-n-p, like the com= mand M-x save-some-buffers.

An additional concer= n 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 "<escape>") (kbd "C-g"))
3. Edit so= me new file
4. Type C-x s to trigger save-some-buffers
<= /div>
5. Attempt to cancel by hitting the Escape key

--------

In GNU Emacs 28.2 (build 1, x8= 6_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.17.6)
= of 2022-09-12 built on frederik
Windowing system distributor '= The X.Org Foundation', version 11.0.12101004
System Description= : Arch Linux

Configured using:
'confi= gure --sysconfdir=3D/etc --prefix=3D/usr --libexecdir=3D/usr/lib
--localstatedir=3D/var --with-cairo --with-harfbuzz --with-libsystemd<= /div>
--with-modules --with-x-toolkit=3Dgtk3 'CFLAGS=3D-march=3Dx86-= 64
-mtune=3Dgeneric -O2 -pipe -fno-plt -fexceptions -Wp,-D_FOR= TIFY_SOURCE=3D2
-Wformat -Werror=3Dformat-security -fstack-cla= sh-protection
-fcf-protection -g -ffile-prefix-map=3D/build/em= acs/src=3D/usr/src/debug
-flto=3Dauto' 'LDFLAGS=3D-Wl,-O1,--so= rt-common,--as-needed,-z,relro,-z,now
-flto=3Dauto''

Configured features:
ACL CAIRO DBUS FREETYPE GI= F GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF= LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY
PDUMPER PNG= RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE
X= IM XPM GTK3 ZLIB

Important settings:
= =C2=A0 value of $LANG: en_US.UTF-8
=C2=A0 locale-coding-system:= utf-8-unix

Major mode: Fundamental
Minor modes in effect:
=C2=A0 tooltip-mode: t
=C2=A0 global-eldoc-mode: t
=C2=A0 show-paren-mode: t
=C2=A0 electric-indent-mode: t
=C2=A0 mouse-wheel-mode: = t
=C2=A0 tool-bar-mode: t
=C2=A0 menu-bar-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 global-font-lock-= mode: t
=C2=A0 font-lock-mode: t
=C2=A0 blink-cursor-= mode: t
=C2=A0 auto-composition-mode: t
=C2=A0 auto-e= ncryption-mode: t
=C2=A0 auto-compression-mode: t
=C2= =A0 line-number-mode: t
=C2=A0 indent-tabs-mode: t
= =C2=A0 transient-mark-mode: t

Load-path shadows:=
None found.

Features:
(shad= ow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail
rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs
=
eieio-loaddefs password-cache json map text-property-search seq byte= -opt
gv bytecomp byte-compile cconv mm-decode mm-bodies mm-enco= de mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail = rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils time-d= ate subr-x cl-loaddefs
cl-lib iso-transl tooltip eldoc paren el= ectric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode = mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd font= set image regexp-opt fringe
tabulated-list replace newcomment t= ext-mode lisp-mode prog-mode register
page tab-bar menu-bar rfn= -eshadow isearch easymenu timer select
scroll-bar mouse jit-loc= k font-lock syntax font-core term/tty-colors
frame minibuffer c= l-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan= thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew gree= k romanian slovak czech european ethiopic indian cyrillic
chine= se composite emoji-zwj charscript charprop case-table epa-hook
= jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button
loaddefs faces cus-face macroexp files window text-properties overl= ay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads dbusbind inotify lcms2<= /div>
dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit x multi-tty make-network-process emac= s)

Memory information:
((conses 16 510= 60 7072)
(symbols 48 6633 1)
(strings 32 18318 1832= )
(string-bytes 1 604358)
(vectors 16 13634)
<= div> (vector-slots 8 183648 9467)
(floats 8 22 46)
= (intervals 56 242 0)
(buffers 992 12))

--2903ec6f-c75b-4c64-a0c6-2c48673c9b2d-1--