From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Michael Kifer <kifer@cs.sunysb.edu>, Emacs Devel <emacs-devel@gnu.org>
Subject: Re: Problem with viper-replace-char and Swedish characters on w32
Date: Wed, 29 Mar 2006 16:01:14 -0500 [thread overview]
Message-ID: <jwv7j6dht5q.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <442AF208.6090705@student.lu.se> (Lennart Borgman's message of "Wed, 29 Mar 2006 22:46:00 +0200")
> Thanks, Stefan. Is something like this what should be done then:
> (let* ((ch (read-char "cs:")))
> (insert (decode-coding-string (char-to-string ch)
> (keyboard-coding-system))))
This also has its share of problems since keyboard-coding-system may be
multibyte, in which case you might need to read more than 1 char ;-)
(insert (aref (read-key-sequence) 0))
is another approch which will correctly solve those problems, but will
suffer from yet others: typically after hitting things like C-c or C-x Emacs
will just sit still, waiting for more input before processing it.
You can get closer with
(insert (let ((overriding-terminal-local-map (make-sparse-keymap)))
(aref (read-key-sequence) 0)))
but C-x will still hang because of the C-x 8 prefix in key-translation-map,
and similarly for ESC because of the bindings in function-key-map.
I'm not really sure what should be the right answer... I'm not even sure
what should be the right behavior.
Stefan
next prev parent reply other threads:[~2006-03-29 21:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-24 11:37 Problem with viper-replace-char and Swedish characters on w32 Lennart Borgman
2006-03-29 19:37 ` Lennart Borgman
2006-03-29 20:18 ` Stefan Monnier
2006-03-29 20:46 ` Lennart Borgman
2006-03-29 21:01 ` Stefan Monnier [this message]
2006-03-29 21:14 ` Lennart Borgman
2006-03-29 22:45 ` Stefan Monnier
2006-03-29 22:58 ` Lennart Borgman
2006-03-30 22:20 ` Stefan Monnier
2006-03-30 22:36 ` Lennart Borgman
2006-04-19 21:36 ` Lennart Borgman
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwv7j6dht5q.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=kifer@cs.sunysb.edu \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).