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: Re: enabling company-capf support in cfengine.el Date: Sun, 22 Dec 2013 20:11:46 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <8738lkbcbx.fsf@flea.lifelogs.com> References: <87fvqtg02v.fsf@flea.lifelogs.com> <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> <87bo08bivm.fsf_-_@flea.lifelogs.com> <87sitkzahs.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 1387761046 15841 80.91.229.3 (23 Dec 2013 01:10:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 23 Dec 2013 01:10:46 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 23 02:10:52 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 1Vuu2j-0004wD-Uw for ged-emacs-devel@m.gmane.org; Mon, 23 Dec 2013 02:10:50 +0100 Original-Received: from localhost ([::1]:59920 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vuu2j-0000Je-8x for ged-emacs-devel@m.gmane.org; Sun, 22 Dec 2013 20:10:49 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vuu2c-0000Ig-0V for emacs-devel@gnu.org; Sun, 22 Dec 2013 20:10:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vuu2U-0008Dp-RH for emacs-devel@gnu.org; Sun, 22 Dec 2013 20:10:41 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:43471) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vuu2U-0008Dk-H3 for emacs-devel@gnu.org; Sun, 22 Dec 2013 20:10:34 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Vuu2S-0004lZ-OP for emacs-devel@gnu.org; Mon, 23 Dec 2013 02:10:32 +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 ; Mon, 23 Dec 2013 02:10:32 +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 ; Mon, 23 Dec 2013 02:10:32 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 39 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:EnLp0XgarGbgfFDK4jw7l6X0PHU= 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:166747 Archived-At: On Mon, 23 Dec 2013 02:17:35 +0200 Dmitry Gutov wrote: DG> Ted Zlatanov writes: >> 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. DG> Should be. As long as you can't (or don't indend to) support the more DG> advanced features, such as showing candidate signature (when it's a DG> function), its definition and documentation. No idea if any of that is DG> even applicable to CFEngine. It is. I provide ElDoc support currently. Is there a way to avoid custom work for company-mode, and instead provide a commonly understandable list of function definitions that works for ElDoc and for company-mode? ElDoc is pretty simple, it expects me to do all the work to find the current function and write the mini-docstring for it. CFEngine's syntax is actually very rigid and predictable. There are only specific things that can go at every point in the syntax, so it could use completion not just for function calls. It's a bit like XML with an enforced schema, and autocompletion could work really well there. I haven't had the time to explore that direction, there's too much on my TODO list :) but it seems like Semantic integration would actually make sense instead of custom code for this. Advice welcome. DG> But you also might want to wait until the next Company version is DG> released, and then only ask users to install it, without having to DG> change the list of backends. OK, sounds good. Thanks. Ted