unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: handling many matches
  2020-05-01 22:16 ` Dmitry Gutov
@ 2020-05-02  6:29   ` Eli Zaretskii
  2020-05-02 13:26     ` Dmitry Gutov
  0 siblings, 1 reply; 16+ messages in thread
From: Eli Zaretskii @ 2020-05-02  6:29 UTC (permalink / raw)
  To: Dmitry Gutov
  Cc: jonas, emacs-devel, philippe.vaucher, monnier, adam, kyle,
	drew.adams

> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Sat, 2 May 2020 01:16:07 +0300
> Cc: Jonas Bernoulli <jonas@bernoul.li>, Emacs developers <emacs-devel@gnu.org>,
>  Philippe Vaucher <philippe.vaucher@gmail.com>,
>  Adam Porter <adam@alphapapa.net>, Kyle Meyer <kyle@kyleam.com>,
>  Eli Zaretskii <eliz@gnu.org>
> 
> Whereas "other editors" have already solved this better (perhaps not 
> ideally, but better) by doing fuzzy matching with smart enough sorting. 
> We should start by matching that functionality, and only then add extra 
> capabilities, maybe.

IMNSHO, we should first develop the infrastructure for such "smart"
presentation of completion candidates and make it our default
completion strategy, and only after that consider changes, like the
proposed "namespacing" of APIs, that will allow users to use
completion as a substitute for Help commands.  It is IMO a bad idea to
flood the completion lists with many dozens of candidates and force
users to wade through them.  I certainly wouldn't call that "progress"
for Emacs.



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: handling many matches
  2020-05-02  6:29   ` handling many matches Eli Zaretskii
@ 2020-05-02 13:26     ` Dmitry Gutov
  2020-05-02 13:52       ` Eli Zaretskii
  0 siblings, 1 reply; 16+ messages in thread
From: Dmitry Gutov @ 2020-05-02 13:26 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: jonas, emacs-devel, monnier, adam, kyle, drew.adams

On 02.05.2020 09:29, Eli Zaretskii wrote:
> IMNSHO, we should first develop the infrastructure for such "smart"
> presentation of completion candidates and make it our default
> completion strategy,

How would that look, in your opinion?

> and only after that consider changes, like the
> proposed "namespacing" of APIs, that will allow users to use
> completion as a substitute for Help commands.

Namespacing of APIs is a step that should help the users with the 
current default completion strategy.

> It is IMO a bad idea to
> flood the completion lists with many dozens of candidates and force
> users to wade through them.  I certainly wouldn't call that "progress"
> for Emacs.

Is that what fido-mode does? People seem to like it.



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: handling many matches
  2020-05-02 13:26     ` Dmitry Gutov
@ 2020-05-02 13:52       ` Eli Zaretskii
  2020-05-02 16:13         ` Dmitry Gutov
  0 siblings, 1 reply; 16+ messages in thread
From: Eli Zaretskii @ 2020-05-02 13:52 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: jonas, emacs-devel, monnier, adam, kyle, drew.adams

> Cc: drew.adams@oracle.com, monnier@iro.umontreal.ca, jonas@bernoul.li,
>  emacs-devel@gnu.org, philippe.vaucher@gmail.com, adam@alphapapa.net,
>  kyle@kyleam.com
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Sat, 2 May 2020 16:26:54 +0300
> 
> On 02.05.2020 09:29, Eli Zaretskii wrote:
> > IMNSHO, we should first develop the infrastructure for such "smart"
> > presentation of completion candidates and make it our default
> > completion strategy,
> 
> How would that look, in your opinion?

If by "look" you mean to the user, then I envision a list of
completion candidates that somehow "knows" what I'm after, and places
those likely guesses near the beginning of the list.

> > and only after that consider changes, like the
> > proposed "namespacing" of APIs, that will allow users to use
> > completion as a substitute for Help commands.
> 
> Namespacing of APIs is a step that should help the users with the 
> current default completion strategy.

Like I said, I think the hopes it will deliver a significant enough
improvement are overrated.  It will certainly bloat the lists of
candidates by factors, which is why I think it isn't a very good idea
as long as we don't have some smart scoring of candidates.

> > It is IMO a bad idea to
> > flood the completion lists with many dozens of candidates and force
> > users to wade through them.  I certainly wouldn't call that "progress"
> > for Emacs.
> 
> Is that what fido-mode does? People seem to like it.

I don't have a good idea of what fido-mode does, but the rather foggy
idea I do have says it just applies fuzzy search criteria, attempting
to find non-literal matches.  If this is so, then I don't think fido
cuts it.  We need scoring that "learns" from what I do/did recently,
and from my habits.  Otherwise the list of candidates will remain
hopelessly long, with no promise of having what I'm really looking for
anywhere near the beginning.

Compare with the Internet search: it almost always brings me hundreds
of hits, but I normally find what I was after among the first dozen.
Even more spectacularly, when I type a search phrase into the search
box, it guesses what my search phrase will be, and the guesses are
almost always very accurate, so much so that if I don't see a long
enough list of reasonable candidates, I usually go looking for some
typo in what I typed (and almost always find it).  Some of the
candidates are based on my previous search phrases, and the ones I
typed are always ready to be reused, with a special indication to let
me know I recently used them.

It is this kind of powerful scoring that I think we need to develop if
we are going to handle many dozens of completion candidates.  Because
who has patience and time to wade through 100 candidates, let alone
1000?




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: handling many matches
  2020-05-02 13:52       ` Eli Zaretskii
@ 2020-05-02 16:13         ` Dmitry Gutov
  2020-05-02 16:31           ` Eli Zaretskii
  0 siblings, 1 reply; 16+ messages in thread
From: Dmitry Gutov @ 2020-05-02 16:13 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: jonas, emacs-devel, monnier, adam, kyle, drew.adams

On 02.05.2020 16:52, Eli Zaretskii wrote:

> If by "look" you mean to the user, then I envision a list of
> completion candidates that somehow "knows" what I'm after, and places
> those likely guesses near the beginning of the list.

All fuzzy completion systems do that. Generally by scoring how well each 
string resembles the input string. Whether there are gaps between the 
matched characters, and so on. Our 'flex' completion style has this 
feature as well.

>>> and only after that consider changes, like the
>>> proposed "namespacing" of APIs, that will allow users to use
>>> completion as a substitute for Help commands.
>>
>> Namespacing of APIs is a step that should help the users with the
>> current default completion strategy.
> 
> Like I said, I think the hopes it will deliver a significant enough
> improvement are overrated.  It will certainly bloat the lists of
> candidates by factors, which is why I think it isn't a very good idea
> as long as we don't have some smart scoring of candidates.

The amount of "bloat" will be strictly limited by the number of aliases 
we add. I think there's a general agreement that we shouldn't go overboard.

>>> It is IMO a bad idea to
>>> flood the completion lists with many dozens of candidates and force
>>> users to wade through them.  I certainly wouldn't call that "progress"
>>> for Emacs.
>>
>> Is that what fido-mode does? People seem to like it.
> 
> I don't have a good idea of what fido-mode does, but the rather foggy
> idea I do have says it just applies fuzzy search criteria, attempting
> to find non-literal matches.  If this is so, then I don't think fido
> cuts it.

You can try it. It uses 'flex', and thus it sorts the matches based on 
scores.

> We need scoring that "learns" from what I do/did recently,
> and from my habits.  Otherwise the list of candidates will remain
> hopelessly long, with no promise of having what I'm really looking for
> anywhere near the beginning.

There are systems like that, including in third-party Emacs packages. 
Personally, I'm not fond of the idea (the unpredictability, first of 
all), and I'd rather we polish the current scoring algo first.

But it's good to have it customizable.

> Compare with the Internet search: it almost always brings me hundreds
> of hits, but I normally find what I was after among the first dozen.
> Even more spectacularly, when I type a search phrase into the search
> box, it guesses what my search phrase will be, and the guesses are
> almost always very accurate, so much so that if I don't see a long
> enough list of reasonable candidates, I usually go looking for some
> typo in what I typed (and almost always find it).  Some of the
> candidates are based on my previous search phrases, and the ones I
> typed are always ready to be reused, with a special indication to let
> me know I recently used them.

Right. There's some benefit in that. But also note that Internet 
searches can't really use fuzzy matching, at all. I'd venture to say 
that it will be difficult to combine fuzzy searches and historical 
scoring, too.



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: handling many matches
  2020-05-02 16:13         ` Dmitry Gutov
@ 2020-05-02 16:31           ` Eli Zaretskii
  2020-05-02 16:58             ` Dmitry Gutov
  0 siblings, 1 reply; 16+ messages in thread
From: Eli Zaretskii @ 2020-05-02 16:31 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: jonas, emacs-devel, monnier, adam, kyle, drew.adams

> Cc: drew.adams@oracle.com, monnier@iro.umontreal.ca, jonas@bernoul.li,
>  emacs-devel@gnu.org, philippe.vaucher@gmail.com, adam@alphapapa.net,
>  kyle@kyleam.com
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Sat, 2 May 2020 19:13:18 +0300
> 
> On 02.05.2020 16:52, Eli Zaretskii wrote:
> 
> > If by "look" you mean to the user, then I envision a list of
> > completion candidates that somehow "knows" what I'm after, and places
> > those likely guesses near the beginning of the list.
> 
> All fuzzy completion systems do that. Generally by scoring how well each 
> string resembles the input string.

That criterion alone is not enough, IME.  It is also important
(sometimes much more important) what I'm doing, in what major mode,
my previous completion attempts, etc.

> > Like I said, I think the hopes it will deliver a significant enough
> > improvement are overrated.  It will certainly bloat the lists of
> > candidates by factors, which is why I think it isn't a very good idea
> > as long as we don't have some smart scoring of candidates.
> 
> The amount of "bloat" will be strictly limited by the number of aliases 
> we add.

Yes, and I tend to think we will add a lot.

> I think there's a general agreement that we shouldn't go overboard.

Even if there is such an agreement, I'm not sure we will be able to
keep ourselves from going overboard.

> > We need scoring that "learns" from what I do/did recently,
> > and from my habits.  Otherwise the list of candidates will remain
> > hopelessly long, with no promise of having what I'm really looking for
> > anywhere near the beginning.
> 
> There are systems like that, including in third-party Emacs packages. 
> Personally, I'm not fond of the idea (the unpredictability, first of 
> all), and I'd rather we polish the current scoring algo first.

When the first few candidates are what I want, predictability goes out
the window.  I'm a happy user when I find what I'm looking for fast.



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: handling many matches
  2020-05-02 16:31           ` Eli Zaretskii
@ 2020-05-02 16:58             ` Dmitry Gutov
  2020-05-02 17:25               ` Eli Zaretskii
  0 siblings, 1 reply; 16+ messages in thread
From: Dmitry Gutov @ 2020-05-02 16:58 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: jonas, emacs-devel, monnier, adam, kyle, drew.adams

On 02.05.2020 19:31, Eli Zaretskii wrote:

>> All fuzzy completion systems do that. Generally by scoring how well each
>> string resembles the input string.
> 
> That criterion alone is not enough, IME.  It is also important
> (sometimes much more important) what I'm doing, in what major mode,
> my previous completion attempts, etc.

Your argument here has merit. The difficulty is in writing an 
appropriate scoring algorithm.

The "what I'm doing" and "what major mode" conditions could be solved by 
pre-filtering in a lot of cases, though.

>>> Like I said, I think the hopes it will deliver a significant enough
>>> improvement are overrated.  It will certainly bloat the lists of
>>> candidates by factors, which is why I think it isn't a very good idea
>>> as long as we don't have some smart scoring of candidates.
>>
>> The amount of "bloat" will be strictly limited by the number of aliases
>> we add.
> 
> Yes, and I tend to think we will add a lot.

That's a self-defeating argument.

By the amount of resistance from your side, my impression so far is that 
we'll end up adding none (again).

>>> We need scoring that "learns" from what I do/did recently,
>>> and from my habits.  Otherwise the list of candidates will remain
>>> hopelessly long, with no promise of having what I'm really looking for
>>> anywhere near the beginning.
>>
>> There are systems like that, including in third-party Emacs packages.
>> Personally, I'm not fond of the idea (the unpredictability, first of
>> all), and I'd rather we polish the current scoring algo first.
> 
> When the first few candidates are what I want, predictability goes out
> the window.  I'm a happy user when I find what I'm looking for fast.

That rules out the "browsing an API" use case, when we need the "first 
20" or "first 40" candidates to be good.

IOW, the algorithms should be everything to everyone. Which is 
difficult, but we should try to approach it.



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: handling many matches
  2020-05-02 16:58             ` Dmitry Gutov
@ 2020-05-02 17:25               ` Eli Zaretskii
  2020-05-02 18:17                 ` Dmitry Gutov
  0 siblings, 1 reply; 16+ messages in thread
From: Eli Zaretskii @ 2020-05-02 17:25 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: jonas, emacs-devel, monnier, adam, kyle, drew.adams

> Cc: drew.adams@oracle.com, monnier@iro.umontreal.ca, jonas@bernoul.li,
>  emacs-devel@gnu.org, philippe.vaucher@gmail.com, adam@alphapapa.net,
>  kyle@kyleam.com
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Sat, 2 May 2020 19:58:08 +0300
> 
> >>> Like I said, I think the hopes it will deliver a significant enough
> >>> improvement are overrated.  It will certainly bloat the lists of
> >>> candidates by factors, which is why I think it isn't a very good idea
> >>> as long as we don't have some smart scoring of candidates.
> >>
> >> The amount of "bloat" will be strictly limited by the number of aliases
> >> we add.
> > 
> > Yes, and I tend to think we will add a lot.
> 
> That's a self-defeating argument.
> 
> By the amount of resistance from your side, my impression so far is that 
> we'll end up adding none (again).

Read my lips: I do NOT resist.  I'm warning the enthusiasts that they
might end up with a situation that is not better and potentially worse
than what we have today, and that the existing C-h commands will still
need to be used a lot to make any sense out of the results.

Other than that, feel free to propose any number of aliases that you
think might make sense.  I promise not to object, just make comments
and speak my opinions about the proposed aliases.

> > When the first few candidates are what I want, predictability goes out
> > the window.  I'm a happy user when I find what I'm looking for fast.
> 
> That rules out the "browsing an API" use case, when we need the "first 
> 20" or "first 40" candidates to be good.

Yes, because that use case shouldn't be served by completion, IMO.  If
someone wants a complete list of APIs, we should present the list of
APIs.  Completion is for _using_ one of the candidates, not about
looking through the entire list.



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: handling many matches
  2020-05-02 17:25               ` Eli Zaretskii
@ 2020-05-02 18:17                 ` Dmitry Gutov
  2020-05-02 18:31                   ` Eli Zaretskii
  0 siblings, 1 reply; 16+ messages in thread
From: Dmitry Gutov @ 2020-05-02 18:17 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: jonas, emacs-devel, monnier, adam, kyle, drew.adams

On 02.05.2020 20:25, Eli Zaretskii wrote:
> Other than that, feel free to propose any number of aliases that you
> think might make sense.  I promise not to object, just make comments
> and speak my opinions about the proposed aliases.

Very good. We should indeed pick and choose. And we've already done a 
lot of that in another thread.

> Yes, because that use case shouldn't be served by completion, IMO.  If
> someone wants a complete list of APIs, we should present the list of
> APIs.  Completion is for_using_  one of the candidates, not about
> looking through the entire list.

It's about finding it, though. The best one for one's purpose.

We don't have ideal options anyway: the manual is verbose, you have to 
skip a lot of text, and it doesn't cover *all* the functions available, 
just the basics defined in the core library.

Apropos is exhaustive, but unsorted.



^ permalink raw reply	[flat|nested] 16+ messages in thread

* RE: handling many matches
       [not found]       ` <<83wo5usaui.fsf@gnu.org>
@ 2020-05-02 18:21         ` Drew Adams
  2020-05-02 18:34           ` Eli Zaretskii
       [not found]         ` <<14f6ff0f-afcc-5cc2-b8ce-491209c1e739@yandex.ru>
  1 sibling, 1 reply; 16+ messages in thread
From: Drew Adams @ 2020-05-02 18:21 UTC (permalink / raw)
  To: Eli Zaretskii, Dmitry Gutov
  Cc: jonas, emacs-devel, monnier, adam, kyle, drew.adams

> We need scoring that "learns" from what I do/did recently,
> and from my habits....
> 
> Compare with the Internet search: it almost always brings me hundreds
> of hits, but I normally find what I was after among the first dozen.

Relatively little of that power/accuracy comes
from it learning from your habits (your previous
searches etc.).  It mostly comes from back links,
i.e., how many links a URL has from other URLs.

Of course, links among web pages in turn reflect
user use patterns (including searches).  But not
just your own use patterns.

But yes, your and my search of the same words
will return different hits.  There is some input
from our individual past uses of the internet
and the search engine.

> Even more spectacularly, when I type a search phrase into the search
> box, it guesses what my search phrase will be, and the guesses are
> almost always very accurate,...  Some of the candidates are based
> on my previous search phrases, and the ones I typed are always ready 
> to be reused, with a special indication to let me know I recently
> used them.

Yes.  All of that can be food for thought for Emacs.
We already incorporate something similar with things
like dabbrev and library `completion.el'.  And even
minibuffer completion incorporates it in some cases,
promoting recent input history.

> It is this kind of powerful scoring that I think we need to develop if
> we are going to handle many dozens of completion candidates.

Yes and no.  Frequency of use and recency of use
are two (different) scoring criteria.  There are
_lots_ of different ways to score and sort.

So then you have the problem of how to tell
Emacs, in any given completion context, just
what to favor.

All of this is good to have.  And we need good
ways to choose among such possibilities,
including on the fly.



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: handling many matches
  2020-05-02 18:17                 ` Dmitry Gutov
@ 2020-05-02 18:31                   ` Eli Zaretskii
  2020-05-02 18:39                     ` Dmitry Gutov
  0 siblings, 1 reply; 16+ messages in thread
From: Eli Zaretskii @ 2020-05-02 18:31 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: jonas, emacs-devel, monnier, adam, kyle, drew.adams

> Cc: drew.adams@oracle.com, monnier@iro.umontreal.ca, jonas@bernoul.li,
>  emacs-devel@gnu.org, philippe.vaucher@gmail.com, adam@alphapapa.net,
>  kyle@kyleam.com
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Sat, 2 May 2020 21:17:57 +0300
> 
> Apropos is exhaustive, but unsorted.

Then let's sort it.  The question is only: what is the key?



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: handling many matches
  2020-05-02 18:21         ` handling many matches Drew Adams
@ 2020-05-02 18:34           ` Eli Zaretskii
  0 siblings, 0 replies; 16+ messages in thread
From: Eli Zaretskii @ 2020-05-02 18:34 UTC (permalink / raw)
  To: Drew Adams; +Cc: jonas, emacs-devel, monnier, dgutov, adam, kyle, drew.adams

> Date: Sat, 2 May 2020 11:21:36 -0700 (PDT)
> From: Drew Adams <drew.adams@oracle.com>
> Cc: drew.adams@oracle.com, monnier@iro.umontreal.ca, jonas@bernoul.li,
>         emacs-devel@gnu.org, philippe.vaucher@gmail.com, adam@alphapapa.net,
>         kyle@kyleam.com
> 
> > Compare with the Internet search: it almost always brings me hundreds
> > of hits, but I normally find what I was after among the first dozen.
> 
> Relatively little of that power/accuracy comes
> from it learning from your habits (your previous
> searches etc.).  It mostly comes from back links,
> i.e., how many links a URL has from other URLs.

AFAIK, this is outdated.  It's how search engines worked several years
ago.  They are much smarter nowadays.

> Of course, links among web pages in turn reflect
> user use patterns (including searches).  But not
> just your own use patterns.

I have evidence that my personal details and previous searches do
affect the results.



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: handling many matches
  2020-05-02 18:31                   ` Eli Zaretskii
@ 2020-05-02 18:39                     ` Dmitry Gutov
  2020-05-02 18:46                       ` Eli Zaretskii
  0 siblings, 1 reply; 16+ messages in thread
From: Dmitry Gutov @ 2020-05-02 18:39 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: jonas, emacs-devel, monnier, adam, kyle, drew.adams

On 02.05.2020 21:31, Eli Zaretskii wrote:
> Then let's sort it.  The question is only: what is the key?

Relevance to input, for example.

But how will we determine it, you will ask? For instance, by seeing 
where the search words are in the each listed name. If they are close to 
the beginning, assign higher scores.

As you can see, this will fit namespace-based naming quite well.



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: handling many matches
  2020-05-02 18:39                     ` Dmitry Gutov
@ 2020-05-02 18:46                       ` Eli Zaretskii
  2020-05-02 21:11                         ` Dmitry Gutov
  0 siblings, 1 reply; 16+ messages in thread
From: Eli Zaretskii @ 2020-05-02 18:46 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: jonas, emacs-devel, monnier, adam, kyle, drew.adams

> Cc: drew.adams@oracle.com, monnier@iro.umontreal.ca, jonas@bernoul.li,
>  emacs-devel@gnu.org, philippe.vaucher@gmail.com, adam@alphapapa.net,
>  kyle@kyleam.com
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Sat, 2 May 2020 21:39:06 +0300
> 
> On 02.05.2020 21:31, Eli Zaretskii wrote:
> > Then let's sort it.  The question is only: what is the key?
> 
> Relevance to input, for example.
> 
> But how will we determine it, you will ask? For instance, by seeing 
> where the search words are in the each listed name. If they are close to 
> the beginning, assign higher scores.

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.



^ permalink raw reply	[flat|nested] 16+ messages in thread

* RE: handling many matches
       [not found]           ` <<83o8r6qj8a.fsf@gnu.org>
@ 2020-05-02 19:18             ` Drew Adams
  0 siblings, 0 replies; 16+ messages in thread
From: Drew Adams @ 2020-05-02 19:18 UTC (permalink / raw)
  To: Eli Zaretskii, Drew Adams
  Cc: jonas, emacs-devel, monnier, dgutov, adam, kyle, drew.adams

> > Relatively little of that power/accuracy comes
> > from it learning from your habits (your previous
> > searches etc.).  It mostly comes from back links,
> > i.e., how many links a URL has from other URLs.
> 
> AFAIK, this is outdated.  It's how search engines
> worked several years ago.  They are much smarter nowadays.

"Relatively" is the key word there.  And "mostly".

> > Of course, links among web pages in turn reflect
> > user use patterns (including searches).  But not
> > just your own use patterns.
> 
> I have evidence that my personal details and previous searches do
> affect the results.

Did you read where I acknowledged that?  Clearly
the search engine's knowledge of you, your location,
your search history, your browser history, etc.
have a large influence on what hits you get and the
order you see them presented.

Regardless, your and my searches, in general, will
have a lot of hits in common, and so will the order.



^ permalink raw reply	[flat|nested] 16+ messages in thread

* RE: handling many matches
       [not found]                       ` <<83imheqin8.fsf@gnu.org>
@ 2020-05-02 19:51                         ` Drew Adams
  0 siblings, 0 replies; 16+ messages in thread
From: Drew Adams @ 2020-05-02 19:51 UTC (permalink / raw)
  To: Eli Zaretskii, Dmitry Gutov
  Cc: jonas, emacs-devel, monnier, adam, kyle, drew.adams

> 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).



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: handling many matches
  2020-05-02 18:46                       ` Eli Zaretskii
@ 2020-05-02 21:11                         ` Dmitry Gutov
  0 siblings, 0 replies; 16+ messages in thread
From: Dmitry Gutov @ 2020-05-02 21:11 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: jonas, emacs-devel, monnier, adam, kyle, drew.adams

On 02.05.2020 21:46, Eli Zaretskii wrote:
>> Relevance to input, for example.
>>
>> But how will we determine it, you will ask? For instance, by seeing
>> where the search words are in the each listed name. If they are close to
>> the beginning, assign higher scores.
> 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.

It's rarely 100% irrelevant. Or else that would mean we have some 
nonsensical names.

But apparently you have some other algorithm in mind. Though I don't 
know what it is.



^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2020-05-02 21:11 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <<119c0543-387d-4fad-b7fe-b4e07a7be4f8@default>
     [not found] ` <<d9f15b2a-d8b3-0c84-b7da-65aa30082e57@yandex.ru>
     [not found]   ` <<837dxuvohj.fsf@gnu.org>
     [not found]     ` <<f56f84c9-80ac-18f0-35fb-49034122853e@yandex.ru>
     [not found]       ` <<83wo5usaui.fsf@gnu.org>
2020-05-02 18:21         ` handling many matches Drew Adams
2020-05-02 18:34           ` Eli Zaretskii
     [not found]         ` <<14f6ff0f-afcc-5cc2-b8ce-491209c1e739@yandex.ru>
     [not found]           ` <<83y2qaqoxi.fsf@gnu.org>
     [not found]             ` <<5f531674-88b2-55fd-a677-7cbd57a62b91@yandex.ru>
     [not found]               ` <<83tv0yqmeq.fsf@gnu.org>
     [not found]                 ` <<e8e5136a-129b-0588-1e2d-74a9950899be@yandex.ru>
     [not found]                   ` <<83pnbmqjcz.fsf@gnu.org>
     [not found]                     ` <<beb7562b-f05c-0f8c-64ca-f6ce78f4d779@yandex.ru>
     [not found]                       ` <<83imheqin8.fsf@gnu.org>
2020-05-02 19:51                         ` Drew Adams
     [not found] <<<119c0543-387d-4fad-b7fe-b4e07a7be4f8@default>
     [not found] ` <<<d9f15b2a-d8b3-0c84-b7da-65aa30082e57@yandex.ru>
     [not found]   ` <<<837dxuvohj.fsf@gnu.org>
     [not found]     ` <<<f56f84c9-80ac-18f0-35fb-49034122853e@yandex.ru>
     [not found]       ` <<<83wo5usaui.fsf@gnu.org>
     [not found]         ` <<db6f7655-0562-4eb1-a8a2-52f194f44471@default>
     [not found]           ` <<83o8r6qj8a.fsf@gnu.org>
2020-05-02 19:18             ` Drew Adams
2020-05-01 17:20 handling many matches [was: [ELPA] New package: transient] Drew Adams
2020-05-01 22:16 ` Dmitry Gutov
2020-05-02  6:29   ` handling many matches Eli Zaretskii
2020-05-02 13:26     ` Dmitry Gutov
2020-05-02 13:52       ` Eli Zaretskii
2020-05-02 16:13         ` Dmitry Gutov
2020-05-02 16:31           ` Eli Zaretskii
2020-05-02 16:58             ` Dmitry Gutov
2020-05-02 17:25               ` Eli Zaretskii
2020-05-02 18:17                 ` Dmitry Gutov
2020-05-02 18:31                   ` Eli Zaretskii
2020-05-02 18:39                     ` Dmitry Gutov
2020-05-02 18:46                       ` Eli Zaretskii
2020-05-02 21:11                         ` Dmitry Gutov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).