From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: enabling company-capf support in cfengine.el (was: Emacs completion matches selection UI) Date: Sun, 22 Dec 2013 17:50:21 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87bo08bivm.fsf_-_@flea.lifelogs.com> References: <87fvqtg02v.fsf@flea.lifelogs.com> <87a9fylusq.fsf@flea.lifelogs.com> <878uvizrwz.fsf@uwakimon.sk.tsukuba.ac.jp> <8761qmkyn1.fsf@flea.lifelogs.com> <87zjnyxdpb.fsf@uwakimon.sk.tsukuba.ac.jp> <87k3f2j7xv.fsf@flea.lifelogs.com> <2518D79A-B9E4-45DF-A403-8330145DFD17@gmail.com> <87eh58j0x3.fsf@flea.lifelogs.com> <878uvg4ul2.fsf@yandex.ru> <87y53ghe94.fsf@flea.lifelogs.com> <87vbyk3497.fsf@yandex.ru> <87haa4gw69.fsf@flea.lifelogs.com> <87txe4usm1.fsf@yandex.ru> <87zjnvg2t2.fsf@flea.lifelogs.com> <87txe364q0.fsf@yandex.ru> <87r497fu0h.fsf@flea.lifelogs.com> <87haa1litl.fsf@yandex.ru> <87y53czx7e.fsf@yandex.ru> Reply-To: emacs-devel@gnu.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1387752554 772 80.91.229.3 (22 Dec 2013 22:49:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 22 Dec 2013 22:49:14 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 22 23:49:21 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Vurpp-0002aZ-AC for ged-emacs-devel@m.gmane.org; Sun, 22 Dec 2013 23:49:21 +0100 Original-Received: from localhost ([::1]:59486 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vurpo-0001Vn-Pu for ged-emacs-devel@m.gmane.org; Sun, 22 Dec 2013 17:49:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40023) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vurph-0001T4-OG for emacs-devel@gnu.org; Sun, 22 Dec 2013 17:49:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vurpc-0006K6-8t for emacs-devel@gnu.org; Sun, 22 Dec 2013 17:49:13 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:51954) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vurpc-0006K2-1j for emacs-devel@gnu.org; Sun, 22 Dec 2013 17:49:08 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Vurpb-0002OY-C8 for emacs-devel@gnu.org; Sun, 22 Dec 2013 23:49:07 +0100 Original-Received: from c-98-229-61-72.hsd1.ma.comcast.net ([98.229.61.72]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 22 Dec 2013 23:49:07 +0100 Original-Received: from tzz by c-98-229-61-72.hsd1.ma.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 22 Dec 2013 23:49:07 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 42 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: c-98-229-61-72.hsd1.ma.comcast.net X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Copies-To: never User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:V+z3rg9qUgKxpOyz/L79R5Lq/WQ= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:166742 Archived-At: On Sun, 22 Dec 2013 18:07:01 +0200 Dmitry Gutov wrote: DG> Stefan Monnier 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 them. Anyhow, right now I do this in `cfengine3-mode': #+begin_src lisp (add-hook 'completion-at-point-functions #'cfengine3-completion-function nil t) #+end_src Is that enough? I can recommend to users that they should enable the `company-capf' backend in the cfengine.el docs, if so. Ted