[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#36454: 26.2.90; feature request - Insert char by hex tab completion

From: Drew Adams
Subject: bug#36454: 26.2.90; feature request - Insert char by hex tab completion or C-x 8 RET ffe <TAB>
Date: Thu, 18 Jul 2019 16:15:23 +0000 (UTC)

> > 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.
> Try "ff" or "fe" for some perspective.

With Emacs 23:

For "ff" there are 29 matching char names and
438 matching code points, total: 467.  Zero

If you really want to be extreme, try just "f"
(see below).

Obviously you can ask to complete input that
results in many candidates.  That's true even
with just names as candidates.  Don't do that,
if you don't want lots of candidates.

IMO, the main advantage in completing code
points is not to save typing to enter a char.
It's to see the char names in `*Completions*'.
Completing 1 or 2 hex chars, just to save
typing 3 or 2 more, is not the point.  It's
about seeing what names match.

If you just want to insert a char by giving
its code point, it's not hard to type 4 hex
chars.  Completion is not really gaining you
anything for that goal. 

In general, it's a small percentage of char
names that include hex-char sequences, and
the longer the sequence the quicker that
percentage shrinks.  There are exceptions,
of course.

Let's see:

There are 5452 matches for input "9".
Of those, 132 are matches for a char name
(2% overlap).

Add an "a", to check "9a".  The 5454 drops
to 230, and the 132 drops to 8 (3% overlap).

For "9f" it's 203 total, only 1 name match
(0.4% overlap).

With regexp "9a\|a9" you can check for
matching either "9a" or "a9", which gives
626 total and 9 name-only (1% overlap).


  "f": 10,113 total, 5,539 matching names (54% overlap)
 "fa":    353 total, 121 matching names   (34% overlap)
 "ee":  1,921 total, 1713 matching names  (89% overlap)
 "aa":    792 total, 417 matching names   (53% overlap)

"aaa":     21 total, 0 matching names      (no overlap)
"123":    174 total, 33 matching names    (19% overlap)
"321":     58 total, 0 matching names      (no overlap)
 "99":    221 total, 1 matching name     (0.4% overlap)
 "bc":    440 total, 2 matching names    (0.4% overlap)

But yes, if you want to see _only_ code-point
matches, and you want to type _only_ "f", say,
then this might not be for you.  If you think
this would be a problem for many people (I
don't), you could make it an option, of course.

And if you're not interested in such a feature,
fine.  Just wanted to share my (long) experience
with it, and suggest that it's easy to use and
quite useful.  You're not obliged to agree.  No
obligation to appreciate substring completion
for `C-x 8 RET' either.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]