Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
minad committed Jan 20, 2024
1 parent 21e44fe commit b8b8e22
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -195,23 +195,23 @@ with ~cape-capf-super~.

Cape supports merging multiple Capfs using the function ~cape-capf-super~. This
feature is *EXPERIMENTAL* and should only be used carefully in special scenarios.
Due to some technical details, only a subset of Capfs can be merged. Merge Capfs
one by one and make sure that you get the desired outcome on each step.

Note that ~cape-capf-super~ is not needed if you want to use multiple Capfs which
are tried one after the other, for example you can use ~cape-file~ together with
programming mode Capfs by adding ~cape-file~ to the ~completion-at-point-functions~
list. File completion will then be available in comments and string literals,
but not in normal code. ~cape-capf-super~ is only necessary if you want to combine
multiple Capfs, such that the candidates from multiple sources appear /together/
in the completion list at the same time.

Capf merging works only for completion functions which are sufficiently
well-behaved and completion functions which do not define completion boundaries.
Due to some technical details, not all Capfs can be merged successfully. Merge
Capfs one by one and make sure that you get the desired outcome.

Note that ~cape-capf-super~ is not needed if multiple Capfs should betried one
after the other, for example you can use ~cape-file~ together with programming
mode Capfs by adding ~cape-file~ to the ~completion-at-point-functions~ list. File
completion will then be available in comments and string literals, but not in
normal code. ~cape-capf-super~ is only necessary if you want to combine multiple
Capfs, such that the candidates from multiple sources appear /together/ in the
completion list at the same time.

Capf merging requires completion functions which are sufficiently well-behaved
and completion functions which do not define completion boundaries.
~cape-capf-super~ has the same restrictions as ~completion-table-merge~ and
~completion-table-in-turn~. As a simple rule of thumb, ~cape-capf-super~ works only
for static completion functions like ~cape-dabbrev~, ~cape-keyword~, ~cape-dict~,
etc., but not for multi-step completions like ~cape-file~.
~completion-table-in-turn~. As a simple rule of thumb, ~cape-capf-super~ works for
static completion functions like ~cape-dabbrev~, ~cape-keyword~, ~cape-dict~, etc.,
but not for multi-step completions like ~cape-file~.

#+begin_src emacs-lisp
;; Merge the dabbrev, dict and keyword capfs, display candidates together.
Expand Down

0 comments on commit b8b8e22

Please sign in to comment.