Subject: RE: bug#36454: 26.2.90; feature request - Insert char by hex tab completion or C-x 8 RET ffe <TAB>

From: Drew Adams <[email-masked]>
Date: Wed, 17 Jul 2019 21:34:36 +0000 (UTC)

> > You don't need to distinguish them.  You don't
> > care which part matches "ffe" or "20".  You
> > don't even care if both name and code point
> > should happen to match the same pattern.  All
> > you care about is being able to match the info
> > about the char: its name or code point.
> 
> So, after I type "ffe" and press TAB, it should look through names and
> codes at the same time, and present completion candidates for both at
> the same time, for example I'll get "￪ ffea" and "GIRAFFE FACE" in the
> same window above?
> 
> Because, if yes, then user may get a lot of results, as it was pointed
> out before.

Have you tried it?

No, you won't get lots of results.  There's little overlap
in general, even if you type only a few chars.  Certainly
less than you get with function and variable names,
especially those that have common prefixes.

You'll typically type little to get to a single candidate.

Completion of `ffe' gives this (using Emacs 23 for this;
no GIRAFFE):
____

DIFFERENCE BETWEEN	224F	≏                               
FULLWIDTH BROKEN BAR	FFE4	￤                              
FULLWIDTH BROKEN VERTICAL BAR	FFE4	￤                      
FULLWIDTH CENT SIGN	FFE0	￠                              
FULLWIDTH MACRON	FFE3	￣                              
FULLWIDTH NOT SIGN	FFE2	￢                              
FULLWIDTH POUND SIGN	FFE1	￡                              
FULLWIDTH SPACING MACRON	FFE3	￣                      
FULLWIDTH WON SIGN	FFE6	￦                              
FULLWIDTH YEN SIGN	FFE5	￥                              
GREEK DASIA	1FFE	῾                                       
HALFWIDTH BLACK SQUARE	FFED	￭                               
HALFWIDTH DOWNWARDS ARROW	FFEC	￬                       
HALFWIDTH FORMS LIGHT VERTICAL	FFE8	￨                       
HALFWIDTH LEFTWARDS ARROW	FFE9	￩                       
HALFWIDTH RIGHTWARDS ARROW	FFEB	￫                       
HALFWIDTH UPWARDS ARROW	FFEA	￪                               
HALFWIDTH WHITE CIRCLE	FFEE	￮                               
HANGUL SYLLABLE BBWEOJ	BFFE	뿾                              
HANGUL SYLLABLE GGWELP	AFFE	꿾                              
HANGUL SYLLABLE KWEOGG	CFFE	쿾                              
MATHEMATICAL BOLD ITALIC PARTIAL DIFFERENTIAL	1D74F	𝝏       
MATHEMATICAL BOLD PARTIAL DIFFERENTIAL	1D6DB	𝛛               
MATHEMATICAL ITALIC PARTIAL DIFFERENTIAL	1D715	𝜕       
MATHEMATICAL SANS-SERIF BOLD ITALIC PARTIAL DIFFERENTIAL	1D7C3	𝟃 
MATHEMATICAL SANS-SERIF BOLD PARTIAL DIFFERENTIAL	1D789	𝞉 
PARTIAL DIFFERENTIAL	2202	∂
____

The overlaps are for 7 char names and 20 code points.

If you were completing _separately_ against only char
names you would still have 7 candidates.  If against
only code points you would still have 20 candidates.
With both together you have 27.

If you typed `iffe' you'd get just 6 (char-name)
candidates.  If you typed `ffea' you'd get just the
char named `HALFWIDTH UPWARDS ARROW'.

[If you typed `[0-9a-f]ffe\|ffe[0-9a-f]' (with
regexp matching) you'd get only the 20 code-point
matches.]

Most char-name chars are not hex chars.  And most
hex-char combinations don't occur in char names.
And those that do occur in both typically don't
occur in many char names.
____

Of course it helps if you can match against multiple
regexps, progressively, as you see the results of
each match, to narrow the set incrementally.  Seeing
the 27 initial matches, typing another (separate)
pattern of, say, `bet' would immediately get you
only candidate `DIFFERENCE BETWEEN	224F	≏'.
____

https://www.emacswiki.org/emacs/Icicles_-_Progressive_Completion