emacs-devel
[Top][All Lists]
Advanced

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

RE: handling many matches


From: Drew Adams
Subject: RE: handling many matches
Date: Sat, 2 May 2020 12:51:31 -0700 (PDT)

> You are still thinking about what our fuzzy completion does.  That's
> not how you get scores that are relevant for the user, because how
> close the hit is to what the user typed is mostly irrelevant.

Hear, hear!  Maybe not "mostly" - depends on the use case.
But certainly _in general_.

Yes, relevance (score) varies, depending on the use
case.  In general, what's relevant is scoring the thing
that is represented by its name, not the name itself.

And how is that relevance determined?  Typically, you
need to use the PREDICATE arg to `completing-read', to
match not only the name but also the accompanying data
in an alist entry - data that can be super rich.

Of course, that works only for an alist arg, not for
an obarray, hash table, etc.  But there are hacks for
those other arg types (property on a symbol or string
candidate, for example).



reply via email to

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