From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: phillip.lord@newcastle.ac.uk (Phillip Lord) Newsgroups: gmane.emacs.devel Subject: Re: Is intellisense features integration in Emacs technically possible? Date: Fri, 24 Jan 2014 11:58:45 +0000 Message-ID: <87sisd7fre.fsf@newcastle.ac.uk> References: <1390269670.2888.14.camel@localhost.localdomain> <83zjmpf80o.fsf@gnu.org> <877g9shqms.fsf@newcastle.ac.uk> <20140122194930.49ba60be@forcix.kollektiv-hamburg.de> <87fvoedebx.fsf@newcastle.ac.uk> <20140123215656.30bf63b8@forcix.kollektiv-hamburg.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1390564787 4497 80.91.229.3 (24 Jan 2014 11:59:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Jan 2014 11:59:47 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: Jorgen Schaefer Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 24 12:59:54 2014 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 1W6fQO-0007tm-Qf for ged-emacs-devel@m.gmane.org; Fri, 24 Jan 2014 12:59:52 +0100 Original-Received: from localhost ([::1]:45927 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6fQO-0000jR-FB for ged-emacs-devel@m.gmane.org; Fri, 24 Jan 2014 06:59:52 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6fQ3-0000hB-Bk for emacs-devel@gnu.org; Fri, 24 Jan 2014 06:59:49 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W6fPf-00027c-46 for emacs-devel@gnu.org; Fri, 24 Jan 2014 06:59:31 -0500 Original-Received: from cheviot22.ncl.ac.uk ([128.240.234.22]:33275) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6fPe-00026s-S2 for emacs-devel@gnu.org; Fri, 24 Jan 2014 06:59:07 -0500 Original-Received: from smtpauth-vm.ncl.ac.uk ([10.8.233.129]) by cheviot22.ncl.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1W6fPc-0004Fx-Fr; Fri, 24 Jan 2014 11:59:05 +0000 Original-Received: from localhost (jangai.ncl.ac.uk [10.66.67.223]) (authenticated bits=0) by smtpauth-vm.ncl.ac.uk (8.13.8/8.13.8) with ESMTP id s0OBx3MA032490 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 24 Jan 2014 11:59:03 GMT In-Reply-To: <20140123215656.30bf63b8@forcix.kollektiv-hamburg.de> (Jorgen Schaefer's message of "Thu, 23 Jan 2014 21:56:56 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 128.240.234.22 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:169004 Archived-At: Jorgen Schaefer writes: > On Thu, 23 Jan 2014 10:12:44 -0500 > Stefan Monnier wrote: > >> >> It's mainly a common interface for such external programs so that >> >> we can add more languages more easily. The current effort of >> >> unifying the completion interface as well as supporting company >> >> mode as a front-end is going a great deal forward in that. >> > I'm not convinced that a single interface would work; again, using >> > clojure as example, this has moved away from a single interface in >> > Emacs (i.e. slime/swank) and toward a single interface for Clojure >> > (so that the Clojure side offers a single server, for different >> > editors). >> > > On the topic of a "unified RPC interface", it does grate me a bit that > every mode implements its own RPC with a major language (elpy > implements a simple JSON-RPC one, emacs-jedi uses the elaborate EPC > library, ropemacs uses Pymacs which uses a very idiosyncratic protocol, > slime does the swank stuff, clojure apparently has its own API now, > etc. etc.), but I'm not sure if that's a solvable problem. This is the sort of thing I was talking about when I said "I'm not convinced a single interface would work". > Choice of the RPC mechanism depends as much on Emacs as it does on the > capabilities of the language being talked to. The JSON-RPC code in > elpy is a total of 450 lines, both the Emacs Lisp as well as the > Python side, including docstrings and comments, so not having a > standard one is not really a huge problem. But that the mechanism is an RPC, I think, is more or less a given. Having a set of standard call-back functions for instance would help. If they all used the same interface, then you could chain them together and compose them in a sane way. So, for instance, you might be able to pick up an "parse a JSON-RPC into lisp datastructures" callback, an "adapt the lisp data structures from my library", and a "do a completion callback", then compose them and use them. The first could be generic for a given syntax family of RPC calls, the last generic for the functionality. So you'd only need to write the middle bit for a given language. Just a thought. Phil