emacs-devel
[Top][All Lists]
Advanced

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

Re: Is intellisense features integration in Emacs technically possible?


From: Phillip Lord
Subject: Re: Is intellisense features integration in Emacs technically possible?
Date: Fri, 24 Jan 2014 11:58:45 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Jorgen Schaefer <address@hidden> writes:

> On Thu, 23 Jan 2014 10:12:44 -0500
> Stefan Monnier <address@hidden> 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



reply via email to

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