unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Lennart Borgman <lennart.borgman.073@student.lu.se>
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 23:14:20 +0200	[thread overview]
Message-ID: <442AF8AC.5020907@student.lu.se> (raw)
In-Reply-To: <jwv7j6dht5q.fsf-monnier+emacs@gnu.org>

Stefan Monnier wrote:
>> 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))
>   
Thanks for the lesson. However it should be (read-key-sequence nil).

> 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.
>   
Could key sequences like those produce "readable" characters?

> I'm not really sure what should be the right answer... I'm not even sure
> what should be the right behavior.
>
>
>         Stefan
>   


-- 
Lennart
från Lund
lennart.borgman.073@student.lu.se

  reply	other threads:[~2006-03-29 21:14 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
2006-03-29 21:14         ` Lennart Borgman [this message]
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=442AF8AC.5020907@student.lu.se \
    --to=lennart.borgman.073@student.lu.se \
    --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).