selectrum: drop foo! orderless style dispatch

conflicts with `!` final macros.
also elaborate why we should drop the prescient flag
This commit is contained in:
Itai Y. Efrat 2021-05-20 22:09:41 +03:00
parent 747f1e38b3
commit 308c6798d3
3 changed files with 10 additions and 11 deletions

View file

@ -147,13 +147,14 @@ A wgrep buffer can be opened from ~consult-line~ with =C-c C-e= (not yet).
** Orderless filtering ** Orderless filtering
When using orderless to filter through candidates, the default behaviour is for When using orderless to filter through candidates, the default behaviour is for
each space separated inputs to match the candidate as a regular expression or each space separated input to match the candidate as a regular expression or
literally. literally.
You can further specify each space separated input in the following ways: Doom has some builtin [[https://github.com/oantolin/orderless#style-dispatchers][style dispatchers]] for more finegrained filtering, which
you can use to further specify each space separated input in the following ways:
| Input | Description | | Input | Description |
|------------------+--------------------------------------------| |------------------+--------------------------------------------|
| =!foo= or =foo!= | match without literal input =foo= | | =!foo= | match without literal input =foo= |
| =`bar= or =bar`= | match input =bar= as an initialism | | =`bar= or =bar`= | match input =bar= as an initialism |
| ==baz= or =baz== | match only with literal input =baz= | | ==baz= or =baz== | match only with literal input =baz= |
| =~qux= or =qux~= | match input =qux= with fuzzy/flex matching | | =~qux= or =qux~= | match input =qux= with fuzzy/flex matching |

View file

@ -5,6 +5,10 @@ Idealy would replace =C-o= as the default binding. Current suggestion is both
=:leader a= and =C-,=. Note that =C-,= is bound to ~org-cycle-agenda-files~ but =:leader a= and =C-,=. Note that =C-,= is bound to ~org-cycle-agenda-files~ but
so is =C-'=. so is =C-'=.
** TODO consider dropping prescient flag ** TODO consider dropping prescient flag
The only advantage over orderless is frecency over recency, without the better
integration orderless has with built in emacs completion. A compromise might be
to have ~+prescient~ just add prescient sorting, but it's probably not worth the
maintenance burden.
** TODO =SPC s s= and =SPC s S= ~:sw~ ? ** TODO =SPC s s= and =SPC s S= ~:sw~ ?
There isn't really a selectrum analogue to ~swiper-isearch~, ~consult-isearch~ There isn't really a selectrum analogue to ~swiper-isearch~, ~consult-isearch~
does something else (give you previously used isearch search terms). Bound to does something else (give you previously used isearch search terms). Bound to
@ -12,13 +16,8 @@ regular isearch for now.
** TODO =SPC s B= ** TODO =SPC s B=
Selectrum/Consult don't have a ~swiper-all~ analogue either. Unbound for now. Selectrum/Consult don't have a ~swiper-all~ analogue either. Unbound for now.
** TODO orderless style dispatchers ** TODO orderless style dispatchers
currently we just copy the ones of the consult wiki (sans file extentions), but Currently the =!= style dispatcher is only as a prefix, due to the abundance of
these lead to an unexpected issue: typing e.g. =setq!= will not match ~setq!~ =!= final macros. In my opinion this is useful enough to break consistency.
due to the postfix without literal match (you need to type =setq!==). This is
undesireable since doom uses a lot of macros that end with =!=. Having the
dispatching work in both post and prefix is useful (since it lets you do
post-hoc changes to your typing), but having a one-off extention is inconsistant
* PROJ HACKs to be addressed * PROJ HACKs to be addressed
** ~fboundp~ issues ** ~fboundp~ issues
Even if the =ivy= module isn't loaded, it's packages can still get loaded by Even if the =ivy= module isn't loaded, it's packages can still get loaded by

View file

@ -55,7 +55,6 @@
((string= "!" pattern) `(orderless-literal . "")) ((string= "!" pattern) `(orderless-literal . ""))
;; Without literal ;; Without literal
((string-prefix-p "!" pattern) `(orderless-without-literal . ,(substring pattern 1))) ((string-prefix-p "!" pattern) `(orderless-without-literal . ,(substring pattern 1)))
((string-suffix-p "!" pattern) `(orderless-without-literal . ,(substring pattern 0 -1)))
;; Initialism matching ;; Initialism matching
((string-prefix-p "`" pattern) `(orderless-initialism . ,(substring pattern 1))) ((string-prefix-p "`" pattern) `(orderless-initialism . ,(substring pattern 1)))
((string-suffix-p "`" pattern) `(orderless-initialism . ,(substring pattern 0 -1))) ((string-suffix-p "`" pattern) `(orderless-initialism . ,(substring pattern 0 -1)))