From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 01 14:21:52 2024 Received: (at submit) by debbugs.gnu.org; 1 Oct 2024 18:21:52 +0000 Received: from localhost ([127.0.0.1]:52877 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svhVP-0003rh-R1 for submit@debbugs.gnu.org; Tue, 01 Oct 2024 14:21:52 -0400 Received: from lists.gnu.org ([209.51.188.17]:41430) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svhVN-0003ra-8V for submit@debbugs.gnu.org; Tue, 01 Oct 2024 14:21:50 -0400 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 1svhVN-0001wJ-IJ for bug-gnu-emacs@gnu.org; Tue, 01 Oct 2024 14:21:49 -0400 Received: from omta037.useast.a.cloudfilter.net ([44.202.169.36]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svhV5-0000V5-NE for bug-gnu-emacs@gnu.org; Tue, 01 Oct 2024 14:21:48 -0400 Received: from eig-obgw-6010a.ext.cloudfilter.net ([10.0.30.248]) by cmsmtp with ESMTPS id vXZEscmGDg2lzvhUns2Oxw; Tue, 01 Oct 2024 18:21:13 +0000 Received: from leaf.websitewelcome.com ([192.185.82.99]) by cmsmtp with ESMTPS id vhUms0remYvcPvhUmst1Qq; Tue, 01 Oct 2024 18:21:12 +0000 X-Authority-Analysis: v=2.4 cv=TceQtwQh c=1 sm=1 tr=0 ts=66fc3d98 a=mow2sqwWDa2c9/UKe2ehnA==:117 a=gd9eRJB+wxC94GecblwomQ==:17 a=kj9zAlcOel0A:10 a=DAUX931o1VcA:10 a=iy7jycZUomiq1EpIt9wA:9 a=CjuIK1q_8ugA:10 a=TgNxcI6wXp3fdKIHFX1K:22 Received: from leaf.websitewelcome.com ([192.185.82.99]:28506) by leaf.websitewelcome.com with esmtpa (Exim 4.96.2) (envelope-from ) id 1svhUl-002SqC-2U for bug-gnu-emacs@gnu.org; Tue, 01 Oct 2024 13:21:11 -0500 Received: from pool-108-18-123-52.washdc.fios.verizon.net ([108.18.123.52]) by leaf.websitewelcome.com with HTTP (HTTP/1.1 POST); Tue, 01 Oct 2024 13:21:11 -0500 MIME-Version: 1.0 Date: Tue, 01 Oct 2024 13:21:11 -0500 From: Devon Sean McCullough To: bug-gnu-emacs@gnu.org Subject: 29.3; read-key User-Agent: Roundcube Webmail/1.6.8 Message-ID: <56f7ea1fff72be793a8026baf34e1548@jovi.net> X-Sender: Emacs-hacker2023@jovi.net Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - leaf.websitewelcome.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jovi.net X-BWhitelist: no X-Source-IP: 192.185.82.99 X-Source-L: No X-Exim-ID: 1svhUl-002SqC-2U X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: leaf.websitewelcome.com [192.185.82.99]:28506 X-Source-Auth: devon2011@jovi.net X-Email-Count: 1 X-Org: HG=hgreseller;ORG=hostgator; X-Source-Cap: am92aW5ldDtkZXZvbjtsZWFmLndlYnNpdGV3ZWxjb21lLmNvbQ== X-Local-Domain: yes X-CMAE-Envelope: MS4xfF0Mn55OAlOH2a47epcCLQdbyTArulfW683Bfe0CllkpxdNzcWNYd6r0HwHwW/yqK3SN62eDHxR4KPnLcfgQCBCQVsR6pMX8QFveyRIUfF3NMmzkKddM IFfZN20+brImP02Woz4IoznqFJoPsLTrXJAnhG0/1Ek4ULoYpsaRrCs737zjloXluvmsytLSAZgFo27rd7B3Cz8r0vz1dBlqtQ8= Received-SPF: pass client-ip=44.202.169.36; envelope-from=emacs-hacker2023@jovi.net; helo=omta037.useast.a.cloudfilter.net 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_PASS=-0.001, T_SPF_HELO_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) (read-key 0) jails Emacs in a null keymap. To escape: Menu Bar > Help > Emacs Psychotherapist Peace --Devon P.S. In a tty Emacs you're out of luck unless you're running the emacs server. In GNU Emacs 29.3 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 Version 10.14.6 (Build 18G9323)) of 2024-03-24 built on builder10-14.lan Windowing system distributor 'Apple', version 10.3.1671 System Description: Mac OS X 10.14.6 Configured using: 'configure --with-ns '--enable-locallisppath=/Library/Application Support/Emacs/${version}/site-lisp:/Library/Application Support/Emacs/site-lisp' --with-modules 'CFLAGS=-DFD_SETSIZE=10000 -DDARWIN_UNLIMITED_SELECT' --with-x-toolkit=no' Configured features: ACL GLIB GMP GNUTLS JPEG JSON LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER PNG RSVG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER ZLIB Important settings: value of $LC_CTYPE: UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util text-property-search time-date subr-x mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win 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 nadvice seq simple cl-generic indonesian philippine 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 abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads kqueue cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 37423 7895) (symbols 48 5048 0) (strings 32 12600 1784) (string-bytes 1 359254) (vectors 16 10402) (vector-slots 8 156348 13684) (floats 8 37 17) (intervals 56 218 0) (buffers 984 10)) From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 02 02:01:24 2024 Received: (at 73584) by debbugs.gnu.org; 2 Oct 2024 06:01:24 +0000 Received: from localhost ([127.0.0.1]:56309 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svsQN-0001R8-Uw for submit@debbugs.gnu.org; Wed, 02 Oct 2024 02:01:24 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44706) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svsQL-0001Qq-Dn for 73584@debbugs.gnu.org; Wed, 02 Oct 2024 02:01:22 -0400 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 1svsO9-0005NI-6b; Wed, 02 Oct 2024 01:59:05 -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=QRaWBa0QxiAaQUNrprg3syrw11qbpy6YScPKuMTSloI=; b=oHNTLt0mGvop bOXgn1+Jx2qabBuk5MujWb7eWUP5rPWwRK6O+gDUMUmAROJhOE1/TmBNFx17jptLA9+GYy1Gtx0Lg 9eoVZprBMxzcu8du4gkd/RdNIpJEzyOkxbKMFp4NpPyYGAs8O14YMbRhi+k2MvY9C1WUvsQCObJFu kk2xhWtD3nkkzuYe3C5Kzb9Xf1Nhz++KbQuGDr62qxpCgtUKtphJnOt289YsqUpRtB5DH87Who5jZ QOu3GIMD+VA1U5yqm73zdL5p6FFdyCpsb9E1azqM9VASZgW1MfeQyNTHgK3+g6VVHj4IOUkY0tcVX ++fIhiajncg3XS4OeXOw8A==; Date: Wed, 02 Oct 2024 08:58:59 +0300 Message-Id: <86v7yb11wc.fsf@gnu.org> From: Eli Zaretskii To: Devon Sean McCullough In-Reply-To: <56f7ea1fff72be793a8026baf34e1548@jovi.net> (message from Devon Sean McCullough on Tue, 01 Oct 2024 13:21:11 -0500) Subject: Re: bug#73584: 29.3; read-key References: <56f7ea1fff72be793a8026baf34e1548@jovi.net> X-Spam-Score: -0.3 (/) X-Debbugs-Envelope-To: 73584 Cc: 73584@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) > Date: Tue, 01 Oct 2024 13:21:11 -0500 > From: Devon Sean McCullough > > (read-key 0) jails Emacs in a null keymap. You should be able to escape the jail with ESC or C-[. I don't see a bug here. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 02 06:03:55 2024 Received: (at 73584) by debbugs.gnu.org; 2 Oct 2024 10:03:55 +0000 Received: from localhost ([127.0.0.1]:56655 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svwD4-0005fQ-LZ for submit@debbugs.gnu.org; Wed, 02 Oct 2024 06:03:54 -0400 Received: from mail-lj1-f170.google.com ([209.85.208.170]:50340) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svwD2-0005f6-HI for 73584@debbugs.gnu.org; Wed, 02 Oct 2024 06:03:53 -0400 Received: by mail-lj1-f170.google.com with SMTP id 38308e7fff4ca-2facf48166bso33611141fa.0 for <73584@debbugs.gnu.org>; Wed, 02 Oct 2024 03:03:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727863366; x=1728468166; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=OM1FB5SHUGbSSHiHrq04auzQFUq6Eb/j4zZ3Ll3MXPM=; b=h19d5s3d6ox5i9NeidedUruVlGFnE3Jtg2+XCcd0gOz35SFiBk4ruaK/+/qPZke0F/ k5J07FPSHAbUZ5EQGR4ytqZP0hKC7u6lyTcInv2s58qfePI9W3jxrcLt7fgO+nOw2Ob/ 1zeiqpTTeIcVBbC9xb05xdKqyqvBRndpalLEe9WB/KJRFQLDxUQnWAnOoqmrQTMezF87 G9x1aH9OK1T+K4u0NALxVuJWOhLkBe6o2aEcN/8hBpvKHZDl6VrpqRUqawO6EsmilEOX 1RR8rRw95BsUg7HEH/eXfH4ix/8PUt4sxNhEBQK1TmrZi6dqc4OOeuOkUZUZviVcuCgy RJ8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727863366; x=1728468166; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=OM1FB5SHUGbSSHiHrq04auzQFUq6Eb/j4zZ3Ll3MXPM=; b=FcEvpM3bNtVSR+Mb2DWnPNBsF3Zi9F1jWyH0iPrRX5YF0nLW+/OZWdDXt33ACkXrOb 5bsq1i5k+BeBIUPTrfF/D71MmvZRlQ996SNEazbl/RAkB19lgi9bGP0HRwF9WAcL3pN7 FZSP97EASFBRf2+30laqHc/inOwyFv7HQ/hoGIMkvN7uPLk56kWY/6J+zRrnBzo+v/xG feUvA7S3VlqjqTWvjHK0MYNH95/blH9IL7PvAZ8iZpVL2IsSVSY/vLqhke7AGmIcQyxn Vi3UTyh1Cu4+8Vgs0+Zc+UTdaTcmh2j6pdoRUYkNOgi42ZubXhqCYGeHi4v8ZTzg9dUq yz1Q== X-Gm-Message-State: AOJu0YyUv8Cby4zas5KuFmctuN/zA7CTttflzGGkZEusL4U2A+fisYNZ WRoj+wRKn1XnGDLtsugrZA5J04UuitIytYeBN6g6lyEIMCozChOV6HQRC17dEvoIn3RKYqEhXPC jcRHnxQ0dkoBGr6absnDUsTp0y8w= X-Google-Smtp-Source: AGHT+IFBPuq9xfLNBzgYRQiVI05Qy7tRetV5hrFVmS1Rt0p5c7jpWw6C/gNDce5b996ASd9pA7VCQwFfXGJn5TB1qr4= X-Received: by 2002:a2e:b889:0:b0:2fa:d239:18af with SMTP id 38308e7fff4ca-2fae1015fc3mr15733131fa.13.1727863365598; Wed, 02 Oct 2024 03:02:45 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 2 Oct 2024 10:02:44 +0000 From: Stefan Kangas In-Reply-To: <86v7yb11wc.fsf@gnu.org> References: <56f7ea1fff72be793a8026baf34e1548@jovi.net> <86v7yb11wc.fsf@gnu.org> MIME-Version: 1.0 Date: Wed, 2 Oct 2024 10:02:44 +0000 Message-ID: Subject: Re: bug#73584: 29.3; read-key To: Eli Zaretskii , Devon Sean McCullough Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eli Zaretskii writes: >> Date: Tue, 01 Oct 2024 13:21:11 -0500 >> From: Devon Sean McCullough >> >> (read-key 0) jails Emacs in a null keymap. > > You should be able to escape the jail with ESC or C-[. > > I don't see a [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [209.85.208.170 listed in sa-accredit.habeas.com] 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [209.85.208.170 listed in bl.score.senderscore.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stefankangas[at]gmail.com) -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.170 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.170 listed in list.dnswl.org] 2.0 SUBJ_LACKS_WORDS Subject is not short yet lacks words 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines X-Debbugs-Envelope-To: 73584 Cc: 73584@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) Eli Zaretskii writes: >> Date: Tue, 01 Oct 2024 13:21:11 -0500 >> From: Devon Sean McCullough >> >> (read-key 0) jails Emacs in a null keymap. > > You should be able to escape the jail with ESC or C-[. > > I don't see a bug here. It would arguably be a bit nicer to signal the error early to avoid having to mash C-[: diff --git a/lisp/subr.el b/lisp/subr.el index 2eaed682406..b3872513005 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -3307,6 +3307,8 @@ read-key what you want as `read-key' temporarily removes all bindings while calling `read-key-sequence'. If nil or unspecified, the only unbound fallback disabled is downcasing of the last event." + (or (stringp prompt) + (signal 'wrong-type-argument (list 'stringp prompt))) ;; This overriding-terminal-local-map binding also happens to ;; disable quail's input methods, so although read-key-sequence ;; always inherits the input method, in practice read-key does not BTW, do we have something like `cl-check-type' outside of cl-lib? From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 02 06:51:20 2024 Received: (at 73584) by debbugs.gnu.org; 2 Oct 2024 10:51:20 +0000 Received: from localhost ([127.0.0.1]:56735 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svwwy-0008TE-2v for submit@debbugs.gnu.org; Wed, 02 Oct 2024 06:51:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35310) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svwww-0008Sz-9I for 73584@debbugs.gnu.org; Wed, 02 Oct 2024 06:51:19 -0400 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 1svwwl-0003Xu-0T; Wed, 02 Oct 2024 06:51:10 -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=6P08YuHmdxHVAkRM0LIiAZs/qL6Dd2R8RIimoU15NWc=; b=opGFWoTTuHqm r/FVfxzsItEJuTBBh/S6LiS+ZD+1Tugs1XT/Jgb+WEboJ1oPm/C0BL6t5TS/z0Ackfa65Z9WsYnB2 AIklGXNgN+fZfaow93b3PIjQ5I+g+H52ZUQT53VAgohkre7Y2rsW7EThD1PCY3jwjJcdj772g7ScU d/cBT8tcEt/FkReuo5bPJBSNLONG5QVBDMMESE0NqCn/CDibSampbc4QmLBikdemMtkzbMIBl0Wdd qFNAKb7g276ynYsHy6Y/xRMYL99qXO6kutMAHj1wlqwENwhHkZBok0xR8vSfGUSxyAQVipn1RM/j4 huddXuQVj920oBNL5bHm4A==; Date: Wed, 02 Oct 2024 13:50:55 +0300 Message-Id: <86h69u22y8.fsf@gnu.org> From: Eli Zaretskii To: Stefan Kangas In-Reply-To: (message from Stefan Kangas on Wed, 2 Oct 2024 10:02:44 +0000) Subject: Re: bug#73584: 29.3; read-key References: <56f7ea1fff72be793a8026baf34e1548@jovi.net> <86v7yb11wc.fsf@gnu.org> X-Spam-Score: -0.3 (/) X-Debbugs-Envelope-To: 73584 Cc: 73584@debbugs.gnu.org, Emacs-hacker2023@jovi.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) > From: Stefan Kangas > Date: Wed, 2 Oct 2024 10:02:44 +0000 > Cc: 73584@debbugs.gnu.org > > Eli Zaretskii writes: > > >> Date: Tue, 01 Oct 2024 13:21:11 -0500 > >> From: Devon Sean McCullough > >> > >> (read-key 0) jails Emacs in a null keymap. > > > > You should be able to escape the jail with ESC or C-[. > > > > I don't see a bug here. > > It would arguably be a bit nicer to signal the error early to avoid > having to mash C-[: Maybe. But what exactly is wrong with signaling the error from read-key-sequence-vector, which read-key calls? > --- a/lisp/subr.el > +++ b/lisp/subr.el > @@ -3307,6 +3307,8 @@ read-key > what you want as `read-key' temporarily removes all bindings > while calling `read-key-sequence'. If nil or unspecified, the > only unbound fallback disabled is downcasing of the last event." > + (or (stringp prompt) > + (signal 'wrong-type-argument (list 'stringp prompt))) This will signal an error if PROMPT is nil or omitted, which we definitely must support. > ;; This overriding-terminal-local-map binding also happens to > ;; disable quail's input methods, so although read-key-sequence > ;; always inherits the input method, in practice read-key does not > > BTW, do we have something like `cl-check-type' outside of cl-lib? We shouldn't use any cl stuff in subr.el, surely? From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 02 17:48:29 2024 Received: (at 73584) by debbugs.gnu.org; 2 Oct 2024 21:48:29 +0000 Received: from localhost ([127.0.0.1]:59418 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sw7Cv-0003RN-Fi for submit@debbugs.gnu.org; Wed, 02 Oct 2024 17:48:29 -0400 Received: from mail-ed1-f42.google.com ([209.85.208.42]:44395) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sw7Ct-0003R5-2C for 73584@debbugs.gnu.org; Wed, 02 Oct 2024 17:48:27 -0400 Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-5c8784e3bc8so226152a12.1 for <73584@debbugs.gnu.org>; Wed, 02 Oct 2024 14:48:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727905640; x=1728510440; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=IyvaabRCidKmMnhyeQfAfP8sLxy4cDChtlyxRSiYiSs=; b=HqXjKiPswPePBJSr/6TlgGGc3CLABVSoW3Mg4G1Y9KYUzsHLFDesUlZOBvPsiZhC1P qYTD/7MYjlHTXu1TjgIafpPpjlxcCgEGFVgkNM62B7RLtjYabE0IvHKVEDJVQc6Jw7PL /Hnmu3ryxtd6YaloSOQIOmcUoH4Pj6J0h4lHf/zzIfSPqzEFqJR1V8adNY3Joh/Y4KJo BRExYWhpLuZwWAk19F8ghfZuO+Mobs+DYVrw+gulCnlu9oF0gDR5IfnKbSTC6yv3r7Ws gbuwcE7Xvz7ctzby+EzYHnXNHO9188bi7k/DDtwix+Rn/zUIO0NjIStkhCYgcYNESXS5 fJuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727905640; x=1728510440; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=IyvaabRCidKmMnhyeQfAfP8sLxy4cDChtlyxRSiYiSs=; b=YNqZIZcEDjqD3+u/DEqLgDq4rqiHUfM4mpLZRclgXcpE57x2rAE76thfpsUqEG50va tBxlagxEBuwjZqvOrK0ug3mmENNJCBQCaHZsdoYugS6Efvh1GsqSdACSg6S2v8ikQQSq DaoIEexlyhAdABRgJ7wqRBlYkoCAinHL+EpJcNFJ472LUWGX4mKynokzDplAky8NxS7w VGsIePSERBzNvDeGH6bXS/UY9Vxwq07+BlSrZRGnqXJ2RC4fKuKl9q0cbdJsuSi0sC7V tlYWKBGdA1Fby1Zke8e8n/ZHPt80hbK+27HnPgnDpBydjqn6pHTONdKgeKK00zPoSQ0M ot4Q== X-Forwarded-Encrypted: i=1; AJvYcCXhBc+Do+w/CITj8T4JGO0HYi3pTbjLNmDS38rWYs/O/GgK8TF62tEakz9skzlUQEwlL7Fw1A==@debbugs.gnu.org X-Gm-Message-State: AOJu0YyFtnmo0agot5Fx++faT3xwVetdmwJ0UlDkbeL/AvgKwYbhNMk3 iaWEwMWBo/5Zdymod6VjruYSnBt5kX2y54a8vPGAahpPBvEYcbMJwN58P+vFYEMdmEI7oOnblTL r+Pa6dLIGQZyIs6Y8qCVykHyp7j4L+A== X-Google-Smtp-Source: AGHT+IHeTjpZHfYoBbdwKs44Ck0S0hsK0ljFxCHZJCl5+sr/KeLPoGJU/M6lLBg2XVesvhibtUYYMRJDtE5uRedtt7s= X-Received: by 2002:a05:6402:2709:b0:5c5:c447:e4c0 with SMTP id 4fb4d7f45d1cf-5c8b18e0e19mr2554438a12.4.1727905640004; Wed, 02 Oct 2024 14:47:20 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 2 Oct 2024 21:47:19 +0000 From: Stefan Kangas In-Reply-To: <86h69u22y8.fsf@gnu.org> References: <56f7ea1fff72be793a8026baf34e1548@jovi.net> <86v7yb11wc.fsf@gnu.org> <86h69u22y8.fsf@gnu.org> MIME-Version: 1.0 Date: Wed, 2 Oct 2024 21:47:19 +0000 Message-ID: Subject: Re: bug#73584: 29.3; read-key To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eli Zaretskii writes: >> From: Stefan Kangas >> Date: Wed, 2 Oct 2024 10:02:44 +0000 >> Cc: 73584@debbugs.gnu.org >> >> It would arguably be a bit nicer to signal the error early to avoid >> having to mash C-[: > > Maybe [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [209.85.208.42 listed in sa-accredit.habeas.com] 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [209.85.208.42 listed in bl.score.senderscore.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stefankangas[at]gmail.com) -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.42 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.42 listed in list.dnswl.org] 2.0 SUBJ_LACKS_WORDS Subject is not short yet lacks words 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines X-Debbugs-Envelope-To: 73584 Cc: 73584@debbugs.gnu.org, Emacs-hacker2023@jovi.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) Eli Zaretskii writes: >> From: Stefan Kangas >> Date: Wed, 2 Oct 2024 10:02:44 +0000 >> Cc: 73584@debbugs.gnu.org >> >> It would arguably be a bit nicer to signal the error early to avoid >> having to mash C-[: > > Maybe. But what exactly is wrong with signaling the error from > read-key-sequence-vector, which read-key calls? I just observe that I have to mash C-[ to get back control of Emacs, and that it would probably have been better if I didn't have to. I imagine situations when this happens because of a bug in some library, and users won't know what to do in that situation. It clearly confused OP. >> --- a/lisp/subr.el >> +++ b/lisp/subr.el >> @@ -3307,6 +3307,8 @@ read-key >> what you want as `read-key' temporarily removes all bindings >> while calling `read-key-sequence'. If nil or unspecified, the >> only unbound fallback disabled is downcasing of the last event." >> + (or (stringp prompt) >> + (signal 'wrong-type-argument (list 'stringp prompt))) > > This will signal an error if PROMPT is nil or omitted, which we > definitely must support. Thanks, yes. That would have to be amended. >> ;; This overriding-terminal-local-map binding also happens to >> ;; disable quail's input methods, so although read-key-sequence >> ;; always inherits the input method, in practice read-key does not >> >> BTW, do we have something like `cl-check-type' outside of cl-lib? > > We shouldn't use any cl stuff in subr.el, surely? I meant to ask if we have something similar to `cl-check-type' that does not come from cl-lib.el. I'm asking that precisely because we can't use cl-lib in subr.el. It would have been convenient if we had something like: (defmacro check-type (form predicate) `(unless (,predicate form) (signal 'wrong-type-argument (list ,predicate form)))) We have this pattern in quite a few places in our code, so maybe we should consider adding it if we don't have it already. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 03 02:04:41 2024 Received: (at 73584) by debbugs.gnu.org; 3 Oct 2024 06:04:41 +0000 Received: from localhost ([127.0.0.1]:59741 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swEx7-0005UO-BP for submit@debbugs.gnu.org; Thu, 03 Oct 2024 02:04:41 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42244) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swEx4-0005U6-HA for 73584@debbugs.gnu.org; Thu, 03 Oct 2024 02:04:39 -0400 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 1swEww-00042c-QK; Thu, 03 Oct 2024 02:04:30 -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=R/BzkwUIeK9L8KTiSHeKQR8XqxZIUUYcXnTVfzhViNk=; b=qC2cFwyfEneI AZyDX7tZ1ocmNKXCF+ZBM2mo+hkrn5XT/5nXCL0w+Ds0IwcTjCqVjmkVI4i94pPGvqwUI+ivPgFXd 2BUVVLVSrSQJdX7dH/gQNenWldH9I3id9SS+L/4nQZe3mmWG/m7dA4A9TWNscO6dLJeWig5Rjrkn4 mr14tZsQPjZSHlcPqB1VbdGOKzDozkhrxJfYXOzY0GktE3Rz/bCirOxpWAk/1h92LP914lj/zDJcf DX1U11udFt9MUlRgr5K1PCMjUcPvQsU37pSgDCBKCQoHG0yG9vJpcb7ZWjgRvTzxC5yRkhIoXeBuQ tnv24U33eCuhjk7l6jLh5Q==; Date: Thu, 03 Oct 2024 09:04:27 +0300 Message-Id: <86v7y9zpqs.fsf@gnu.org> From: Eli Zaretskii To: Stefan Kangas , Stefan Monnier In-Reply-To: (message from Stefan Kangas on Wed, 2 Oct 2024 21:47:19 +0000) Subject: Re: bug#73584: 29.3; read-key References: <56f7ea1fff72be793a8026baf34e1548@jovi.net> <86v7yb11wc.fsf@gnu.org> <86h69u22y8.fsf@gnu.org> X-Spam-Score: -0.3 (/) X-Debbugs-Envelope-To: 73584 Cc: 73584@debbugs.gnu.org, Emacs-hacker2023@jovi.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) > From: Stefan Kangas > Date: Wed, 2 Oct 2024 21:47:19 +0000 > Cc: Emacs-hacker2023@jovi.net, 73584@debbugs.gnu.org > > Eli Zaretskii writes: > > >> From: Stefan Kangas > >> Date: Wed, 2 Oct 2024 10:02:44 +0000 > >> Cc: 73584@debbugs.gnu.org > >> > >> It would arguably be a bit nicer to signal the error early to avoid > >> having to mash C-[: > > > > Maybe. But what exactly is wrong with signaling the error from > > read-key-sequence-vector, which read-key calls? > > I just observe that I have to mash C-[ to get back control of Emacs, and > that it would probably have been better if I didn't have to. I imagine > situations when this happens because of a bug in some library, and users > won't know what to do in that situation. It clearly confused OP. The OP shot himself in the foot by invoking by hand a low-level function with a wrong argument. Interactive functions and high-level APIs must check their arguments right away, but low-level functions like this one do not. What I could understand is if we'd arranged for the temporary keymap to stop being in effect even inside the debugger. Because the scenario of this bug reveals some more general issue: when we signal an error from a function that sets up some limited keymap, the debugger is invoked with that keymap still in effect, or so it seems. Stefan Monnier, do we have a good way of doing that in cases like this? Perhaps the debugger should define some minimal key bindings when it starts or something? > I meant to ask if we have something similar to `cl-check-type' that does > not come from cl-lib.el. I'm asking that precisely because we can't use > cl-lib in subr.el. Sorry, my misunderstanding. > It would have been convenient if we had something like: > > (defmacro check-type (form predicate) > `(unless (,predicate form) > (signal 'wrong-type-argument (list ,predicate form)))) > > We have this pattern in quite a few places in our code, so maybe we > should consider adding it if we don't have it already. If we want something like this, I think we should support a list of allowed types, not just one type. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 03 11:43:45 2024 Received: (at 73584) by debbugs.gnu.org; 3 Oct 2024 15:43:45 +0000 Received: from localhost ([127.0.0.1]:33760 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swNzR-00033i-MG for submit@debbugs.gnu.org; Thu, 03 Oct 2024 11:43:45 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:47020) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swNzK-00033Q-Le for 73584@debbugs.gnu.org; Thu, 03 Oct 2024 11:43:40 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id AD94C100043; Thu, 3 Oct 2024 11:43:26 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1727970206; bh=7Kq8puGcCKbasgsThn0yY0C5Jdkl4kNoSLe67uGVqO0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=o2U9jyK5o2XTmJeNwm4tGuVgYVIYlN2CqRsHNdxRjIANHJmfX2maGg4NSaM+B81Kn 9Ha/JMna39KLyyVIQJN1TjW35QRUMX67cySY2Vxe+CnbrgQOd+C2anHvvNIb/MOaCv 1r+MvPQ5cHla3xifk5kBbfBpPwzQESw6vS1QXSpxfywX4y4ctljHXK6Jj90ByJVVJE 9VjubMaU592FDlPfo3KAEL9qgtAFQkbdzQHmYP5BpWgK5uag1JuvYOb5UrAV8FnWwc qYT5UdxWZg46hZ2kLkPWR00+nwvQLb6yWf5qSGRklcmwbzjIQDCkgLoalNG7EwmfVE dDnxC29RG9stg== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id E9D8810002E; Thu, 3 Oct 2024 11:43:25 -0400 (EDT) Received: from alfajor (modemcable005.21-80-70.mc.videotron.ca [70.80.21.5]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id C65A3120311; Thu, 3 Oct 2024 11:43:25 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#73584: 29.3; read-key In-Reply-To: <86v7y9zpqs.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 03 Oct 2024 09:04:27 +0300") Message-ID: References: <56f7ea1fff72be793a8026baf34e1548@jovi.net> <86v7yb11wc.fsf@gnu.org> <86h69u22y8.fsf@gnu.org> <86v7y9zpqs.fsf@gnu.org> Date: Thu, 03 Oct 2024 11:43:25 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.714 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain SUBJ_LACKS_WORDS 1.937 Subject is not short yet lacks words X-SPAM-LEVEL: X-Spam-Score: -0.3 (/) X-Debbugs-Envelope-To: 73584 Cc: 73584@debbugs.gnu.org, Stefan Kangas , Emacs-hacker2023@jovi.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) > The OP shot himself in the foot by invoking by hand a low-level > function with a wrong argument. Interactive functions and high-level > APIs must check their arguments right away, but low-level functions > like this one do not. I think the "bug" is indeed not in the fact that we check too late for a string. I guess we could say that any code which temporarily rebinds the global map should be super-extra careful never to signal an error, and prevent itself from being Edebugged etc... but it would be preferable for the debuggers to "handle it". > Stefan Monnier, do we have a good way of doing that in cases like > this? Perhaps the debugger should define some minimal key bindings > when it starts or something? The debuggers already do a fair bit of "setup" to try and isolate the state of the debugger from the state of the debugged code. If we got rid of `current-global-map` and `use-global-map` (and instead just tied the ELisp `global-map` to C's `current_global_map`, so we could (re) define those two functions in ELisp), then `read-key` could let-bind `global-map` and the debuggers could also let-bind it (back) to the value in `default-toplevel-value`. Short of doing that we could have a new var `normal-global-map` which would be initialized to the value of `global-map` and then make the debuggers install that map with `set-global-map` while they're active. More generally, the debuggers should (behave as if they're) run in their own thread so they're not affected by the dynamic-bindings of the code they're debugging. >> I meant to ask if we have something similar to `cl-check-type' that does >> not come from cl-lib.el. I'm asking that precisely because we can't use >> cl-lib in subr.el. > Sorry, my misunderstanding. A think a better course of action for this specific sub-problem is to arrange for `read-keys` to be able to use `cl-check-type` (instead of re-inventing it). In general, I think it would be beneficial to split `subr.el` into two files: one that is still loaded just as early and another that's loaded a bit later so it can use `cl-lib` macros. In the mean time, we can often get a similar result by moving the code to `simple.el`. There can be other ways to solve this bootstrap problem. Such as arranging for `subr.el` to load `cl-lib` in a slightly more careful way than `eval-when-compile`: it would load it when the file is being compiled (just like `eval-when-compile`) or it would schedule `cl-lib` for "near future" loading (as soon as enough other files have been loaded that `cl-lib` can be loaded). As long as `cl-lib` is loaded before `read-keys` is called, that would be sufficient. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 13 07:42:03 2024 Received: (at 73584) by debbugs.gnu.org; 13 Oct 2024 11:42:03 +0000 Received: from localhost ([127.0.0.1]:50432 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1szwz4-0004vH-M0 for submit@debbugs.gnu.org; Sun, 13 Oct 2024 07:42:03 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57860) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1szwz2-0004un-Px for 73584@debbugs.gnu.org; Sun, 13 Oct 2024 07:42:01 -0400 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 1szwyg-00083M-MV; Sun, 13 Oct 2024 07:41:39 -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=U2VN8jtcH9QzRFE7ynMbUqK20L0zGJOQ9V+/cvz7Tuc=; b=iHr473EZ0w/p aMMhcYdO6LPDXMfWJm/WgIZVJ4/P0ox8L4/DPMRKuM+cHy1d/WQjfxqMDwJ2EaiUYWdBUytiQ3cx8 RS2YHeWclwALdG4bt5MQyd2jl4wNFnKSaqb/e2ak6cje2px4m0F52f7QyzlAQ7vXV+JzcCQLsrwbN EIa/SVoNZV+GOWdPLNmlH5OLhteu7RKAVOXt2OqkuFRCHc9d28SbqEyQ0DRbsimO/XzvMAURpRUFB m1BQfTEeQBu4CHGt156B3mXfqdmlO2mUuq3rbTJBLxy6wSX3d7DpDZBFNAt+a/5byHvGS5uQd1roI QJE5/06G3zciW186nrPKxg==; Date: Sun, 13 Oct 2024 14:41:34 +0300 Message-Id: <86plo4tekx.fsf@gnu.org> From: Eli Zaretskii To: Stefan Monnier In-Reply-To: (message from Stefan Monnier on Thu, 03 Oct 2024 11:43:25 -0400) Subject: Re: bug#73584: 29.3; read-key References: <56f7ea1fff72be793a8026baf34e1548@jovi.net> <86v7yb11wc.fsf@gnu.org> <86h69u22y8.fsf@gnu.org> <86v7y9zpqs.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 73584 Cc: 73584@debbugs.gnu.org, stefankangas@gmail.com, Emacs-hacker2023@jovi.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Monnier > Cc: Stefan Kangas , Emacs-hacker2023@jovi.net, > 73584@debbugs.gnu.org > Date: Thu, 03 Oct 2024 11:43:25 -0400 > > > The OP shot himself in the foot by invoking by hand a low-level > > function with a wrong argument. Interactive functions and high-level > > APIs must check their arguments right away, but low-level functions > > like this one do not. > > I think the "bug" is indeed not in the fact that we check too late for > a string. I guess we could say that any code which temporarily rebinds > the global map should be super-extra careful never to signal an error, > and prevent itself from being Edebugged etc... but it would be > preferable for the debuggers to "handle it". Is the patch below acceptable as the solution to this? diff --git a/lisp/emacs-lisp/backtrace.el b/lisp/emacs-lisp/backtrace.el index 120972d..e353970 100644 --- a/lisp/emacs-lisp/backtrace.el +++ b/lisp/emacs-lisp/backtrace.el @@ -202,6 +202,7 @@ backtrace-mode-map "+" #'backtrace-multi-line "-" #'backtrace-single-line "." #'backtrace-expand-ellipses + "C-]" #'abort-recursive-edit "" 'mouse-face "" #'mouse-select-window From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 27 06:30:50 2024 Received: (at 73584-done) by debbugs.gnu.org; 27 Oct 2024 10:30:50 +0000 Received: from localhost ([127.0.0.1]:43933 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t50Xq-0006Hi-8K for submit@debbugs.gnu.org; Sun, 27 Oct 2024 06:30:50 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49100) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t50Xp-0006Eo-0V for 73584-done@debbugs.gnu.org; Sun, 27 Oct 2024 06:30:49 -0400 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 1t50XA-0004Hc-Aj; Sun, 27 Oct 2024 06:30:08 -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=pByEDZgEQe6qD6Rn0Dyy6xKvriKq1lfh1fUPOAFypZ0=; b=P5B3DoVs+I+H I5wU8QKiA/cTtIcvwSlmDSZwohm0OF12AiKOtEtMBtERW4gI26sZhCPRYwSrI0A8gk0qSxCHsX4v0 mOUqDWlgessOHO44WyEVLYqnU9z00q5j2mN99XwjH77QqBVz76TrZWY4OEtDFNUbqxWfFM/q0EpLy 385GFBmuwtJdlHG3etWMgKHvTEjIzl1CZRLo5JTn7N7LAZSWfXyZh0fsQwzwLmR8odmzstiA+M0Fx Gv29pcn4HcZ9ibq1OKtGc/hfixLLZZVm66SpnwKFeepX272Ef79FcdF2UJaOn2zZm7PVwMSNo+kmc ulQxZgf+4tE2LghSx3PXfw==; Date: Sun, 27 Oct 2024 12:30:02 +0200 Message-Id: <86jzdtaled.fsf@gnu.org> From: Eli Zaretskii To: Emacs-hacker2023@jovi.net In-Reply-To: <86plo4tekx.fsf@gnu.org> (message from Eli Zaretskii on Sun, 13 Oct 2024 14:41:34 +0300) Subject: Re: bug#73584: 29.3; read-key References: <56f7ea1fff72be793a8026baf34e1548@jovi.net> <86v7yb11wc.fsf@gnu.org> <86h69u22y8.fsf@gnu.org> <86v7y9zpqs.fsf@gnu.org> <86plo4tekx.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 73584-done Cc: 73584-done@debbugs.gnu.org, monnier@iro.umontreal.ca, stefankangas@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 73584@debbugs.gnu.org, stefankangas@gmail.com, Emacs-hacker2023@jovi.net > Date: Sun, 13 Oct 2024 14:41:34 +0300 > From: Eli Zaretskii > > > From: Stefan Monnier > > Cc: Stefan Kangas , Emacs-hacker2023@jovi.net, > > 73584@debbugs.gnu.org > > Date: Thu, 03 Oct 2024 11:43:25 -0400 > > > > > The OP shot himself in the foot by invoking by hand a low-level > > > function with a wrong argument. Interactive functions and high-level > > > APIs must check their arguments right away, but low-level functions > > > like this one do not. > > > > I think the "bug" is indeed not in the fact that we check too late for > > a string. I guess we could say that any code which temporarily rebinds > > the global map should be super-extra careful never to signal an error, > > and prevent itself from being Edebugged etc... but it would be > > preferable for the debuggers to "handle it". > > Is the patch below acceptable as the solution to this? > > diff --git a/lisp/emacs-lisp/backtrace.el b/lisp/emacs-lisp/backtrace.el > index 120972d..e353970 100644 > --- a/lisp/emacs-lisp/backtrace.el > +++ b/lisp/emacs-lisp/backtrace.el > @@ -202,6 +202,7 @@ backtrace-mode-map > "+" #'backtrace-multi-line > "-" #'backtrace-single-line > "." #'backtrace-expand-ellipses > + "C-]" #'abort-recursive-edit > "" 'mouse-face > "" #'mouse-select-window No further comments within 2 weeks, so I've now installed this on the master branch, and I'm therefore closing this bug. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 28 18:54:54 2024 Received: (at 73584-done) by debbugs.gnu.org; 28 Oct 2024 22:54:54 +0000 Received: from localhost ([127.0.0.1]:55077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5YdR-0001Hl-Ly for submit@debbugs.gnu.org; Mon, 28 Oct 2024 18:54:53 -0400 Received: from mail-ed1-f47.google.com ([209.85.208.47]:48132) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5YdQ-0001HI-5k for 73584-done@debbugs.gnu.org; Mon, 28 Oct 2024 18:54:52 -0400 Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-5c9c28c1e63so5771159a12.0 for <73584-done@debbugs.gnu.org>; Mon, 28 Oct 2024 15:54:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730156026; x=1730760826; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=wgCp0UV/RK3oZs9DvAQvMoL5Ikrw+mQVf98QoT6mYNI=; b=eIIXmfgxrYMubmKqzrCdyChMfSwK6/4m3mzrmN49SyeANHnLLXSD6mMT3LfBRxoQZ4 OGEFJa8WISP6CJmBIqw6HU5hst33VB2EKdN5wG9yeLPk3V2mQhYH3rS5sYkUrUTppwSs 3ejpBgBvn6wXcvxpB8ypzuKAcnKnBQzK+FWAysLjfb8onGJ7Aa9BnsEtWq5d2BGYxHbk jv558AODRpCm1qRgMsQ02tmKdpzOBQcgmDCxYcRNCMZsZuAvzSHXqJMwShrDx8fBEr3i ShsIlqyOXc8hADTRs5QZosb6PBgVn96GywWAWHnHK2YY7MLLSFT5IOi88hgVBUeM7lB+ zb9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730156026; x=1730760826; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wgCp0UV/RK3oZs9DvAQvMoL5Ikrw+mQVf98QoT6mYNI=; b=l9/yIlq0/MXG2sg/lHuIvtWP6GUz7Zam9Rj/Xw5ddHffUTZGHtORycNQbh0j3YE8BL Jvu60BM79hvlrG3xkiX4XZ06FLoeqvijmtuCiygLPYg7AEpOx4/44d3MMIJYT8vfbQ5N rycrdUHegR3CDlr1yJSsYGVbRGel6NX3bwWJHhzDA3hAIWlYQcPHnz3NqXb3LgzsUklj gwzWaQaDCRTuxuiGvEZG4Sp32pc+qkrloKTw2WG0wg0tEAZuv79txJKGww6C6Mpph9+m PWEc3/FNSEJYzLDHZvQV23Lg+CEsaJ7lzMtb3FuXhPZILkEL1qZDC0rOFw/aecLiB/ne /+wA== X-Forwarded-Encrypted: i=1; AJvYcCVe3OYZckV/uklWPe67UOeI5YCGZhQVbT54ChWDcbKvieW8fWlWqHZJ71VTexC7OaMWePG3RHmpOzdT@debbugs.gnu.org X-Gm-Message-State: AOJu0YxVd3drXZY2W68yRpG/wqHuzXQdPT1OFb50R8b07VdJg7gIGNKX EIboLufRbwN1R/o7N5/yBKN535gSc3b6C9elUSoicfx2z+bqcRif2MUp9T5ajyql1ZvkeRfiP6y HCMq5vI19NOUIO+eSxnNZ+9jBRfdhaw== X-Google-Smtp-Source: AGHT+IGbYDyAR91HANN6R3qDus2frwF3wGIxMGBfagrsm4cblbS7HxltYpipHBmvfhMHcKkClc9wkpZax5DJL0GkUhg= X-Received: by 2002:a05:6402:5107:b0:5c9:8ab0:296a with SMTP id 4fb4d7f45d1cf-5cbbfa62b4fmr7755375a12.25.1730156026060; Mon, 28 Oct 2024 15:53:46 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 28 Oct 2024 15:53:45 -0700 From: Stefan Kangas In-Reply-To: <86jzdtaled.fsf@gnu.org> References: <56f7ea1fff72be793a8026baf34e1548@jovi.net> <86v7yb11wc.fsf@gnu.org> <86h69u22y8.fsf@gnu.org> <86v7y9zpqs.fsf@gnu.org> <86plo4tekx.fsf@gnu.org> <86jzdtaled.fsf@gnu.org> MIME-Version: 1.0 Date: Mon, 28 Oct 2024 15:53:45 -0700 Message-ID: Subject: Re: bug#73584: 29.3; read-key To: Eli Zaretskii , Emacs-hacker2023@jovi.net Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 73584-done Cc: 73584-done@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: > No further comments within 2 weeks, so I've now installed this on the > master branch, and I'm therefore closing this bug. Thanks. From unknown Fri Jun 20 07:20:47 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 26 Nov 2024 12:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator