radian-software / prescient.el

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

Support `completion-lazy-hilit` and `completion-lazy-hilit-fn` for Emacs 30. #153

Closed okamsn closed 9 months ago

okamsn commented 10 months ago

This feature allows highlighting to occur later instead of being performed by the completion style immediately.

See:

okamsn commented 9 months ago

Can we really label the variable as obsolete if it is still needed in older Emacs versions which we still support?

Perhaps it would be better to use the new variable if available, but otherwise fall back to prescient-completion-highlight-matches, until we stop supporting versions of Emacs that don't have the new variable?

That seems reasonable to me. I tried searching for uses of it on GitHub, but didn't find any.

How does it look now?

minad commented 9 months ago

Perhaps it would be better to use the new variable if available, but otherwise fall back to prescient-completion-highlight-matches, until we stop supporting versions of Emacs that don't have the new variable?

That seems reasonable to me. I tried searching for uses of it on GitHub, but didn't find any.

completion-lazy-hilit can be used even on old versions of Emacs, see the implementation of Vertico. Given that prescient-completion-highlight-matches is not used anywhere one can as well remove the variable. It doesn't really function as a fallback for lazy highlighting.

On the other hand it may make sense to keep the variable as is, such that it always disables highlighting completely (even if completion-lazy-hilit is set). This would preserve the current meaning and could be helpful if users don't want highlighting at all.

How does it look now?

Looks good to me!

raxod502 commented 9 months ago

I tried searching for uses of it on GitHub, but didn't find any.

Yea, I would just be worried because it's actually kind of uncommon for people to put their Emacs configs on the public internet, there are a lot, but probably the vast majority are just on people's laptops or private servers.