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: Eric Abrahamsen
Subject: Re: merging results from completion-at-point-functions
Date: Fri, 29 Apr 2022 11:26:13 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> Hi Eric,
>
> thank you for the quick response.
>
> On Friday, 29 Apr 2022 at 08:08, Eric Abrahamsen wrote:
>> Two possibilities: since you're using cape, use `cape-super-capf' to
>> merge a bunch of cape capf functions into one.
>
> First of all, apologies: this is in the cape documentation which I
> forgot to look at again.  Nevertheless, this doesn't work at all.  If I
> do
>
> (setq-local completion-at-point-functions
>     (list (cape-super-capf #'cape-dabbrev #'cape-dict #'cape-keyword)))
>
> when visiting an appropriate file, as the web page
> (https://github.com/minad/cape) suggests, nothing happens when invoking
> completion-at-point.

Sounds like some kind of bug, then. I'd check the github issues (several
of the closed issues are about super capes) and maybe open a new one.

>> Other possibility: use `completion-table-merge' in exactly the same way.
>
> This one I cannot figure out how to use.  My elisp-fu is obviously not
> up to scratch. :-(

No worries! It's supposed to work the same way:

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

(setq-local completion-at-point-functions (list #'my-merged-table))

That appears to be working for me (at least, it raises a "lookup-words"
error from `cape-dict', so at least it's *trying* to work).

Eric





reply via email to

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