Install ECB with Emacs Starter Kit in Emacs 24
Asked Answered
K

6

6

I have Emacs Starter Kit installed. When I try to install and run ECB it does not work.
What is wrong? How to make ECB work with Emacs Starter Kit?

ECB installation

I've tried two ways:

  1. Adding ecb to my-packages list as described here
  2. Installing ecb with list-packages command

Both ways give the same result. During the installation I got a lot of warnings like

In ecb-test-with-original-advice-set:
ecb-advice-test.el:122:16:Warning: reference to free variable `ecb-version'

In ecb-analyse-jump-to-tag:
ecb-analyse.el:443:24:Warning: `interactive-p' is an obsolete function (as of
23.2); use `called-interactively-p' instead.

Total size of the file is 807 lines and I don't know how to add it here keeping the post readable :)

ECB usage

When I try to start ECB by adding (require 'ecb)
to ~/.emacs.d/$USER.el the following error occurs at Emacs start:

File error: Cannot open load file, ecb

The variable load-path does not contain the path to ecb files. When I start Emacs without (require 'ecb) there is no errors and load-path do contain the string
"/home/maksim/.emacs.d/elpa/ecb-2.40". Adding the following line

(add-to-list 'load-path (expand-file-name "~/.emacs.d/elpa/ecb-2.40"))

makes Emacs start without errors, but ECB still not work and ecb-activate acts in the way described below.

If I try to start ECB by calling ecb-activate I see the following in the *Messages* buffer:

ECB 2.40 uses CEDET 1.0 (contains semantic 2.0, eieio 1.3, speedbar <unknown
version>).
ecb-activate-internal: Symbol's value as variable is void: stack-trace-on-error

If I add the following line to ~/.emacs.d/$USER.el

(setq stack-trace-on-error t)

then ecb-activate responds the following

ECB 2.40 uses CEDET 1.0 (contains semantic 2.0, eieio 1.3, speedbar <unknown
version>).
All requirements for ECB 2.40 fulfilled - Enjoy it!
The ECB is now deactivated.
ecb-clean-up-after-activation-failure: ECB 2.40: Errors during the basic setup
of ECB. (error-type: void-function, error-data:
(ecb-enable-own-temp-buffer-show-futition))

Version information

  • GNU Emacs 24.0.92.1 (x86_64-pc-linux-gnu, GTK+ Version 2.22.0)
    of 2011-12-06 on pluot, modified by Debian
  • emacs-starter-kit 2.0.3
  • ecb 2.40
Knesset answered 12/1, 2012 at 10:7 Comment(0)
K
3

I was having the same problems as you, I've just solved it, here are my specs:

  • GNU Emacs 24.0.93.1 (I'm using the snapshot gtk version on Ubuntu 11.10)
  • starter-kit 2.0.3
  • CEDET 1.0pre7 (it's the built-in)
  • latest ECB from CVS repo (http://ecb.cvs.sourceforge.net/ecb/ecb/)

Plus I've did as @user1150335 said with the version number I did not need to change the version number as @user1150335 said. Let me know if I've missed something or you need something more about the configuration.

Kipper answered 23/2, 2012 at 17:31 Comment(3)
This works! Thanks! Downloading new version of ECB solved the problem. But I had to add (setq stack-trace-on-error t) in my configuration file (may be because I have different version of emacs).Knesset
Glad that it helped, yes, I forgot to mention that setq passage.Kipper
On Ubuntu 12.10 with Emacs24 I just updated ECB and added the stack-on-error command to init.el like Maksim Zholudev suggests. Works like a charm! ThanksHeptamerous
C
2

Try to edit ecb-cedet-required-version-max variable (it is in ecb-cedet-wrapper.el). Worked for me. Update: I don't know which version of cedet you're using. But there is an example how I did, step by step:

  1. (setq stack-trace-on-error t) (add it to your .emacs file)
  2. Next, you should find a variable ecb-cedet-required-version-max. In my version of cedet it's in ecb-cedet-wrapper.el:83
  3. To bypass the version check it should be larger than currently installed cedet. (defconst ecb-cedet-required-version-max '(1 2 4 9) Will do the trick for all currently available versions.
  4. That's all. Restart emacs to test it.

For some reason stack-trace-on-error must be true even after correction. I tested it with GNU Emacs 24.0.92.1, CEDET Version: 1.1beta (last checkout from bzr), and the last checkout of ecb from cvs. I don't really use ecb nowadays, but I tried ecb-byte-compile, ecb-activate, ecb-deactivate, jumps to ecb windows (methods, dirs, sources), open cpp and elisp files. Everything works just fine.

Coign answered 15/1, 2012 at 12:24 Comment(1)
The only result of my experiments with this variable was making ECB respond something like "You have wrong version of CEDET" after every command. This made it impossible to cancel my edits since ecb-byte-compile didn't work. ECB still wants stack-trace-on-error variable. It looks like ECB just does not support Emacs 24 and not going to :(Knesset
P
2

You should correct

(ecb-enable-own-temp-buffer-show-futition)

to

(ecb-enable-own-temp-buffer-show-function)

in ecb.el

Parette answered 28/3, 2012 at 2:59 Comment(0)
L
2

There is a new ECB branch on github called newcedet. This version of ECB is compatible with new Emacs versions and CEDET 1.1 and higher. There are also discussions on the ECB mailing list concerning this.

Loesceke answered 4/7, 2012 at 5:46 Comment(2)
That just did it for me (I'm using latest bzr emacs, and the elpa-installed ecb yells at me) thanks Arne!Demon
Looks like a github problem. Try again later.Loesceke
N
2
  1. add (setq version-error nil) in ecb-uprade.el
    which means no version check of cedet.

  2. correct (ecb-enable-own-temp-buffer-show-futition) to (ecb-enable-own-temp-buffer-show-function) in ecb.el

  3. delete ecb.elc and ecb-upgrade.elc

  4. M-x byte-compile-file ecb.el and ecb-upgrade.el

  5. add (setq stack-trace-on-error t) in .emacs or .emacs.d/init.el

  6. M-x ecb-active

Norinenorita answered 3/9, 2012 at 20:14 Comment(0)
V
1

Install ecb-snapshot

M-x package-list-packages

and select ecb-snapshot from it. Also put this on your ~/.emacs.d/$USER.el

(require 'ecb)
(setq stack-trace-on-error t)
Vadnee answered 11/1, 2013 at 10:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.