From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.bugs Subject: bug#240: 23.0.60; substitute-command-keys incorrect for self-insert-command Date: Tue, 19 Aug 2008 17:02:57 -0400 Message-ID: <87tzdg3egu.fsf__13902.5481803857$1219181415$gmane$org@cyd.mit.edu> Reply-To: Chong Yidong , 240@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1219181356 30957 80.91.229.12 (19 Aug 2008 21:29:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 19 Aug 2008 21:29:16 +0000 (UTC) Cc: 240@emacsbugs.donarmstrong.com, emacs-devel@gnu.org To: "Drew Adams" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 19 23:30:08 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KVYmA-00015Z-Hy for geb-bug-gnu-emacs@m.gmane.org; Tue, 19 Aug 2008 23:30:03 +0200 Original-Received: from localhost ([127.0.0.1]:40280 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KVYlC-0007hK-Ly for geb-bug-gnu-emacs@m.gmane.org; Tue, 19 Aug 2008 17:29:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KVYjl-0007AA-1o for bug-gnu-emacs@gnu.org; Tue, 19 Aug 2008 17:27:33 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KVYji-000798-Ok for bug-gnu-emacs@gnu.org; Tue, 19 Aug 2008 17:27:32 -0400 Original-Received: from [199.232.76.173] (port=55620 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KVYji-000791-JI for bug-gnu-emacs@gnu.org; Tue, 19 Aug 2008 17:27:30 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:60154) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KVYji-0001nf-2W for bug-gnu-emacs@gnu.org; Tue, 19 Aug 2008 17:27:30 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7JLRQ0a016319; Tue, 19 Aug 2008 14:27:26 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m7JLA46I010606; Tue, 19 Aug 2008 14:10:04 -0700 X-Loop: don@donarmstrong.com Resent-From: Chong Yidong Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 19 Aug 2008 21:10:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 240 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 240-submit@emacsbugs.donarmstrong.com id=B240.12191797137972 (code B ref 240); Tue, 19 Aug 2008 21:10:04 +0000 Original-Received: (at 240) by emacsbugs.donarmstrong.com; 19 Aug 2008 21:01:53 +0000 Original-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 Original-Received: by cyd.mit.edu (Postfix, from userid 1000) id DD70F57E339; Tue, 19 Aug 2008 17:02:57 -0400 (EDT) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Resent-Date: Tue, 19 Aug 2008 17:27:32 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:19544 Archived-At: > 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.