bug#10477: zap-to-char should allow picking from history

From:

Drew Adams

Subject:

bug#10477: zap-to-char should allow picking from history

Date:

Sat, 14 Jan 2012 17:23:55 -0800

> zap-to-char should allow typing e.g., the up arrow to pick a
> recently used character, and then RET.
>
> Currently the only way is to type the actual character back in again!
> Even if hard to type CKS!
>
> Currently one gets 'Non-character input-event'.
>
> It should work something like one can maneuver at M-x occur's 'List
> lines matching regexp:' prompt.
> So: if a-z etc. is pressed, then no RET should be required.
>
> If any 'Non-character input-event' is pressed, then we should
> be able to manipulate from a history list of recently zapped chars.
This sounds similar to bug #1580 (which jidanni also filed), though the emphasis
seems a bit different.
---
FWIW, in Icicles, command `icicle-zap-to-char' uses function
`icicle-read-char-maybe-completing' interactively, which is like `read-char'
unless you hit a completing key (e.g. `TAB') or you hit `C-q'.
If you hit a completing key, you complete a character name against either the
names of your previously entered Unicode chars (default behavior) or all Unicode
char names (depends on an option setting).
It is function `icicle-read-char-by-name', a replacement for
`read-char-by-name', which does the completion. It also populates the
Unicode-char history list used by `icicle-read-char-maybe-completing'.
You can read (and zap to) a TAB char by hitting C-q first: `C-q TAB'. You can
read (and zap to) a `C-q' char by hitting `C-q C-q'.
The idea is to try to make it easier to zap to Unicode (e.g. Chinese) chars that
you have already inserted. The tradeoff is that zapping to a TAB or C-q char
requires you to hit `C-q' first.
(I don't really know whether completing against a char name is necessarily
easier than "to type the actual character back in again". Completing against a
history list instead of all Unicode chars as candidates, the thought was that it
might be. Dunno.)