emacs-devel
[Top][All Lists]
Advanced

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

Re: Why fido, icycles, ido, icomplete


From: João Távora
Subject: Re: Why fido, icycles, ido, icomplete
Date: Thu, 07 Nov 2019 10:09:15 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Óscar Fuentes <address@hidden> writes:

> João Távora <address@hidden> writes:

>> If so, and if flx adheres to the completion-styles API, then it's very
>> easy to plug in.  If it doesn't, maybe the author can find a way to
>> adapt it, just like Thierry did recently in Helm.
>
> Where can I learn about that completion-styles API?

In the emacs manual, but a lot in lisp/minibuffer.el.  Look at how the
other styles are implemented.  Also ask Stefan on this list.

>> You can also try 'flex' and tell me what you think you are missing from
>> flx.  I don't find flex "unbearably dumb" :-)
>
> I have experience with ido's flex and can't compare.

I wasn't talking about ído's flex, which is named
'ido-enable-flex-matching'.  So we don't lose ourselves, when I say
'flex' I am talking about:

    (setq completion-styles '(flex))
    (setq completion-category-defaults nil )

When I say 'flx', I am talking about "your" system (or the little I know
about it.)

> flx requires some
> training but then it is extremely effective. I no longer bother to
> memorize most keyboard shorcuts, because by just remembering *some* part
> of the command's name it can be easily invoked through M-x, often with
> less keypresses (and with much less chording). It is quite effective at
> discovering new commands, once you have an idea of the naming convention
> that a package uses. Last, but not least, it is the matching system used
> by some of the "cool kids" that competes with Emacs (Sublime Text, to
> name one).

I don't use the "cool kids" stuff, but I do use some completion boxes in
some other applications with flex matching.  I don't see any big
difference between 'flex' and those.

>> I like to type mispelled fragments of words I vaguely remember and it
>> almost always pops my intended thing to the top of the list.  But it
>> doesn't autocorrect like google, for example, that's much harder.  (does
>> flx?)
> If you need autocorrection with flx, you are using it wrong.

I don't use flx.  I gather it doesn't support autocorrection and neither
does 'flex'.  Great.  Or not.  Autocorrection is an advanced feature in
many systems, most prominently Google's.  The point there, I think, is
precisely that you CAN use it wrong, as humans frequently do.

Your description of your usage of flx matches exactly my usage of
'flex'.  However, the 'flex' scoring implementation is about 20 lines in
actual implementation, is controlled by a single variable
(flex-score-match-tightness).  'flx' seems like it's much much larger in
length, and considerably more sophisticated (I read warm-up cache,
heatmap, special-cases for certain characters, etc.).

I'm looking for your feedback in term of these kinds of statements

   "When I use 'flx' on the set X it gives me Y but 'flex' on the same
   set gives me Z"

If we find 'flx's result is more compelling, we can take steps to
approximate 'flex' to it.

> instance, with M-x and 20000+ candidates, four letters are almost always
> enough to put the target on the first 10 candidates. Said that, flx is
> somewhat forgiving about typos

Yes, but what kind of typos?  If I type "complwt", will it ever bring
"completion" as a match?  'flex' won't.

João



reply via email to

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