emacs-devel
[Top][All Lists]
Advanced

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

RE: Feature branches review please (ivy hello)


From: Drew Adams
Subject: RE: Feature branches review please (ivy hello)
Date: Fri, 6 Nov 2020 08:30:01 -0800 (PST)

[Forwarding to the list, as it got dropped from
Reply All.]

> >> Again, please try (setq completion-styles (cons 'flex
> >> completion-styles)). With this "foo bar" matches both "foo bar" and
> >> "bar foo" (and also "far boo", "boo far", ...).
> >
> > Does it?
> 
> Hmmm, no, you're right, it doesn't.  I don't use that setting, I tried it
> briefly and wrongly concluded that it worked that way.  What would be
> needed is a "superflex" completion-style where characters can be given in
> any order ;-)

tl;dr: Matching without respect to order in
the target involves multiple separate matches.
___

What's usually called "flex" matching (Icicles
calls it "scatter") just matches bits of the
pattern you provide _in order_, one after the
other.  The matches are scattered throughout
the target, but they are _in order_ there.

To match multiple patterns without regard to
order in the target, you need to match the
patterns separately, each against the original
target or each against the result of previous
matching.

Icicles or library orderless.el provides such
behavior.

With Icicles, you can match a pattern (regexp,
fuzzy, flex, substring, whatever), and then you
can match another pattern ... etc.  Because the
component matches are separate the resulting
overall matches have those component matches in
any order.



reply via email to

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