From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: IDE Date: Sat, 17 Oct 2015 17:25:27 +0300 Message-ID: <56225A57.9030705@yandex.ru> References: <5610207A.2000300@harpegolden.net> <83fv1r3gzp.fsf@gnu.org> <83bncf3f9k.fsf@gnu.org> <5610E0BC.8090902@online.de> <83si5r106e.fsf@gnu.org> <831td9z18h.fsf@gnu.org> <5612E996.7090700@yandex.ru> <83bnc7tavr.fsf@gnu.org> <5618C92A.3040207@yandex.ru> <83a8rrt9ag.fsf@gnu.org> <5618D376.1080700@yandex.ru> <56194171.1080006@siege-engine.com> <5619E7C7.5000401@yandex.ru> <561A9E6D.8080403@gmail.com> <561BCF54.7060000@yandex.ru> <561D85DE.4090304@gmail.com> <561F1A75.1000909@yandex.ru> <561FA2A3.9030409@gmail.com> <5620F60A.1030104@yandex.ru> <5621B4D5.9040607@gmail.com> <5621BB2A.5000802@yandex.ru> <562242E3.10503@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1445091962 31031 80.91.229.3 (17 Oct 2015 14:26:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 17 Oct 2015 14:26:02 +0000 (UTC) Cc: adatgyujto@gmail.com, emacs-devel@gnu.org To: Eric Ludlam , Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 17 16:25:59 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 1ZnSQo-0000cO-80 for ged-emacs-devel@m.gmane.org; Sat, 17 Oct 2015 16:25:58 +0200 Original-Received: from localhost ([::1]:58480 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnSQn-0002xa-FW for ged-emacs-devel@m.gmane.org; Sat, 17 Oct 2015 10:25:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53945) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnSQQ-0002xU-Av for emacs-devel@gnu.org; Sat, 17 Oct 2015 10:25:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZnSQN-0000Fp-5o for emacs-devel@gnu.org; Sat, 17 Oct 2015 10:25:34 -0400 Original-Received: from mail-wi0-x236.google.com ([2a00:1450:400c:c05::236]:33220) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnSQM-0000Fj-TF; Sat, 17 Oct 2015 10:25:31 -0400 Original-Received: by wijp11 with SMTP id p11so44666546wij.0; Sat, 17 Oct 2015 07:25:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=zc32eHB3kS+mEA9hemonYJJVLBTBPanOWJZvdhbPJbY=; b=wLi3lL5acrJ6q4zJF3VTLQ8dpgrb4RnBeMr6Ix3PCMdKw7YAzT3KVK94E3tyv+45Ve sZrCDEAyaYoP6lWoFmbJXj1IsZPX83wP5CBPBVooQcBOiBJ6HnKQlZlsvBJ/suVQ0LzR XfKkew5xs/DryQKD/AGu0xwp251p/tWg5+gzp3HRbxssOT2ikCRCXdnlXtQiWsZRj67b DnNZWCLdqO40LOxiLqOg5GAZP8aBKPfNWGH8fT71ptgfJ6zc1QHM6pNtU8/zJ/nVF5ND deeLMDiqNrhDf5pBLVDVPCwai8VYtF/s0LQTRQfwQpYFbxX2lmCmN+YK50zyqmR6wKRD 5kNw== X-Received: by 10.180.85.226 with SMTP id k2mr11388301wiz.67.1445091930376; Sat, 17 Oct 2015 07:25:30 -0700 (PDT) Original-Received: from [192.168.1.2] ([185.105.175.24]) by smtp.googlemail.com with ESMTPSA id p2sm28634534wjb.21.2015.10.17.07.25.28 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 17 Oct 2015 07:25:29 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Thunderbird/42.0 In-Reply-To: <562242E3.10503@gmail.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::236 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:191831 Archived-At: On 10/17/2015 03:45 PM, Eric Ludlam wrote: > There is nothing about semantic the framework that prevents using > something like SMIE as a tagging engine. It seems likely that if some > language not supported by CEDET today has a good SMIE grammar, and if > SMIE could be adapted to produce compatible tags (which isn't really > that hard to do), and if SMIE has an entry point that allows parsing a > tag set out of a region, then it would integrate into the semantic > framework at the best level. With SMIE, though, it might make sense to optimize the process and only ask it for the current tag (and maybe the nearby ones), because it would otherwise be slower (no incremental parsing, or anything like that). So a straightforward conversion might not be optimal. But from the main examples you gave of tag usage, knowing the current tag is by far the most important. > The difference is that the parser generators in Semantic today have > optimizations for skipping parts of the buffer while tagging. This lets > it parse whole files more quickly, and more robustly. Since it uses > syntax tables to do that, I'll guess SMIE can do it, but I'm not that > familiar with it. Skipping strings and comments - probably. Method bodies - unlikely (except in C-like languages: skipping over a pair of braces is easy). > Also, wisent type grammars could easily dump out data you need for > indentation since actions can do anything you can write in lisp. No one > has tried to do it though. Someone should try and tell us about it. > The mechanism in use is that there are detailed taggers, like those > currently written for Semantic using wisent type parsers, and weak > taggers, like GNU Global. > > Once a buffer is open, the detailed tagger runs and is truth. When a > search occurs, a process of pulling all relevant databases together is > started. This includes tags from the detailed taggers already cached, > and high level 'omniscient' taggers that are usually weak, but have > scanned the whole project. Well, that's my point: if you don't use etags, to have all project files indexed you have to open each of them at some point. Some languages have import systems where you have to declare all file's dependencies at its top (and so you can know which files to reindex if you're only interested in this file; although even that could be a lot). But in Ruby and pre-ES6 JavaScript, you don't usually have that. > The output of the search includes a database > table, and tags found in that table. The tags are additionally refined > based on whatever the layered criteria is, and when the code decides to > work with a detailed tag from the search, it forces it to be real, and > pulls it into a buffer if necessary, and any problems with the weak > tagger is resolved. Yup. > The key here is that the detailed tagger is needed to do complex tasks, > but weak taggers are great to integrate in due to the speed advantage. > Having a mix gives you the best possible results. If the program generating TAGS is smart enough, the result can be pretty accurate already (and contain qualified method name). Eli has recently made some improvements to that effect to etags. > If instead you put the cursor on "tee" and do > > M-x semantic-ia-fast-jump RET > > it will go to the right spot. Indeed it does, thanks. But it goes to the second definition irrespective of which argument is passed to tee. Which brings us back to the completion problem I reported with that snippet. > For the keybinding you were using, the workflow is: Right, why doesn't semantic-ia-fast-jump have a default keybinding? I was only looking for the appropriate command in the active keymaps. > C-c , J tee TAB > > shows you where it would jump, then > > TAB Oh, so it uses something more advanced than completing-read. That's unexpected. >> But what about duck typed languages? If a method foo calls bar on its >> argument tee, we don't know the type of tee, all we know that it has a >> method bar. > > In the workflow above, you can just keep pressing TAB to pick the one > you want. I would want semantic-ia-fast-jump to work with them, of course. As well as semantic-symref.