help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: merging results from completion-at-point-functions


From: Ergus
Subject: Re: merging results from completion-at-point-functions
Date: Sun, 1 May 2022 01:48:08 +0200

On Fri, Apr 29, 2022 at 04:52:21PM -0400, Stefan Monnier via Users list for the 
GNU Emacs text editor wrote:
(setq-local completion-at-point-functions
    (list (cape-super-capf #'cape-dabbrev #'cape-dict #'cape-keyword)))

Note that this sets up these CAPF functions only for the buffer that's
current when the code is executed, so if you put it into your .emacs
it's probably going to affect completions in *scratch* only.

(setq my-merged-table (completion-table-merge #'cap-dabbrev
#'cape-dict))

I don't think so: `cape-dabbrev` is a CAPF function, not a completion table.


       Stefan


Hi Stefan...

Maybe a bit off-topic... but somehow related:

Is it there a way to show the current capf backend for example in the
mode-line?? Company has such thing, and it may be useful for example, to
know which completion-at-point-functions is working better than
others... Because sometimes different functions generate similar
outputs and it may be useful to know which are the one in use, specially
when exclusive is false in some of them.

Any Idea?
Best,
Ergus.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]