summaryrefslogtreecommitdiff
path: root/README.org
blob: a3b7567a03ea7394b6f2d6fdca7c1fdc6352856f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
* Overview

This package provides an =orderless= completion style that divides the
pattern into space-separated components, treats each one as a regexp,
and matches canidates that match all of the component regexps in any
order.

Completion styles are used as entries in the variables
=completion-styles= and =completion-category-overrides=, see their
documentation.

So to test this completion method you can put =orderless.el= somewhere
on your =load-path=, and use the following configuration:

#+begin_src emacs-lisp
(require 'orderless)
(setq completion-styles '(orderless))
#+end_src

Bug reports are highly welcome and appreciated!

* Customization

** Component separator regexp

The regexp components by default are space-separated, but this is
controlled by the variable =orderless-regexp-separator=, which should be
set to a regexp that matches the desired component separator. The
default value matches a sequence of spaces. It may be useful to add
hypens or slashes (or both), to match symbols or file paths,
respectively.

If you are implementing a command for which you know you want a
different separator for the components, bind
=orderless-regexp-separator= in a =let= form.

** Faces for component matches 

The portions of a candidate matching each component get highlighted in
one of four faces, =orderless-math-face-?= where =?= is a number from 0
to 3. If the pattern has more than four components, the faces get
reused cyclically.