From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Emacs contributions, C and Lisp Date: Tue, 25 Feb 2014 10:41:42 +0100 Organization: Organization?!? Message-ID: <87txbn8r6x.fsf@fencepost.gnu.org> References: <834n41db0d.fsf@gnu.org> <52FE2985.4070703@yandex.ru> <831tz5daes.fsf@gnu.org> <8738jlohd6.fsf@yandex.ru> <83txc1bl83.fsf@gnu.org> <5300189A.9090208@yandex.ru> <83wqgv9fbj.fsf@gnu.org> <20140216180712.236069f6@forcix.jorgenschaefer.de> <87wqgr4v18.fsf@yandex.ru> <53064BD0.7070009@yandex.ru> <87ha7tr5bo.fsf@fencepost.gnu.org> <87ppmhecd8.fsf@yandex.ru> <87y50z90pd.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1393321332 15944 80.91.229.3 (25 Feb 2014 09:42:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Feb 2014 09:42:12 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 25 10:42:19 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 1WIEWo-0005L8-3P for ged-emacs-devel@m.gmane.org; Tue, 25 Feb 2014 10:42:18 +0100 Original-Received: from localhost ([::1]:33907 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIEWn-0000nX-Jl for ged-emacs-devel@m.gmane.org; Tue, 25 Feb 2014 04:42:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49062) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIEWg-0000nQ-26 for emacs-devel@gnu.org; Tue, 25 Feb 2014 04:42:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WIEWa-0005Bm-7E for emacs-devel@gnu.org; Tue, 25 Feb 2014 04:42:09 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:51892) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIEWa-0005Bc-0O for emacs-devel@gnu.org; Tue, 25 Feb 2014 04:42:04 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WIEWT-00049Y-7c for emacs-devel@gnu.org; Tue, 25 Feb 2014 10:41:57 +0100 Original-Received: from x2f51cea.dyn.telefonica.de ([2.245.28.234]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 25 Feb 2014 10:41:57 +0100 Original-Received: from dak by x2f51cea.dyn.telefonica.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 25 Feb 2014 10:41:57 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 54 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: x2f51cea.dyn.telefonica.de X-Face: 2FEFf>]>q>2iw=B6, xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN; i"; /yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:MELpCwN4p7Kcv9UVOAgCkqbfffs= 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:169858 Archived-At: David Kastrup writes: > Glenn Morris writes: > >> John Yates wrote: >> >>> I would like to hear the gcc developers weigh in [...] >> >> They probably would do, if this discussion were happening on a gcc >> mailing list. > > Good thing that it isn't, then. A discussion as opposed to a fist > fight is something where there is a chance of people leaving with a > different opinion than what they started with. To followup on myself: smart completion is a concrete actual application for Emacs within the GNU universe so this discussion is less likely to get lost in an abstract showdown. It's definitely an issue that can be solved using special-casing. It's non-trivial enough to discuss its implications concretely. In this particular case, the "annotated syntax tree" question in particular is mostly uninteresting since we are talking about characterizing identifiers. It is "mostly" uninteresting since the resolution of an identifier depends on scopes, so the basic question that likely needs solving is "given the following source location and the following identifier, what data structures and definitions does it refer to". Resolving identifiers based on source location efficiently will require suitable data structures, and any daemon answering questions accordingly will have to get raw data for building them. Accessing that raw data and preparing a dump suitable for turning into a data structure for such a daemon would seem like an obvious case for a GCC plugin. So we are getting more at something like "source location dependent data structure dump" here. The "annotated syntax tree" question would become more relevant for things like sourcecode highlighting. But in the interest of usefully fast feedback when editing, it would likely make more sense to let Emacs do the highlighting with local rules on its own and only converse with GCC when it becomes necessary to resolve ambiguities (like declaration/expression distinctions): GCC can only make helpful suggestions regarding the last time the source code was syntactically correct, so most of the time Emacs will need to go ahead with _some_ idea anyway. At any rate, figuring out from the angle of Emacs and completion what would be required from GCC will provide us with a better idea about the balance of utility for us and possible proprietary systems trying to make use of the same code or data. -- David Kastrup