-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It's not possible to filter candidates that contain a similar string more than once #88
Comments
Thanks for the detailed report. Yes, everything you said is exactly right. The reason for the current behavior is that I think we would need to revise the interface for |
Yeah, that's what I thought. that out of order matching was the reason for this behavior. I've been thinking about a solution so I'd be happy to lend a hand. Have you thought about adding testing? |
I of course have no objection to adding testing, but have not so far simply because the package in the past was not very complex. It seems to be growing in complexity, and might therefore warrant some tests being added. I will admit, embarrassingly enough, that almost all the tests in my packages have been added by other people thus far. You could look at radian-software/straight.el#603 and radian-software/apheleia#26 for some examples. In terms of the approach, I am thinking it would make sense for a filter function to get all of the information that could be needed, in a simple format without preprocessing or postprocessing. There would then be some duplicated code between all the filter functions, which could be eliminated by providing a utility function that would "do the normal thing" (with out of order matching and such) given a regexp generator like we have in our current filter functions. |
When using selectrum with prescient I'm unable to find the command projectile-switch-project with the query pro pr.
My reasoning is:
The issue seems to bee in the prescient-filter method:
https://github.com/raxod502/prescient.el/blob/42adc802d3ba6c747bed7ea1f6e3ffbbdfc7192d/prescient.el#L536
Here all the regex are matched independently so there is no way to do this.
I've created some tests to explain it better:
The text was updated successfully, but these errors were encountered: