From: "Drew Adams" <drew.adams@oracle.com>
To: "'Chong Yidong'" <cyd@stupidchicken.com>
Cc: 240@emacsbugs.donarmstrong.com, emacs-devel@gnu.org
Subject: RE: 23.0.60; substitute-command-keys incorrect for self-insert-command
Date: Tue, 19 Aug 2008 14:43:09 -0700 [thread overview]
Message-ID: <00a601c90244$93099440$0200a8c0@us.oracle.com> (raw)
In-Reply-To: <87tzdg3egu.fsf@cyd.mit.edu>
> > 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'.]
next prev parent reply other threads:[~2008-08-19 21:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-19 21:02 23.0.60; substitute-command-keys incorrect for self-insert-command Chong Yidong
2008-08-19 21:43 ` Drew Adams [this message]
2008-08-19 21:43 ` bug#240: " Drew Adams
-- strict thread matches above, loose matches on Subject: below --
2008-05-14 3:56 Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='00a601c90244$93099440$0200a8c0@us.oracle.com' \
--to=drew.adams@oracle.com \
--cc=240@emacsbugs.donarmstrong.com \
--cc=cyd@stupidchicken.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.