From unknown Fri Sep 05 08:42:23 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#240 <240@debbugs.gnu.org> To: bug#240 <240@debbugs.gnu.org> Subject: Status: 23.0.60; substitute-command-keys incorrect for self-insert-command Reply-To: bug#240 <240@debbugs.gnu.org> Date: Fri, 05 Sep 2025 15:42:23 +0000 retitle 240 23.0.60; substitute-command-keys incorrect for self-insert-comm= and reassign 240 emacs submitter 240 "Drew Adams" severity 240 normal thanks From monnier@iro.umontreal.ca Tue May 13 20:57:42 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=0.2 required=4.0 tests=AWL,UNPARSEABLE_RELAY autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 14 May 2008 03:57:42 +0000 Received: from mercure.iro.umontreal.ca (mercure.iro.umontreal.ca [132.204.24.67]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m4E3vZbG025719 for ; Tue, 13 May 2008 20:57:36 -0700 Received: by mercure.iro.umontreal.ca (Postfix, from userid 20848) id 6DC9B2CF9CC; Tue, 13 May 2008 23:57:35 -0400 (EDT) X-Original-To: monnier@iro.umontreal.ca Received: from pinpin.iro.umontreal.ca (pinpin.iro.umontreal.ca [132.204.24.52]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 4CD0B2CE9A4 for ; Tue, 13 May 2008 23:57:35 -0400 (EDT) Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by pinpin.iro.umontreal.ca (Postfix) with ESMTP id 3CAD33B8B43 for ; Tue, 13 May 2008 23:57:23 -0400 (EDT) Received: from localhost ([127.0.0.1]:53241 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jw87H-0004rd-Ia for monnier@iro.umontreal.ca; Tue, 13 May 2008 23:57:23 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jw86y-0004r9-Gw for emacs-devel@gnu.org; Tue, 13 May 2008 23:57:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jw86x-0004qw-CV for emacs-devel@gnu.org; Tue, 13 May 2008 23:57:03 -0400 Received: from [199.232.76.173] (port=60861 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jw86x-0004qt-77 for emacs-devel@gnu.org; Tue, 13 May 2008 23:57:03 -0400 Received: from fencepost.gnu.org ([140.186.70.10]:55546) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jw86w-0007xv-Qi for emacs-devel@gnu.org; Tue, 13 May 2008 23:57:02 -0400 Received: from mx10.gnu.org ([199.232.76.166]:39272) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1Jw85z-0001Lx-Ki for emacs-pretest-bug@gnu.org; Tue, 13 May 2008 23:56:03 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Jw86t-0007xR-3j for emacs-pretest-bug@gnu.org; Tue, 13 May 2008 23:57:02 -0400 Received: from rgminet01.oracle.com ([148.87.113.118]:32313) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Jw86s-0007xJ-Pb for emacs-pretest-bug@gnu.org; Tue, 13 May 2008 23:56:58 -0400 Received: from rgmgw1.us.oracle.com (rgmgw1.us.oracle.com [138.1.186.110]) by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id m4E3uu1P028998 for ; Tue, 13 May 2008 21:56:56 -0600 Received: from acsmt351.oracle.com (acsmt351.oracle.com [141.146.40.151]) by rgmgw1.us.oracle.com (Switch-3.2.4/Switch-3.2.4) with ESMTP id m4E3utkC005269 for ; Tue, 13 May 2008 21:56:56 -0600 Received: from inet-141-146-46-1.oracle.com by acsmt351.oracle.com with ESMTP id 3671801281210737379; Tue, 13 May 2008 20:56:19 -0700 Received: from dradamslap1 (/141.144.72.233) by bhmail.oracle.com (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 13 May 2008 20:56:18 -0700 From: "Drew Adams" To: Date: Tue, 13 May 2008 20:56:23 -0700 Message-ID: <004b01c8b576$7a3dfbb0$0200a8c0@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 Thread-Index: Aci1dnm/0hexmKA7QdKHz3gAgu0cxw== X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) Cc: Subject: 23.0.60; substitute-command-keys incorrect for self-insert-command X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-devel-bounces+monnier=iro.umontreal.ca@gnu.org Errors-To: emacs-devel-bounces+monnier=iro.umontreal.ca@gnu.org X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.6, requis 5, autolearn=not spam, BAYES_00 -2.60, SPF_HELO_PASS -0.00) X-DIRO-MailScanner-From: emacs-devel-bounces+monnier=iro.umontreal.ca@gnu.org emacs -Q In *scratch* buffer, type this, then use C-x C-e after it: (princ (substitute-command-keys "\\{global-map}") (current-buffer)) You will see this: key binding --- ------- \200 .. \377 self-insert-command C-@ set-mark-command C-a move-beginning-of-line etc. The bug is that the \200 and the \377 are treated differently. The \200 is a single octal character; the \377 is four characters, \, 3, 7, 7. This has consequences for code that uses this output as input. In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) of 2008-05-04 on LENNART-69DE564 Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/g/include -fno-crossjumping' From cyd@stupidchicken.com Tue Aug 19 14:01:53 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-3.5 required=4.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 240) by emacsbugs.donarmstrong.com; 19 Aug 2008 21:01:53 +0000 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7JL1oeV007966 for <240@emacsbugs.donarmstrong.com>; Tue, 19 Aug 2008 14:01:51 -0700 Received: by cyd.mit.edu (Postfix, from userid 1000) id DD70F57E339; Tue, 19 Aug 2008 17:02:57 -0400 (EDT) From: Chong Yidong To: "Drew Adams" Cc: emacs-devel@gnu.org, 240@debbugs.gnu.org Subject: Re: 23.0.60; substitute-command-keys incorrect for self-insert-command Date: Tue, 19 Aug 2008 17:02:57 -0400 Message-ID: <87tzdg3egu.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > emacs -Q > In *scratch* buffer, type this, then use C-x C-e after it: > (princ (substitute-command-keys "\\{global-map}") (current-buffer)) > > You will see this: > > key binding > --- ------- > > \200 .. \377 self-insert-command > > The bug is that the \200 and the \377 are treated differently. The \200 > is a single octal character; the \377 is four characters, \, 3, 7, 7. I believe this is simply how the Lisp printer behaves. Note that string_count_byte8 is zero for \200, but one for \377; hence \200 is printed literally, while \377 is converted into an escaped string. Using `insert' rather than `princ' probably gives the result you want. I'm no expert on this area, though, so maybe someone else could comment more authoritatively. From drew.adams@oracle.com Tue Aug 19 14:47:27 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.2 required=4.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 240) by emacsbugs.donarmstrong.com; 19 Aug 2008 21:47:27 +0000 Received: from agminet01.oracle.com (agminet01.oracle.com [141.146.126.228]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7JLlNt6022454 for <240@emacsbugs.donarmstrong.com>; Tue, 19 Aug 2008 14:47:24 -0700 Received: from agmgw2.us.oracle.com (agmgw2.us.oracle.com [152.68.180.213]) by agminet01.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id m7JLlGlg028659; Tue, 19 Aug 2008 16:47:16 -0500 Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154]) by agmgw2.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id m7JFBhOj001707; Tue, 19 Aug 2008 15:47:02 -0600 Received: from inet-141-146-46-1.oracle.com by acsmt356.oracle.com with ESMTP id 11575288501219182147; Tue, 19 Aug 2008 14:42:27 -0700 Received: from dradamslap1 (/141.144.102.127) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 19 Aug 2008 14:42:26 -0700 From: "Drew Adams" To: "'Chong Yidong'" Cc: , <240@debbugs.gnu.org> References: <87tzdg3egu.fsf@cyd.mit.edu> Subject: RE: 23.0.60; substitute-command-keys incorrect for self-insert-command Date: Tue, 19 Aug 2008 14:43:09 -0700 Message-ID: <00a601c90244$93099440$0200a8c0@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AckCPvBTYNT5cS2hRluADOkMixSy2wAAJYcA In-Reply-To: <87tzdg3egu.fsf@cyd.mit.edu> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE > > emacs -Q > > In *scratch* buffer, type this, then use C-x C-e after it: > > (princ (substitute-command-keys "\\{global-map}") (current-buffer)) > > > > You will see this: > > > > key binding > > --- ------- > > > > \200 .. \377 self-insert-command > > > > The bug is that the \200 and the \377 are treated > differently. The \200 > > is a single octal character; the \377 is four characters, > \, 3, 7, 7. > > > I believe this is simply how the Lisp printer behaves. Note that > string_count_byte8 is zero for \200, but one for \377; hence \200 is > printed literally, while \377 is converted into an escaped string. > > Using `insert' rather than `princ' probably gives the result you want. > > I'm no expert on this area, though, so maybe someone else > could comment more authoritatively. 1. Yes, thanks. This treats the \200 and \377 the same way - both are single octal characters: (with-current-buffer "foo" (insert (substitute-command-keys (concat "\\{" "global-map" "}")))) 2. I'm using this in the *Help* buffer. The behavior of using octal chars here is new with Emacs 23, BTW. In Emacs 22, I see instead " .. y", where the first char looks like a space char and the y is really a y with an umlaut/diaresis/trema (two dots, at least). Dunno if the new behavior is intended or not. [I'm not sure those represent the same two character ranges, BTW, but in any case in Emacs 22 there are no octal chars from `substitute-command-keys'.] From cyd@stupidchicken.com Tue Aug 19 15:19:18 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-3.5 required=4.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at control) by emacsbugs.donarmstrong.com; 19 Aug 2008 22:19:18 +0000 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7JMJFdJ032500 for ; Tue, 19 Aug 2008 15:19:16 -0700 Received: by cyd.mit.edu (Postfix, from userid 1000) id 9456857E339; Tue, 19 Aug 2008 18:20:23 -0400 (EDT) From: Chong Yidong To: control@debbugs.gnu.org Subject: Reassign bugs Date: Tue, 19 Aug 2008 18:20:23 -0400 Message-ID: <87ljyswst4.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii close 240 close 584 severity 739 wishlist thanks From unknown Fri Sep 05 08:42:23 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: $requester Subject: Internal Control Message-Id: bug archived. Date: Wed, 17 Sep 2008 14:24:05 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A log time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator