Comments (11)
I guess orderless-affix-dispatcher
is the most descriptive.
from orderless.
Editing the title to reflect the status of the discussion ;)
from orderless.
One could also make the dispatcher slightly more general with a configuration which allows you to configure prefix and suffix separately:
(defvar orderless-default-dispatch-affixes
`((?% ?% ,#'char-fold-to-regexp)
(?! nil ,#'orderless-without-literal)
(?, ?, ,#'orderless-initialism)
(nil ?= ,#'orderless-literal)
(nil ?~ ,#'orderless-flex)))
But that's probably overdoing it and users who want such special behavior can always write their own dispatcher. The goal here is to provide a simple dispatcher which would work for 90% of the users, in particular beginners starting with Orderless/Vertico etc.
from orderless.
Sure, I'll add it. I see no harm in adding such a dispatcher, it won't mess up the configuration of people who already have dispatchers set up (unless they add them to orderless-style-dispatchers
rather than setting the variable, but that seems very unlikely). I just need to document it and give orderless-default-dispatch-alist
a nice custom type.
from orderless.
Okay, great. I also think that the addition is not harmful, since it does not add much code. It should also resolve #83. The only thing which remains is the bikeshedding discussion regarding the name of the dispatcher.
orderless-affix-dispatcher
orderless-char-dispatcher
orderless-simple-dispatcher
orderless-default-dispatcher
- ...
What do you think?
from orderless.
Done. Please take a look at the docstring and changes to the manual, if you can, to see if things are clear.
from orderless.
@oantolin Thanks, looks good, except for two small details. I commented directly in the commit. Please take a look.
from orderless.
Thanks for pointing those out!
from orderless.
Btw, regarding length=
what do you think about using Compat? It won't be useful for Orderless, but it may make sense to take advantage of it in Embark. I use it in all my packages (including the smaller ones), but that's of course my personal bias.
It is used by the current development version of Magit (and other packages by Jonas). It will likely be used by Org too in the future, see https://lists.gnu.org/archive/html/emacs-orgmode/2023-01/msg00919.html. At this point the flood gates are open and Compat will be like an established standard library which is around anyway. This also makes sense given that Compat just implements parts of the standard library.
EDIT: Forgot to mention, I already added Compat to Marginalia.
from orderless.
I've been thinking about using it for Embark and maybe removing the embark-define-keymap
macro in favor of defvar-keymap
.
from orderless.
I've been thinking about using it for Embark and maybe removing the embark-define-keymap macro in favor of defvar-keymap.
Yes, it is good idea to get rid of this macro (better sooner than later). In retrospect it was a mistake to make this public. I've seen many downstream packages which integrated Embark support to start depending on Embark solely because of embark-define-keymap
. In all these cases I had to intercept when the packages got proposed for MELPA. Iirc it happened basically for every single package at their first Embark integration attempt. :-P
Multiple packages integrate with Embark now in the correct way, via only a few lines of with-eval-after-load
and without depending on Embark. See for example Prot's TMR, where I added support:
https://github.com/protesilaos/tmr/blob/9db3306908dbbeed948438c8a04445e98e684f68/tmr.el#L480-L505
from orderless.
Related Issues (20)
- Non-greedy match for orderless-flex? HOT 9
- Prescient defines a completion style
- How do I dispatch filtering on a suffix? HOT 3
- Ido or icomplete HOT 2
- Multiple matches, and/or over specifying candidates HOT 2
- I can't get the suggsted configuration for integration with Company to work. HOT 3
- Confusing highlighting when using `orderless-flex` style HOT 3
- Orderless with a single component HOT 3
- possible bug in completion style for repeated pattern HOT 12
- It doesn't seem to affect `C-x b` the same way as, e.g., `M-x` HOT 2
- I've been thinking about using it for Embark and maybe removing the `embark-define-keymap` macro in favor of `defvar-keymap`. HOT 1
- FEATURE REQUEST: Consider making your personal configuration the default (doc does not help get to that solution) HOT 9
- How to disable orderless for company or corfu HOT 8
- Get file basename? HOT 19
- Use company, orderless, company-fuzzy, auctex, and ispell all together. HOT 6
- Orderless doesn't work as desired. HOT 2
- Case sensitive matching HOT 4
- Add `orderless-limit` customizable variable HOT 8
- orderless and directories HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from orderless.