radian-software / prescient.el

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

Selectrum-prescient and Org-roam #117

Closed joshcho closed 2 years ago

joshcho commented 2 years ago

selectrum-prescient works really well, except in org-roam-node-find for org-roam. I have found ivy-prescient has the desired behavior, but selectrum-prescient doesn't (it simply sorts by timestamp of creation, not by frecency). Perhaps this is a selectrum issue?

okamsn commented 2 years ago

If the completion candidates specify their own sorting function, then Selectrum will not use its custom preprocessing setting (Prescient sorting, in this case). That Ivy with Prescient ignores the candidates' specified sorting function is more probably a bug in Ivy-Prescient.

I have not used Org Roam, but have you tried setting org-roam-node-default-sort to nil? It looks like the default is to sort by file modification time, but if it is nil, then I think that Prescient sorting should be applied by Selectrum for those candidates.

joshcho commented 2 years ago

Perfect, that worked well. Thank you!