* CEDET branch
@ 2009-09-09 2:23 Chong Yidong
2009-09-09 16:19 ` David Engster
0 siblings, 1 reply; 10+ messages in thread
From: Chong Yidong @ 2009-09-09 2:23 UTC (permalink / raw
To: emacs-devel
EIEIO and Semantic are now working in the CVS branch for the CEDET
merge. The branch name is "cedet-branch", and the branch tag is
CEDET_BASE (tagged a little more than a month ago from the trunk); you
can check out the branch with a "-r cedet-branch" argument to the usual
cvs update command.
Although the two other major components of CEDET (EDE and Srecode) are
still unmerged, and although there are still several rough edges, this
is a good time to look at the branch if you're interested. Barring
changes in strategy, EDE and Srecode would be handled similar to the way
Semantic has been, so comments/opinions/criticisms are very welcome.
I have not included Semantic's imenu and awk support (still waiting on
papers). Also omitted is Senator, the package by David Ponce that
alters a lot of basic Emacs commands to use Semantic parsing. I'm not
sure what to do with Senator; we certainly can't include it as-is,
because it makes heavy use of advice. Suggestions welcome.
Regarding file placement: EIEIO, Eric's implementation of the CLOS, is
in the lisp/emacs-lisp/ directory. All other CEDET files go in the
lisp/cedet directory and its subdirectories. Although lisp/cedet is in
the load-path, I deliberately excluded its subdirectories from the
load-path; so, for instance, lisp/cedet/semantic/ and
lisp/cedet/semantic/wisent/ are not on the load path. The reason for
this is the "8+3 filenames hack" discussed previously on this list, at
http://lists.gnu.org/archive/html/emacs-devel/2009-08/msg01214.html
For instance, the file semantic/semantic-analyze.el from the CEDET
repository is now at lisp/cedet/semantic/analyze.el, and can be loaded
with
(require 'semantic/analyze)
Most of the Semantic files contain autoloaded functions and class
definitions. During "make autoloads", the autoload definitions are not
put in the global autoloads file (lisp/loaddefs.el), but in
lisp/cedet/semantic/loaddefs.el; this file is loaded when you do
(require 'semantic). This required a few minor changes to the
autoloads.el.
(The reason not to use lisp/loaddefs.el is that there are lots and lots
of CEDET autoload definitions; CEDET makes liberal use of them to avoid
circular dependencies, whereas in Emacs we generally use autoloads for
user commands.)
The basic Semantic unit tests work, but if you come across any problem,
please let me know. In particular, some of the necessary autoloads
present in the original CEDET package may have been omitted when
transitioning to the new setup.
Another thing: please don't install non-CEDET-related changes on this
branch, as that would greatly complicate merging to the trunk later.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: CEDET branch
2009-09-09 2:23 CEDET branch Chong Yidong
@ 2009-09-09 16:19 ` David Engster
2009-09-11 1:22 ` Chong Yidong
0 siblings, 1 reply; 10+ messages in thread
From: David Engster @ 2009-09-09 16:19 UTC (permalink / raw
To: Chong Yidong; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 1205 bytes --]
Chong Yidong <cyd@stupidchicken.com> writes:
> The basic Semantic unit tests work, but if you come across any problem,
> please let me know. In particular, some of the necessary autoloads
> present in the original CEDET package may have been omitted when
> transitioning to the new setup.
Thank you for your work on merging CEDET; I can imagine it's no easy
task.
While playing around with the new branch, a few things popped up:
* I am wondering how the basic CEDET setup should work now, since
semantic-load.el is not in the branch. In cedet.el, I read I should
use
(setq semantic-load-turn-useful-things-on t)
(require 'cedet)
However, this does not enable the semanticdb database, which has still
to be activated through
(global-semanticdb-minor-mode 1) ,
otherwise not much will work.
* There's a "(require 'semantic-analyze)" in scope.el. It's trivial, but
I attached a patch anyway. :-)
* I guess most of the search macros in semantic/find.el will need
autoloads, most notably the ones under "Top level searches" and
probably also the ones under "Deep searches". At the moment, I get an
error that `semantic-find-tags-by-class' isn't defined.
Regards,
David
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: scope-el-patch.diff --]
[-- Type: text/x-diff, Size: 735 bytes --]
Index: scope.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/cedet/semantic/Attic/scope.el,v
retrieving revision 1.1.2.4
diff -u -r1.1.2.4 scope.el
--- scope.el 6 Sep 2009 21:22:06 -0000 1.1.2.4
+++ scope.el 9 Sep 2009 16:04:35 -0000
@@ -796,7 +796,7 @@
;;
(defmethod semantic-analyze-show ((context semantic-scope-cache))
"Insert CONTEXT into the current buffer in a nice way."
- (require 'semantic-analyze)
+ (require 'semantic/analyze)
(semantic-analyze-princ-sequence (oref context scopetypes) "-> ScopeTypes: " )
(semantic-analyze-princ-sequence (oref context parents) "-> Parents: " )
(semantic-analyze-princ-sequence (oref context scope) "-> Scope: " )
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: CEDET branch
2009-09-09 16:19 ` David Engster
@ 2009-09-11 1:22 ` Chong Yidong
2009-09-11 2:56 ` Stefan Monnier
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Chong Yidong @ 2009-09-11 1:22 UTC (permalink / raw
To: David Engster; +Cc: emacs-devel
David Engster <deng@randomsample.de> writes:
> While playing around with the new branch, a few things popped up:
>
> * I am wondering how the basic CEDET setup should work now, since
> semantic-load.el is not in the branch. In cedet.el, I read I should
> use
>
> (setq semantic-load-turn-useful-things-on t)
> (require 'cedet)
>
> However, this does not enable the semanticdb database, which has still
> to be activated through
>
> (global-semanticdb-minor-mode 1) ,
>
> otherwise not much will work.
Thanks for spotting this. I'll work on a fix.
I wonder, though, whether the merged version of CEDET should provide a
different method for activating CEDET. The out-of-tree version requires
you to put something like
(setq semantic-load-turn-useful-things-on t)
(require 'cedet)
in your init file, but a package that is included with Emacs should not
have to be loaded this way. Rather, there should be a command (or set
of commands) that are autoloaded (in the global Emacs loaddefs.el), and
calling the command should load the package.
> * There's a "(require 'semantic-analyze)" in scope.el. It's trivial, but
> I attached a patch anyway. :-)
Fixed, thanks.
> * I guess most of the search macros in semantic/find.el will need
> autoloads, most notably the ones under "Top level searches" and
> probably also the ones under "Deep searches". At the moment, I get an
> error that `semantic-find-tags-by-class' isn't defined.
The semantic-find-tags-by-class macro should be byte-compiled in-place
by any file that requires it. Can you provide a recipe?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: CEDET branch
2009-09-11 1:22 ` Chong Yidong
@ 2009-09-11 2:56 ` Stefan Monnier
2009-09-11 12:21 ` Jason Rumney
2009-09-11 10:41 ` David Engster
2009-09-12 12:15 ` Eric M. Ludlam
2 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2009-09-11 2:56 UTC (permalink / raw
To: Chong Yidong; +Cc: David Engster, emacs-devel
> in your init file, but a package that is included with Emacs should not
> have to be loaded this way. Rather, there should be a command (or set
> of commands) that are autoloaded (in the global Emacs loaddefs.el), and
> calling the command should load the package.
Naively, I'd expect something like a "cedet-mode" minor-mode along with
a global-cedet-mode if you want to enable it in every mode that
is supported.
Stefan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: CEDET branch
2009-09-11 2:56 ` Stefan Monnier
@ 2009-09-11 12:21 ` Jason Rumney
0 siblings, 0 replies; 10+ messages in thread
From: Jason Rumney @ 2009-09-11 12:21 UTC (permalink / raw
To: Stefan Monnier; +Cc: Chong Yidong, David Engster, emacs-devel
Stefan Monnier wrote:
> Naively, I'd expect something like a "cedet-mode" minor-mode along with
> a global-cedet-mode if you want to enable it in every mode that
> is supported.
>
I think the individual features within CEDET mostly work like that. But
CEDET itself is really only a collection of features (including
speedbar, which has been part of Emacs since at least 19.17), so I don't
think a cedet-mode or the current (require 'cedet) is really the best
way to load it.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: CEDET branch
2009-09-11 1:22 ` Chong Yidong
2009-09-11 2:56 ` Stefan Monnier
@ 2009-09-11 10:41 ` David Engster
2009-09-13 16:19 ` Chong Yidong
2009-09-12 12:15 ` Eric M. Ludlam
2 siblings, 1 reply; 10+ messages in thread
From: David Engster @ 2009-09-11 10:41 UTC (permalink / raw
To: Chong Yidong; +Cc: emacs-devel
Chong Yidong <cyd@stupidchicken.com> writes:
> I wonder, though, whether the merged version of CEDET should provide a
> different method for activating CEDET. The out-of-tree version requires
> you to put something like
>
> (setq semantic-load-turn-useful-things-on t)
> (require 'cedet)
>
> in your init file, but a package that is included with Emacs should not
> have to be loaded this way. Rather, there should be a command (or set
> of commands) that are autoloaded (in the global Emacs loaddefs.el), and
> calling the command should load the package.
The problem was always that CEDET provides a bunch of different
features. If you activate them all, people would complain that it is
'too much', and if you just activate the bare minimum, people would
wonder why certain stuff just doesn't work.
That's why in upstream there's semantic-load.el, which has several
functions to set up CEDET in various different ways, from the bare
minimum to absolutely everything. I guess we would have to find a
compromise for which features should be activated by default. Eric has
surely some ideas regarding this issue.
>> * I guess most of the search macros in semantic/find.el will need
>> autoloads, most notably the ones under "Top level searches" and
>> probably also the ones under "Deep searches". At the moment, I get an
>> error that `semantic-find-tags-by-class' isn't defined.
>
> The semantic-find-tags-by-class macro should be byte-compiled in-place
> by any file that requires it. Can you provide a recipe?
I guess a
(eval-when-compile (require 'semantic/find))
in semantic/analyze/fcn.el should do the trick?
I also noticed another error due to removed autoloads:
'semantic-tag-write-list-slot-value' isn't defined when the database is
saved upon exiting Emacs. An eval-when-compile won't work here, since
this is actually a slot value which is called from eieio. So I guess it
either needs an autoload, or 'semantic/tag-write' is required in
semantic/db-file.el ?
Regards,
David
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: CEDET branch
2009-09-11 10:41 ` David Engster
@ 2009-09-13 16:19 ` Chong Yidong
0 siblings, 0 replies; 10+ messages in thread
From: Chong Yidong @ 2009-09-13 16:19 UTC (permalink / raw
To: David Engster; +Cc: emacs-devel
David Engster <deng@randomsample.de> writes:
>> The semantic-find-tags-by-class macro should be byte-compiled in-place
>> by any file that requires it. Can you provide a recipe?
>
> I guess a
>
> (eval-when-compile (require 'semantic/find))
>
> in semantic/analyze/fcn.el should do the trick?
Thanks, I've checked in a fix.
> I also noticed another error due to removed autoloads:
> 'semantic-tag-write-list-slot-value' isn't defined when the database is
> saved upon exiting Emacs. An eval-when-compile won't work here, since
> this is actually a slot value which is called from eieio. So I guess it
> either needs an autoload, or 'semantic/tag-write' is required in
> semantic/db-file.el ?
Thanks, I've autoloaded semantic-tag-write-list-slot-value.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: CEDET branch
2009-09-11 1:22 ` Chong Yidong
2009-09-11 2:56 ` Stefan Monnier
2009-09-11 10:41 ` David Engster
@ 2009-09-12 12:15 ` Eric M. Ludlam
2009-09-12 18:56 ` David Engster
2 siblings, 1 reply; 10+ messages in thread
From: Eric M. Ludlam @ 2009-09-12 12:15 UTC (permalink / raw
To: Chong Yidong; +Cc: David Engster, emacs-devel
On Thu, 2009-09-10 at 21:22 -0400, Chong Yidong wrote:
> David Engster <deng@randomsample.de> writes:
>
> > While playing around with the new branch, a few things popped up:
> >
> > * I am wondering how the basic CEDET setup should work now, since
> > semantic-load.el is not in the branch. In cedet.el, I read I should
> > use
> >
> > (setq semantic-load-turn-useful-things-on t)
> > (require 'cedet)
> >
> > However, this does not enable the semanticdb database, which has still
> > to be activated through
> >
> > (global-semanticdb-minor-mode 1) ,
> >
> > otherwise not much will work.
>
> Thanks for spotting this. I'll work on a fix.
>
> I wonder, though, whether the merged version of CEDET should provide a
> different method for activating CEDET. The out-of-tree version requires
> you to put something like
>
> (setq semantic-load-turn-useful-things-on t)
> (require 'cedet)
>
That commentary was apparently written a very long time ago. The
semantic load feature set has command such as:
(semantic-load-enable-minimum-features)
(semantic-load-enable-code-helpers)
(semantic-load-enable-gaudy-code-helpers)
which are handy, or a user can turn on the misc features one at a time.
The 'minimum features' is actually a list of two minor modes
(semanticdb, and the idle scheduler), plus some code to load in caches
which is only needed when trying to combine with ebrowse.
The idea of a 'cedet' mode is something I'd been contemplating for a
while. Even though CEDET is "one" collection of tools, each individual
tool (ede, semantic, srecode, etc) is treated independently.
Configuring cross-dependencies between these tools can be confusing, or
so I guess from the questions I see.
Having one master name (cedet) as an interface controlling all the parts
so users don't need to see the individual names might be a boon for
getting configurations working. The current name set is useful for
development where being specific is needed.
I updated the cedet.el comments to reflect the 'new way' of configuring
things.
Eric
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: CEDET branch
2009-09-12 12:15 ` Eric M. Ludlam
@ 2009-09-12 18:56 ` David Engster
2009-09-12 20:20 ` Eric M. Ludlam
0 siblings, 1 reply; 10+ messages in thread
From: David Engster @ 2009-09-12 18:56 UTC (permalink / raw
To: eric; +Cc: Chong Yidong, emacs-devel
Eric M. Ludlam <eric@siege-engine.com> writes:
> On Thu, 2009-09-10 at 21:22 -0400, Chong Yidong wrote:
>> I wonder, though, whether the merged version of CEDET should provide a
>> different method for activating CEDET. The out-of-tree version requires
>> you to put something like
>>
>> (setq semantic-load-turn-useful-things-on t)
>> (require 'cedet)
>>
>
> That commentary was apparently written a very long time ago. The
> semantic load feature set has command such as:
>
> (semantic-load-enable-minimum-features)
> (semantic-load-enable-code-helpers)
> (semantic-load-enable-gaudy-code-helpers)
>
> which are handy, or a user can turn on the misc features one at a time.
[...]
> I updated the cedet.el comments to reflect the 'new way' of configuring
> things.
The problem is that semantic-load.el isn't in the Emacs CEDET branch. If
the above configuration is OK for Emacs, it would have to be imported
first.
-David
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: CEDET branch
2009-09-12 18:56 ` David Engster
@ 2009-09-12 20:20 ` Eric M. Ludlam
0 siblings, 0 replies; 10+ messages in thread
From: Eric M. Ludlam @ 2009-09-12 20:20 UTC (permalink / raw
To: David Engster; +Cc: Chong Yidong, emacs-devel
On Sat, 2009-09-12 at 20:56 +0200, David Engster wrote:
> Eric M. Ludlam <eric@siege-engine.com> writes:
> > On Thu, 2009-09-10 at 21:22 -0400, Chong Yidong wrote:
> >> I wonder, though, whether the merged version of CEDET should provide a
> >> different method for activating CEDET. The out-of-tree version requires
> >> you to put something like
> >>
> >> (setq semantic-load-turn-useful-things-on t)
> >> (require 'cedet)
> >>
> >
> > That commentary was apparently written a very long time ago. The
> > semantic load feature set has command such as:
> >
> > (semantic-load-enable-minimum-features)
> > (semantic-load-enable-code-helpers)
> > (semantic-load-enable-gaudy-code-helpers)
> >
> > which are handy, or a user can turn on the misc features one at a time.
>
> [...]
>
> > I updated the cedet.el comments to reflect the 'new way' of configuring
> > things.
>
> The problem is that semantic-load.el isn't in the Emacs CEDET branch. If
> the above configuration is OK for Emacs, it would have to be imported
> first.
I think it's ok for Emacs to do something different. For example, there
might be some single submenu under tools with some options there to turn
various subsets of CEDET on or off, calling them things like
"completion" or "projects" or some-such.
The current way CEDET does setup is too focused on the individual tools
and goofy names therein. If I can ever get this cedet 1.0 thing
"donish", that was one of many things on my future todo list.
Eric
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-09-13 16:19 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-09 2:23 CEDET branch Chong Yidong
2009-09-09 16:19 ` David Engster
2009-09-11 1:22 ` Chong Yidong
2009-09-11 2:56 ` Stefan Monnier
2009-09-11 12:21 ` Jason Rumney
2009-09-11 10:41 ` David Engster
2009-09-13 16:19 ` Chong Yidong
2009-09-12 12:15 ` Eric M. Ludlam
2009-09-12 18:56 ` David Engster
2009-09-12 20:20 ` Eric M. Ludlam
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.