emacs-devel
[Top][All Lists]
Advanced

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

Re: IDE


From: Dmitry Gutov
Subject: Re: IDE
Date: Fri, 16 Oct 2015 16:05:14 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Thunderbird/42.0

On 10/15/2015 03:57 PM, Eric Ludlam wrote:

CEDET will store tags into a set of overlays in the buffer.  That means
figuring out what tag the cursor is in is as fast as asking for what
overlay the cursor is in.

I see. But you have to keep that info up-to-date as well, and that becomes less fast, because you implement it in Elisp. If we're comparing to an external program.

Imenu stores it's tags in a list, so you need to scan the list to figure
it out. Imenu's tags are also weak, so the elisp knows very little about
the tag, only where it is, and enough to queue the reader.

All true. But we have other facilities as well. For instance, the modes which use SMIE for indentation can implement extraction of similar information, in a more accurate way.

If we were able to easily substitute in SMIE-based "current tag" implementation instead of using Wisent, that would be a plus.

Yes.  There are other tools that do different pieces of what CEDET does.

I mean that you can't *really* use Semantic for "jump to a tag in the project", because one doesn't usually like to open all project files at once. But if the "daemon" proposal sees any development, maybe...

* It lets you 'copy' a tag, and 'yank' it somewhere else.
* It provides an accurate 'beginning of defun', 'end of defun',
   'narrow to defun'

Emacs usually provides fairly accurate definitions of these as well.

* srecode can programmatically insert new tags between other tags
   using a hueristic.

I suppose it could use beginning-of-defun-function as well.

* Provides a starting symbol for some commands, such as symref.

I wonder if it's ideal: in IntellijIDEA, say, you can click on any of the method's uses and to list the other references. With your scheme, however, one has to jump to its definition first.

For someone user to the former, it's counter-intuitive: you move point to 'bar' in foo.bar(), and instead semantic-symref suggests asking for uses of whatever function you're currently inside. If you don't actually read the prompt fully and just press y (or yes), the result will be puzzling.

* The stuff imenu / which-func does but with more options such as
   breadcrumb type format.

A new generic API could use a more detailed format as well.

* You can parse the local context more quickly determining nesting
   context (ie - method in a class) for decoding symbols (like "this")

Yes, you can usually resolve what 'this' is (and, consequently, this.foo()). But not what foo.bar() is, in the general case. Not in a duck-typed language anyway.

So, that's a problem. If we could, using semantic-symref could be made more natural.

* There's a mode that tracks what tag you are in as you edit so you can
   jump through your history by name.

That's pretty cool.



reply via email to

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