radian-software / prescient.el

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

Vertico Prescient: Change how candidates are remembered. #156

Closed okamsn closed 9 months ago

okamsn commented 10 months ago
minad commented 10 months ago

This looks quite solid to me. I suggest to move most of the remember code (the hooks etc) to prescient.el and then only configure the trigger commands in vertico-prescient.el, such that the generic parts are reusable and the integration packages are as thin as possible.

leungbk commented 10 months ago

Thank you for the PR!

I can confirm that this fixes the unexpected behavior I pointed out in #155.

okamsn commented 10 months ago

This looks quite solid to me. I suggest to move most of the remember code (the hooks etc) to prescient.el and then only configure the trigger commands in vertico-prescient.el, such that the generic parts are reusable and the integration packages are as thin as possible.

I will try that. There is the new completions-sort variable, so maybe the default UI can finally support Prescient.

okamsn commented 10 months ago

This looks quite solid to me. I suggest to move most of the remember code (the hooks etc) to prescient.el and then only configure the trigger commands in vertico-prescient.el, such that the generic parts are reusable and the integration packages are as thin as possible.

I will try that. There is the new completions-sort variable, so maybe the default UI can finally support Prescient.

For time reasons, I've decided to investigate simplifying that part later in favor of fixing this particular bug now. Does anyone want any changes to how this is written, outside of generalizing it later?