June 17, 2012

ECB & fresh Emacs/CEDET...

I already twitted about this, and also wrote to ECB & CEDET mailing lists, but I also want to reach Planet Emacs readers :-)
I made small changes in the ECB code that allow to use it together with fresh Emacs & CEDET versions. Modified code is available in my github. I tried this version together with CEDET from trunk, and also with CEDET from Emacs 24.1, and it worked for me.
If you're using ECB, please try this modified version, and leave feedback (either here, or by sending e-mail to me or to ECB mailing list). If you'll find bugs, feel free to file a bug using github's issue tracker.

30 comments:

zhangda said...

Hi Alex,

Where is the info on your git? Thanks!

EmacsFan said...
This comment has been removed by the author.
Alex Ott said...

I hadn't committed info files - just fetch code from git, edit Makefile & run make

Sven Goericke said...

Thank you Alex.

kostafey said...

This ECB succesfully starts on GNU Emacs 24.1.1 (i386-mingw-nt5.1.2600) with biult-in Cedet.

The problem is that it is not show the require's list in emacs-lisp files (this works with ecb-2.40 and cedet-1.0).

Alex Ott said...

Hmmm, interesting - maybe semantic isn't correctly enabled for emacs-lisp-mode? Because ECB rely on Semantic to fetch this info...

gnumonk said...

Alex,
Will this work with cedet1.1? I have checked out new-ecb but error says error: ECB 2.40 - Error: ECB can only be used with cedet [1.0pre6, 1.0.9]! Please install it and restart Emacs

any idea?

gnumonk said...

Hi, I have checked out the branch and after enabling getting this error.

error: ECB 2.40 - Error: ECB can only be used with cedet [1.0pre6, 1.0.9]! Please install it and restart Emacs

Alex Ott said...

Yes, it should work with CEDET 1.1 - I actually patched it for latest version... Please, check that you fetched new-cedet, not 'master'!

zhangfu(丈夫) said...

It successfully works with cedet-1.1 and emacs 24.2.50.1 (ppa:cassou/emacs snapshot) on Ubuntu 12.04 for 64bit.
Thanks a lot !

steve said...

Hi Alex, thank you for the great guides. I need a little clarification. I did a fresh compile of Emacs 24.2. Will your ECB work with the CEDET that comes with this (1.0pre7) or do I need to use the development version?

It does not seem to be working with 1.0pre7.

Alex Ott said...

Strange, that it doesn't work for you, because I tested with both versions - from CEDET's bzr, and with built-in...
Can you say, how it doesn't work? I found, that built-in version of semantic wasn't always activated, so it used information from imenu, etc.
But CEDET 1.1 or from bzr is preferable, due many fixes there - I hope, that current version of CEDET will be merged into Emacs soon

steve said...

Hi Alex, I got Cedet 1.1 and compiled that and that seemed to compile fine. I have your "new-cedet" branch installed. The (require 'ecb) seemed to work fine. When I try to do M-x ecb-activate, I get the following error:

ecb-activate-internal: Symbol's value as variable is void: stack-trace-on-error

Alex Ott said...

It looks like, you cloned repository, but hadn't switched to new-cedet branch, because call this function was deleted during refactoring. Clone repository once again, but specify -b new-cedet to clone command

steve said...

I double checked and I seem to be on that branch according to git branch -a (the asterix is next to new-cedet)

I think that that I need to recompile ECB with respect to the new Cedet 1.1. However, when I tried to do that, I set


CEDET=/home/stevejb/Projects/cedet

which is where I cloned the repository, and it seems to be looking for

/home/stevejb/Projects/cedet/common/cedet.el

which does not exist, as there is no "common" folder.

PS are you on IRC?

Alex Ott said...

I just downloaded archive with CEDET 1.1 and see common/cedet.el file there...
P.S. I'm currently available via jabber at alexott at gmail.com

Alex Ott said...

btw, do you took release version of CEDET, or downloaded from bzr? If from bzr, you then just need to compile it, so it will generate all necessary files

steve said...

Great. I just added you. I think I worked out what was going on. I hadn't correctly compiled CEDET so there were some pieces missing. I think that I have a proper CEDET 1.1 installation now, so I will give your ECB new-cedet branch a try!

Thanks again!

thkoch said...

Wouldn't you like to take care of ecb.sourceforge.net and switch the link on the homepage from CVS to Git? It does not look very good if a project still uses CVS in 2012.

Regards, Thomas Koch

https://sourceforge.net/tracker/?func=detail&aid=3564109&group_id=17484&atid=117484

Alex Ott said...

I don't have much time to full maintenance of ECB :-(

Wendell said...

Integrating cedet-1.1 into the emacs 24.2 packaged rpm.

I have it merged into the src tree now (removed the 1.0 stuff first).

I've had to specifically add the cedet/ede, cedet/common, etc lisp dirs in my .emacs to get the cedet ede to fire up prior to doing the merge.

Once these elements are "baked" into the RPM, is this still going to be necessary? ie: are they added automatically?

Alex Ott said...

@Wendell: You should be very careful with merging 1.1 into 24.2 tree, as it has different layout, etc.
Maybe it's better to wait for 24.3, or at least take fresh CEDET from its tree? Because fresh CEDET was merged into Emacs tree 2 weeks ago

Unknown said...

Alex, thanks for your blog. Using it in Emacs 24.2.1, I was able to modify test on version of cedet, to allow ceded 1.1 to work. However, that just exposed a next-layer bug in ecb-2.40. I get the error "ECB 2.40: Errors during the layout setup of ECB. (error-type: error, error-data: (\"Variable binding depth exceeds max-specpdl-size\"))"

Any suggestions appreciated ! Using SuSE 12.2, and trying to bring up an ARM cross-tool development system.

Also, can Blogger show dates? It is hard to tell the age (date) of posts... to that end, today is 6 Nov 2012. Jim

Alex Ott said...

Did you have this problem with my version of ECB or you modified it yourselves? I'm asking, because in my version I already changed test for CEDET's version and it should work not only with CEDET 1.1, but also with CEDET from bzr.

P.S. Post's date is usually shown right about title of blog post

lefan said...

Unfortunately, I have almost the same setup as the previous writer (Suse 12.2 emacs 24.2.1).
And I have the same error.
Use the ECB from https://github.com/alexott/ecb.git

Alex Ott said...

@lefan: if error happens on Emacs's start, then please, run emacs with --debug-init flag, and post trace to me via e-mail (alexott at gmail)

if you get this error during runtime, then enable "Debug on Error" via Options menu, and also send backtrace to me

xshipie said...

Hi,
the same emacs and (Suse 12.2 emacs 24.2.1). Ther error is mor then than max. allowed posting here, so I cut it.
Debugger entered--Lisp error: (error "ECB 2.40: Errors during the layout setup of ECB. (error-type: error, error-data: (\"Variable binding depth exceeds max-specpdl-size\"))")
signal(error ("ECB 2.40: Errors during the layout setup of ECB. (error-type: error, error-data: (\"Variable binding depth exceeds max-specpdl-size\"))"))
error("ECB %s: %s (error-type: %S, error-data: %S)" "2.40" "Errors during the layout setup of ECB." error ("Variable binding depth exceeds max-specpdl-size"))
ecb-clean-up-after-activation-failure("Errors during the layout setup of ECB." (error "Variable binding depth exceeds max-specpdl-size"))
(condition-case err-obj (let ((ecb-redraw-layout-quickly nil) (use-last-win-conf (and ecb-last-window-config-before-deactivation (equal ecb-split-edit-window-after-start (quote before-deactivation)) (not (ecb-window-configuration-invalidp ecb-last-window-config-before-deactivation))))) (ecb-enable-temp-buffer-shrink-to-fit ecb-compile-window-height) (if use-last-win-conf (setq ecb-edit-area-creators (nth 4 ecb-last-window-config-before-deactivation))) (ecb-redraw-layout-full (quote no-buffer-sync) nil (and use-last-win-conf (nth 6 ecb-last-window-config-before-deactivation)) (and use-last-win-conf (nth 5 ecb-last-window-config-before-deactivation))) (if (and use-last-win-conf (null (nth 2 ecb-last-window-config-before-deactivation))) (ecb-toggle-compile-window -1)) (when (member ecb-split-edit-window-after-start (quote (vertical horizontal nil))) (delete-other-windows) (case ecb-split-edit-window-after-start (horizontal (split-window-horizontally)) (vertical (split-window-vertically)))) (ecb-window-sync) (ecb-mode-line-format)) (error (ecb-clean-up-after-activation-failure "Errors during the layout setup of ECB." err-obj)))
(progn (when (< max-specpdl-size 3000) (ecb-modify-emacs-variable (quote max-specpdl-size) (quote store) 3000)) (when (< max-lisp-eval-depth 1000) (ecb-modify-emacs-variable (quote max-lisp-eval-depth) (quote store) 1000)) (when (and ecb-running-xemacs (boundp (quote progress-feedback-use-echo-area))) (ecb-modify-emacs-variable (quote progress-feedback-use-echo-area) (quote store) t)) (ecb-check-cedet-load) (ecb-check-semantic-load) (ecb-check-requirements) (condition-case err-obj (progn (ecb-nav-initialize) (ecb-enable-advices (quote ecb-methods-browser-advices)) (when (and ecb-auto-compatibility-check (not ecb-upgrade-check-done)) (ecb-check-not-compatible-options) (ecb-upgrade-not-compatible-options) (ecb-upgrade-renamed-options) (setq ecb-upgrade-check-done t)) (ecb-initialize-layout) (ecb-initialize-all-internals (not ecb-clear-caches-before-activate)) (ecb-enable-advices (quote ecb-permanent-adviced-layout-functions)) (ecb-enable-advices (quote ecb-winman-not-supported-function-advices)) (ecb-enable-advices (quote ecb-compatibility-advices)) (let ((old-ecb-frame ecb-frame)) (if ecb-new-ecb-frame (progn (run-hooks (quote ecb-activate-before-new-frame-created-hook)) (setq ecb-frame (make-frame)) (put (quote ecb-frame) (quote ecb-new-frame-created) t)) (setq ecb-frame (selected-frame)) (put (quote ecb-frame) (quote ecb-new-frame-created) nil)) (if (not (equal ecb-frame old-ecb-frame)) (ecb-edit-area-creators-init))) (raise-frame ecb-frame) (select-frame ecb-frame) (ecb-enable-own-temp-buffer-show-function t) (ecb-tree-buffer-creators-run) (ecb-eshell-activate-integration) (add-hook (ecb--semantic-after-partial-cache-change-hook) (quote ecb-update-after-partial-reparse) t) (add-hook (ecb--semantic-after-toplevel-cache-change-hook) (quote ecb-rebuild-methods-buffer-with-tagcache) t) (ecb-activate-ecb-autocontrol-function ecb-highlight-tag-with-point-delay (quote ecb-tag-sync)) (ecb-activate-ecb-autocontrol-function ecb-basic-buffer-sync-delay (quote ecb-basic-buffer-sync)) (ecb-activate-ecb-autocontrol-function

P said...

Hi,
I just have encountered a ecb-clean-up-after-activation-failure: ECB 2.40: Errors during the layout setup of ECB. (error-type: error, error-data: ("Variable binding depth exceeds max-specpdl-size"))problem with your git ecb and emacs 24.2.1 (Opensuse 12.2) and latest CEDET.
Any thoughts? Quick glance on google didn't show up and resolution...
P

Alex Ott said...

Some users reported that error went away after they took latest version of GNU Emacs (24.3).
I hope, that I'll have some time soon to reproduce and fix this bug.

Rob said...

I'm using emacs 24.3.1 on a CentOS 5.6 system, with cedet 1.1 and your ecb files. All I had to do was add the ecb directory to my load-path and it works flawlessly. Thanks for doing this port.