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: Thu, 23 Jan 2014 13:26:40 +0000 Message-ID: <87bnz2de27.fsf@newcastle.ac.uk> References: <1390269670.2888.14.camel@localhost.localdomain> <83zjmpf80o.fsf@gnu.org> <877g9shqms.fsf@newcastle.ac.uk> <52E07CFA.2090206@siege-engine.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1390483629 8599 80.91.229.3 (23 Jan 2014 13:27:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 23 Jan 2014 13:27:09 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Eric M. Ludlam" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 23 14:27:16 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 1W6KJQ-0001dm-GN for ged-emacs-devel@m.gmane.org; Thu, 23 Jan 2014 14:27:16 +0100 Original-Received: from localhost ([::1]:41071 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6KJQ-0007qG-3y for ged-emacs-devel@m.gmane.org; Thu, 23 Jan 2014 08:27:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34282) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6KJI-0007px-Gq for emacs-devel@gnu.org; Thu, 23 Jan 2014 08:27:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W6KJA-0002kh-Ro for emacs-devel@gnu.org; Thu, 23 Jan 2014 08:27:08 -0500 Original-Received: from cheviot22.ncl.ac.uk ([128.240.234.22]:36496) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6KJA-0002kZ-JV for emacs-devel@gnu.org; Thu, 23 Jan 2014 08:27:00 -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 1W6KJ9-0006jt-Fa; Thu, 23 Jan 2014 13:26:59 +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 s0NDQxg1016304 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 23 Jan 2014 13:26:59 GMT In-Reply-To: <52E07CFA.2090206@siege-engine.com> (Eric M. Ludlam's message of "Wed, 22 Jan 2014 21:22:50 -0500") 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:168950 Archived-At: "Eric M. Ludlam" writes: >> I think that it depends on the language. Introspecting over, for >> example, Java would require an awful of elisp, which would be difficult >> to write. Getting Java to do this work is quite a lot less effort. >> Hence, the JDEEs use of Java for this (via bsh). Likewise, Clojure and >> Scala both of which use their own language to do much of the work. Or >> for that matter, common lisp with slime/swank. Or even, for that matter, >> English with aspell. I didn't have a problem with responsiveness with >> any of these. > > I don't think it is a good idea to consider the problem of doing smart > completion in Emacs as "Emacs Lisp VS External library". It is much more > advantageous to figure out what each is best at and do that instead. > I think it would be better to have a strong mix between the two. I am of > course a bit biased since I've put support for this in CEDET quite a while > ago. The premise for those who haven't studied how the smart completion > engine in CEDET works is pretty simple. Emacs is in charge of basic buffer > parsing. As David explained, it is a simple tagging parser, but unlike > etags/ctags, it collects much more detailed information. It also has a local > context parser, allowing it to find local variables, and identify the kind of > command the cursor is sitting on, such as an assignment, struct dereferences, > etc. I would agree with this, I think. JDEEs use of CEDET and introspection worked quite nicely together. Combined with (yet another) analysis step for fontification. My main point was to argue that an all elisp solution isn't necessarily sensible. To use a (strained) example in an English buffer `forward-word' is always going to be best implemented in elisp, while having "spell-check" in aspell seems reasonable. Phil