You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to replace helm by avy in my configuration, but I cannot live with proper support for matching parts of the input in any order.
As indicated in #296, ivy--regex-ignore-order behaves incorrectly. It was concluded that doing matching by building a regexp matching all the permutations would be prohibitively slow. I'd like to offer the following counter arguments:
If the user is willing to pay this cost, why not allow it?
Notwithstanding the above point, the conclusion was reached on the assumption that the cost of matching a regexp is proportional to the length of the regexp. However, a proper regexp matcher should not behave like this. I'm guessing that emacs' native matcher is 'bad', but one could use an efficient matcher. (There exists a 'good' elisp implementation: http://www.emacswiki.org/emacs/TaggedNFA)
Even using a slow matcher, one can implement matching-ignoring-order by filtering the candidates with each of the sub-expressions, in series. In fact, ivy--filter has already code to support this behaviour today:
unfortunately, several other places in the code assume that the regexp is a string. That is, if ivy--regex-ignore-order was to return a list, errors would be thrown.
Would it be reasonable to support list of regexps consistently?
Thanks for the feedback. I'll see what I can do. Yet, the first step will be to obtain a copyright assigment from my employer, so don't hold your breath :)
Activity
Konubinix commentedon Jan 2, 2016
jyp commentedon Jan 2, 2016
Thanks for the feedback. I'll see what I can do. Yet, the first step will be to obtain a copyright assigment from my employer, so don't hold your breath :)
abo-abo commentedon Jan 7, 2016
Thanks, please test.
Konubinix commentedon Jan 8, 2016