From: "Drew Adams" <drew.adams@oracle.com>
To: <bug-gnu-emacs@gnu.org>
Subject: bug#4751: 23.1; `read-char' inserts accented chars when you use `M-' modifier
Date: Sun, 18 Oct 2009 14:44:45 -0700 [thread overview]
Message-ID: <5FBBD1BB0E704C769D622880A6ED636B@us.oracle.com> (raw)
This is probably a feature, not a bug. But I don't really see it
explained, and it confuses me, at least.
emacs -Q
M-: (read-char "aaa: ")
Hit `M-a'.
That returns an `a' char with acute accent - 225 (#o341, #xe1).
Similarly, for other `Meta' key sequences. `read-char-exclusive' does
the same thing.
The doc string does say:
"If the character has modifiers, they are resolved and reflected to the
character code if possible (e.g. C-SPC -> 0)."
That's a bit cryptic ("reflected to the char code"?), but I guess it
means this has something to do with character encodings? How do I
control that in Elisp - how, for instance, do I make `read-char' treat
`M-a' as a non-character event? (I assume that most people don't use
`M-a' if they want to insert an `a' with acute accent.)
Maybe the doc (e.g. manual) could explain this.
Also, for the arg descriptions the Elisp manual refers to the
`read-event' doc (same node) for an explanation. But that doc says:
If INHERIT-INPUT-METHOD is non-`nil', then the current input
method (if any) is employed to make it possible to enter a
non-ASCII character. Otherwise, input method handling is disabled
for reading this event.
I don't think that accented chars are ASCII chars. So is this doc
incorrect? It makes it sound as if you cannot enter a non-ASCII
character, but `M-a' seems to do just that (and it does so whether the
INHERIT-INPUT-METHOD arg is nil or t).
Anyway, call me confused. HTH, to clarify the doc for me and others
who might be similarly confused.
In GNU Emacs 23.1.1 (i386-mingw-nt5.1.2600)
of 2009-07-29 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4)'
next reply other threads:[~2009-10-18 21:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-18 21:44 Drew Adams [this message]
2009-10-18 22:36 ` bug#4751: 23.1; `read-char' inserts accented chars when you use `M-' modifier Andreas Schwab
2009-10-19 2:15 ` Stefan Monnier
2009-10-19 6:11 ` Drew Adams
2009-10-19 13:54 ` Stefan Monnier
2009-10-19 21:42 ` Drew Adams
2009-10-20 1:20 ` Stefan Monnier
2009-10-20 2:13 ` Stefan Monnier
2009-10-20 2:30 ` Drew Adams
2009-10-20 13:51 ` Stefan Monnier
2009-10-20 15:05 ` Drew Adams
2009-10-20 19:56 ` Stefan Monnier
2011-09-11 4:47 ` Lars Magne Ingebrigtsen
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=5FBBD1BB0E704C769D622880A6ED636B@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=4751@emacsbugs.donarmstrong.com \
--cc=bug-gnu-emacs@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.