Skip to content

prescient.el 6.0

Compare
Choose a tag to compare
@raxod502 raxod502 released this 12 Nov 03:45
· 21 commits to main since this release

Bugs fixed

  • Toggling off filter methods no longer accidentally changes the global value of prescient-filter-method. See #123, #124.
  • For character folding, if char-fold-table isn't bound, we require the library char-fold. This variable apparently isn't always loaded when we call char-fold-to-regexp. See #126.
  • Fix the filter methods literal and literal-prefix not being literal when prescient-use-char-folding was nil. This bug was added with that user option. See #127.

New features

  • Add new function prescient-sort-full-matches-first which implements the option. This feature already existed, but moving to a separate function makes it easier to support in more UIs. See #125.
  • Add a completion style prescient. This completion style can be used in the variable completion-styles. This completion style works with UIs like Emacs's built-in minibuffer completion, Icomplete, and Vertico. See various discussions in #125, #120, #112, #89, #58, and #54.
  • Add new function prescient-completion-sort, which combines prescient-sort with the new function prescient-sort-full-matches-first. See #125. This function is meant to be used after filtering and as the sorting function of your preferred completion UI. Note that sorting fully matched candidates before partially matched candidates only works for candidates filtered by the prescient completion style.
  • Added user option prescient-completion-highlight-matches, which determines whether the completion style highlights the matching parts of candidates with the above new faces (#125).
  • Add faces prescient-primary-highlight and prescient-secondary-highlight (#125). These faces are used with the completion style and selectrum-prescient.el. The old faces selectrum-prescient-primary-highlight and selectrum-prescient-secondary-highlight are now obsolete aliases of these faces.

Enhancements

  • prescient-filter now supports filtering candidates from Emacs's more generic "completion tables", not just lists of strings (#125). However, like with some other completion styles, it does not work well with certain dynamic completion tables that use a prefix string to produce candidates before filtering. To work around this, it is recommended to include the basic style after the prescient style in the user option completion-styles.

Internal Changes

  • prescient-filter now uses the C function all-completions instead of being completely written in Emacs Lisp. This should make it a bit faster. See #125.