From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Oleh Krehel Newsgroups: gmane.emacs.devel Subject: Re: IDE Date: Mon, 12 Oct 2015 14:37:26 +0200 Message-ID: <871td0460p.fsf@gmail.com> References: <5612E996.7090700@yandex.ru> <83bnc7tavr.fsf@gnu.org> <5618C92A.3040207@yandex.ru> <83a8rrt9ag.fsf@gnu.org> <5618D376.1080700@yandex.ru> <831td3t62e.fsf@gnu.org> <5618E51D.4070800@yandex.ru> <83twpzrp05.fsf@gnu.org> <5618ED93.8000001@yandex.ru> <83lhbbrnn7.fsf@gnu.org> <56191D6B.8040405@yandex.ru> <838u7assvj.fsf@gnu.org> <561A3582.5080806@yandex.ru> <561A3756.1010404@gmx.at> <561A41CA.6060908@yandex.ru> <87io6c5ov5.fsf@gmail.com> <561B999D.2060900@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1444653475 18273 80.91.229.3 (12 Oct 2015 12:37:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 12 Oct 2015 12:37:55 +0000 (UTC) Cc: martin rudalics , Eli Zaretskii , adatgyujto@gmail.com, emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 12 14:37:48 2015 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 1ZlcMK-0007Om-Nb for ged-emacs-devel@m.gmane.org; Mon, 12 Oct 2015 14:37:44 +0200 Original-Received: from localhost ([::1]:55096 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlcMK-0008BN-89 for ged-emacs-devel@m.gmane.org; Mon, 12 Oct 2015 08:37:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33327) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlcLs-0007z1-5S for emacs-devel@gnu.org; Mon, 12 Oct 2015 08:37:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZlcLm-0003Cf-E5 for emacs-devel@gnu.org; Mon, 12 Oct 2015 08:37:15 -0400 Original-Received: from mail-wi0-x231.google.com ([2a00:1450:400c:c05::231]:37295) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlcLm-0003CO-7k; Mon, 12 Oct 2015 08:37:10 -0400 Original-Received: by wijq8 with SMTP id q8so55843415wij.0; Mon, 12 Oct 2015 05:37:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=Da/w83IGInwuI+7eMT5UEqDSk2wsB4Upd1RWYCVHJRA=; b=Vv+i8N3eqD+9P+RAQ1Th4x7BidbCx0wXBcdZubnn/oae+BFQWVbvAw+LWfl+mGg600 JBTPkrwMb3Wp2OoO3U8Y5vg6ylLLNqcZpLYujRdwiWv8Oo1dshJQC7cQBbnjScGOxlqO 2QeXBoUMnFTmHqoOqaJdHaKcPgCuqaJGwx0DjDtRAUoE6/W2Gkhfq7aE8XVIP9AAMdxM Xu1WgVI5DmavLNqREEMNwgRIOiyuVjKdAw11iD/4zLDXZkpL+bZgnTZxy2iI0uccsfTm eLKrNRSgkCN6SQ5EZ0XXdM5y2wQxyA5lE4cT21QrFtXhQAap8EzvxZVp8qsnem0Aa4rG S8TA== X-Received: by 10.180.24.72 with SMTP id s8mr13449054wif.49.1444653429732; Mon, 12 Oct 2015 05:37:09 -0700 (PDT) Original-Received: from firefly (dyn069045.nbw.tue.nl. [131.155.69.45]) by smtp.gmail.com with ESMTPSA id xt1sm19602397wjb.32.2015.10.12.05.37.09 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 12 Oct 2015 05:37:09 -0700 (PDT) In-Reply-To: <561B999D.2060900@yandex.ru> (Dmitry Gutov's message of "Mon, 12 Oct 2015 14:29:33 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::231 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:191325 Archived-At: Dmitry Gutov writes: > Ivy also could use a popup to display completions, in the > future. Ideally, I'd prefer something like Sublime/Atom popup at the > top of the screen that you get after pressing C-p. Eventually, yes. But it's hard for me to figure out how to make the text and the overlays work together while the text is being updated. Perhaps I should try Sublime/Atom at least once, just to see how it's done there. >> Could someone explain to me if making GCC the dependency of Emacs would >> be a good idea, from technical and freedom point of view? Personally, I >> wouldn't care if Emacs executable would get inflated a bit more, if that >> meant access to true IDE features, which are only possible with a >> precise and fast parser. > > Having the whole GCC as a dependency might be problematic, but that's > not the #1 problem. AFAIK, GCC currently has no "code completion" > feature anywhere. There's no need for a specific "code completion" feature. Take this code for example: #include "qapplication.h" #include "qfont.h" #include "qpushbutton.h" int main(int argc, char *argv[]) { QApplication app(argc, argv); QPushButton quit("Quit"); quit. return 0; } Here's what (semantic-fetch-tags) returns: (("qapplication.h" include nil nil #) ("qfont.h" include nil nil #) ("qpushbutton.h" include nil nil #) ("main" function (:arguments (("argc" variable (:type "int") (reparse-symbol arg-sub-list) #) ("argv" variable (:pointer 1 :dereference 1 :type "char") (reparse-symbol arg-sub-list) #)) :type "int") nil #)) A similar data structure *has* to be somewhere in the GCC innards: it's a first step for compilation. In addition, this information is used to point out compilation errors/warnings. This data structure would know all defined functions/variables/types. For instance, it would know that the class QPushButton is defined in qpushbutton.h at line 57, and it inherits from QAbstractButton. It only remains to write a small wrapper that dumps all the AST included into `file_name` up to the point `offset`: void gcc_ast_for_file (char* file_name, int offset, void* out) I hope that I'm not being naive here and it's as simple to do as that. Oleh