[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: inputting characters by hexadigit
From: |
Miles Bader |
Subject: |
Re: inputting characters by hexadigit |
Date: |
Wed, 23 Jul 2008 19:15:28 +0900 |
Juri Linkov <address@hidden> writes:
> Another drawback (that C-q currently has too) is an inability to edit
> incomplete input. This pushes us back to the era of dumb calculators
> without the backspace key.
>
> A more convenient method is to use the minibuffer to input the number.
We could have C-x 8 <DIGIT> prompt using the minibuffer,
with <DIGIT> pre-stuffed into it...
(defun read-and-insert-numeric-char (initial-input)
(interactive (list (string last-command-char)))
(insert
(string-to-number
(read-from-minibuffer "Character code (hex): " initial-input)
16)))
(dolist (ch '(?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9 ?a ?b ?c ?d ?e ?f))
(global-set-key (vector ?\C-x ?8 ch) 'read-and-insert-numeric-char))
[This is not entirely correct, since I'm not sure where the C-x 8 keymap
is located, so I'm just using the global map...]
-Miles
--
Somebody has to do something, and it's just incredibly pathetic that it
has to be us. -- Jerry Garcia
- Re: inputting characters by hexadigit, (continued)
- Re: inputting characters by hexadigit, Miles Bader, 2008/07/22
- Re: inputting characters by hexadigit, Kenichi Handa, 2008/07/22
- Re: inputting characters by hexadigit, Stefan Monnier, 2008/07/22
- Re: inputting characters by hexadigit, Miles Bader, 2008/07/22
- Re: inputting characters by hexadigit, David De La Harpe Golden, 2008/07/22
- Re: inputting characters by hexadigit, Stefan Monnier, 2008/07/22
- Re: inputting characters by hexadigit, David De La Harpe Golden, 2008/07/23
- Re: inputting characters by hexadigit, Stefan Monnier, 2008/07/23
- Re: inputting characters by hexadigit, David De La Harpe Golden, 2008/07/23
- Re: inputting characters by hexadigit, Juri Linkov, 2008/07/23
- Re: inputting characters by hexadigit,
Miles Bader <=
- Re: inputting characters by hexadigit, Juri Linkov, 2008/07/23
- Re: inputting characters by hexadigit, Miles Bader, 2008/07/23
- RE: inputting characters by hexadigit, Drew Adams, 2008/07/22
- Re: inputting characters by hexadigit, Ted Zlatanov, 2008/07/23
- Re: inputting characters by hexadigit, Lennart Borgman (gmail), 2008/07/23
- RE: inputting characters by hexadigit, Drew Adams, 2008/07/23
- Re: inputting characters by hexadigit, Juri Linkov, 2008/07/23
- Re: inputting characters by hexadigit, Stefan Monnier, 2008/07/23
- Re: inputting characters by hexadigit, Juri Linkov, 2008/07/23
- Re: inputting characters by hexadigit, Stefan Monnier, 2008/07/23