Skip to content

Support orderless annotation and kwd matchers. #17052

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

mijoharas
Copy link
Contributor

Orderless has a few new matchers that are quite useful. The kwd matcher provides a lot of different ones based on different modes, and the annotation matcher with & allows you to match against all marginalia annotations.

To enable this we need to change the component separators back to the default (which is a space not preceded by a backslash).

This could be left as a configuration option, but I figured the nicest solution was to use the default. People can override if they prefer the other behaviour.

It seems to have supported this for a bit over a year now.

Reference to orderless-kwd: https://github.com/oantolin/orderless/blob/master/orderless-kwd.el

and the base annotation matcher with &: https://github.com/oantolin/orderless?tab=readme-ov-file#style-dispatchers (orderless-annotation)

Orderless has a few new matchers that are quite useful. The kwd matcher provides
a lot of different ones based on different modes, and the annotation matcher
with `&` allows you to match against all marginalia annotations.

To enable this we need to change the component separators back to the
default (which is a space not preceded by a backslash).

This could be left as a configuration option, but I figured the nicest solution
was to use the default. People can override if they prefer the other behaviour.
@fnussbaum fnussbaum self-requested a review June 26, 2025 20:44
(It might be possible to replace the advice by defining a separate completion
style for in-buffer completion, see orderless-define-completion-style and
the discussion in minad/consult#1131.)
@fnussbaum
Copy link
Collaborator

Thanks, these matchers are indeed useful. I would prefer to keep the & separator for in-buffer completion though, where a space cannot be used. I pushed a suggested change to that end, what do you think?

(As mentioned in the commit message, it might be possible to replace the advice by defining a separate completion
style for in-buffer completion, see orderless-define-completion-style and the discussion in minad/consult#1131.)

@fnussbaum fnussbaum requested a review from bcc32 June 30, 2025 16:25
@mijoharas
Copy link
Contributor Author

Ahhhh! That's what it's for! For company. Seems good. I'll try and test this tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants