Re: [O] Using CEDET modules from Emacs core

2017-02-17 Thread Edward John Steere
>> Which CEDET features would we want to use from core?
>
> For one, I'd like to see more major modes come with support for Semantic
> right in the major mode's own definition (rather than have it part of
> CEDET).  E.g. for Elisp mode, CC-mode, ...
>
> The idea is to get to the point where Semantic support is just another
> thing that a major mode should aim to support alongside syntax-tables,
> indentation, font-lock, outline-minor-mode, ...

This sounds like a great idea!  Semantic appears to be to be stable
enough that we might want to consider extracting it from CEDET in core
like EIEIO was.

Perhaps it's worth considering this line of thought: that are parts of
CEDET which are worthy of becoming part of Emacs proper.  As Stefan
said, semantic is a perfect example of something which built in modes
could benefit from.

There are other parts of CEDET which I don't think meet the criteria of
being stable and general enough that they should be considered for this.
Such as EDE and the external databases for semantic db.  All of which
are useful, but unstable (and sometimes very slow) and I feel like they
shouldn't be expected as part of the core editing experience --
i.e. that one should have to buy into their use.



Re: [O] Using CEDET modules from Emacs core

2017-02-17 Thread Eric Ludlam

On 02/12/2017 11:00 AM, Dmitry Gutov wrote:

On 12.02.2017 05:33, Stefan Monnier wrote:
I don't have anything against supporting Semantic more widely, but we
should understand that it isn't something all users want. And the
"Semantic is too slow for C++" complaint (e.g. compared to Clang-based
background process solutions) is unlikely to go away.


There are a lot of ways to use semantic which changes its performance 
profile.  It depends on what features you want.  Most configuration help 
assumes you want all the most time consuming features, but there are 
also simple helpful features that are supported with minimal parsing 
support.   To boot, C++ is also the oldest parser in the suite and it 
wasn't updated to the newer/faster parser generator.


While I haven't had time to work on CEDET  lately, I'd be happy to 
discuss specific performance issues and share ideas on how to improve 
them, presumably after the most recent merge is completed.


Eric



Re: [O] Using CEDET modules from Emacs core

2017-02-14 Thread Stefan Monnier
>> "Semantic is too slow for C++" complaint (e.g. compared to Clang-based
>> background process solutions) is unlikely to go away.
> While I haven't had time to work on CEDET lately, I'd be happy to discuss
> specific performance issues and share ideas on how to improve them,
> presumably after the most recent merge is completed.

Isn't it the case that CEDET could also make use of a Clang backend?


Stefan



Re: [O] Using CEDET modules from Emacs core

2017-02-12 Thread Dmitry Gutov

On 12.02.2017 05:33, Stefan Monnier wrote:


We don't have enough infrastructure support in general for "advanced"
editing functionality such as type/scope-aware completion.  So we have
various add-on thingies (like company-mode, cedet, and auto-complete)
which provide such support for specific modes, but really these should
move to core, so that major modes can themselves provide support for
such completion.


That doesn't always equate to "add semantic-mode support", and in many 
cases won't be optimal.


I don't have anything against supporting Semantic more widely, but we 
should understand that it isn't something all users want. And the 
"Semantic is too slow for C++" complaint (e.g. compared to Clang-based 
background process solutions) is unlikely to go away.




Re: [O] Using CEDET modules from Emacs core

2017-02-11 Thread Stefan Monnier
SM> For one, I'd like to see more major modes come with support for Semantic
SM> right in the major mode's own definition (rather than have it part of
SM> CEDET). E.g. for Elisp mode, CC-mode, ...
SM> The idea is to get to the point where Semantic support is just another
SM> thing that a major mode should aim to support alongside syntax-tables,
SM> indentation, font-lock, outline-minor-mode, ...
> Is the semantic support really at the point of warranting that?

What more would you want?

> Does it have many users currently?

Chicken, meet Egg!

> Is it something major-modes would want to include default support for?

It provides a functionality that's usually requested by users, so I'm
surprised you'd ask.

We don't have enough infrastructure support in general for "advanced"
editing functionality such as type/scope-aware completion.  So we have
various add-on thingies (like company-mode, cedet, and auto-complete)
which provide such support for specific modes, but really these should
move to core, so that major modes can themselves provide support for
such completion.

I've done some of that with completion-at-point-functions and moving
some company-.el to -mode.el, but there's a lot more to do.


Stefan



Re: [O] Using CEDET modules from Emacs core

2017-02-11 Thread John Wiegley
> "SM" == Stefan Monnier  writes:

SM> For one, I'd like to see more major modes come with support for Semantic
SM> right in the major mode's own definition (rather than have it part of
SM> CEDET). E.g. for Elisp mode, CC-mode, ...

SM> The idea is to get to the point where Semantic support is just another
SM> thing that a major mode should aim to support alongside syntax-tables,
SM> indentation, font-lock, outline-minor-mode, ...

Is the semantic support really at the point of warranting that? Does it have
many users currently? Is it something major-modes would want to include
default support for?

The last time I tried it, for C++ code, it was far too slow. Are you saying
it's effective for other languages, like Python or Javascript or Go?

-- 
John Wiegley  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com  60E1 46C4 BD1A 7AC1 4BA2



Re: [O] Using CEDET modules from Emacs core

2017-02-02 Thread Stefan Monnier
SM> 2- We wanted to integrate it more tightly with Emacs (not in terms of
SM> bug-tracking and releasing schedule, but in terms of making it
SM> possible for generic Emacs code to use some of CEDET, and to
SM> encourage more major modes and other features to use CEDET).
> Can you clarify what the plans are here?

The plans were not very clear, no.  Just a general feeling that there's
a lot of opportunity for integration.  It has not materialized the way
we had hoped, admittedly.  I guess I'd consider the xref work as
something in that direction, although it happened more by replacing
CEDET's system than by integrating it.

> Which CEDET features would we want to use from core?

For one, I'd like to see more major modes come with support for Semantic
right in the major mode's own definition (rather than have it part of
CEDET).  E.g. for Elisp mode, CC-mode, ...

The idea is to get to the point where Semantic support is just another
thing that a major mode should aim to support alongside syntax-tables,
indentation, font-lock, outline-minor-mode, ...


Stefan