[Top][All Lists]

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

enabling company-capf support in cfengine.el (was: Emacs completion matc

From: Ted Zlatanov
Subject: enabling company-capf support in cfengine.el (was: Emacs completion matches selection UI)
Date: Sun, 22 Dec 2013 17:50:21 -0500
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux)

On Sun, 22 Dec 2013 18:07:01 +0200 Dmitry Gutov <address@hidden> wrote: 

DG> Stefan Monnier <address@hidden> writes:
>>> `company-capf' is not in `company-backends' by default, though.
>> Could you fix that, please?

DG> Okay, it'll be there in the next release.

DG> I had a few reservations about it, but the outward inefficiency of
DG> calling all capf functions each time we issue a backend command
DG> shouldn't be slow enough to notice in practice, and the Emacs 24
DG> requirement can be taken care of by checking the version at load time.

DG> By the way, do you think `lisp-completion-at-point' now has feature
DG> parity with `company-elisp'? We could replace the latter with
DG> `company-capf' depending on the Emacs version, but I'm not sure where to
DG> make the cutoff. If it's just Emacs 24, the users of 24.1-24.3 will miss
DG> out on features. If it's 24.4, CFEngine completion integration with
DG> Company won't work with earlier versions.

DG> The last point might be a problem for Ted anyway, though, since CFEngine
DG> seems to support the earlier Emacs versions.

Not a problem.  I maintain two versions of cfengine.el: one in
https://github.com/cfengine/core/blob/master/contrib/cfengine.el which
maintains backwards compatibility and can miss new features, and one in
the Emacs trunk, which doesn't try to maintain compatibility.  So any
cool new things go into the Emacs trunk and then I will try to backport

Anyhow, right now I do this in `cfengine3-mode':

#+begin_src lisp
  (add-hook 'completion-at-point-functions
            #'cfengine3-completion-function nil t)

Is that enough?  I can recommend to users that they should enable the
`company-capf' backend in the cfengine.el docs, if so.


reply via email to

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