radian-software / prescient.el

☄️ Simple but effective sorting and filtering for Emacs.
MIT License
604 stars 25 forks source link

support char folding in literal filter #66

Closed d12frosted closed 4 years ago

d12frosted commented 4 years ago

This change enables support of char folding in literal filter. Makes it so much easier to filter Unicode characters.

For example, running the following code and typing buna in the mini-buffer matches both candidates if search-default-mode is set to char-fold-to-regexp. Otherwise only the last one would be matched.

(completing-read
 "greeting: "
 '("Bună dimineața"
   "Buna dimineata"))
image

WDYT?

d12frosted commented 4 years ago

One important note, it obeys the common rule - typing ă discards this feature making only the first candidate to match. Would be cool that prescient would treat case in a similar manner 😸

d12frosted commented 4 years ago

Regarding your comment to implement this functionality for all methods - I will take a look.

raxod502 commented 4 years ago

Sorry, I didn't mean to imply that you need to rework the whole thing to work for all methods. I just meant we might as well enable the feature unconditionally for literal searches.

d12frosted commented 4 years ago

pushed a change, if you wish, can squash my commits

raxod502 commented 4 years ago

Thank you!