Status of CEDET and ECB in Emacs 24.2
Asked Answered
K

3

22

I am a bit confused of what I need to do to run CEDET and ECB in Emacs 24.2.1.

The Emacswiki has the following text:

How to enable the CEDET tools which were merged with Emacs

In Emacs 23.2, CEDET was merged into the main Emacs distribution. The configuration code which is explained in CEDET tutorials doesn’t work anymore. For instance you cannot use (semantic-load-enable-gaudy-code-helpers) to enable the useful features.

TODO: please explain what code you need to load the most useful IDE tools provided by CEDET

I got a basic configuration to work with the following in my .emacs:

(global-ede-mode 1)
(require 'semantic/sb)
(semantic-mode 1)
  • Q1: Are CEDET and ECB now bundled with Emacs? If so, why is there a separate Sourceforge project for it?
  • Q2: How can I enable CEDET and ECB in Emacs 24.2? Do I still need to download the source code from the respective websites and install them separately?
Knobloch answered 3/10, 2012 at 15:28 Comment(0)
K
18

You need to take into account several things:

  • CEDET is bundled with GNU Emacs 24.2, but it's slightly outdated... CEDET 1.1 or CEDET from bzr is better from functional point of view. I hope, that Emacs 24.3 will have fresh version of CEDET
  • I have a fork of ECB, that works with fresh CEDET (1.1 or bzr) & with CEDET bundled with Emacs - but you need to install it manually
  • You can enable CEDET bundled with GNU Emacs or CEDET from bzr with following config, for CEDET 1.1 you can use following config.

P.S. I'll try to answer to more questions here, or you can write to me directly via e-mail

Kino answered 3/10, 2012 at 20:33 Comment(4)
Now Emacs 24.3 is out, I noticed that the bundled version of cedet is "2.0" (defined by cedet-version), but on sf.net, cedet's latest version is only "1.1"...Korella
If you'll take version from bzr, then it will also list 2.0 (if I remember correctly)...Kino
I can't find your modified ECB anymore. Wondering where to download it nowadays ?. Thanks in advance.Fantom
Something is wrong with github - I see the repo in the list, but can't access it :-( you can install latest version from MELPA archiveKino
S
6

Q1: Yes and no: CEDET is bundled, but ECB is not. While CEDET is bundled, the main development keeps happening outside of Emacs's repository for partly historical and partly technical reasons.

Q2: (semantic-mode 1) and (global-ede-mode 1) should be sufficient to enable CEDET (no need to (require 'semantic/sb)). As for ECB, since it's not bundled, ...

Surovy answered 3/10, 2012 at 17:57 Comment(1)
Is DECET in the first line a typo?Papilionaceous
C
2

Emacs Code Browser rocks, but it took me a few days to figure out how to set it up to my satisfaction on my current Emacs 24.5.1. Hopefully, the following instructions will help make it more popular going forwards.

Step 1: on Ubuntu: install texinfo via:

sudo apt-get install texinfo

This actually installs makeinfo which is needed in order to install ecb. Macs may already have makeinfo installed -- I don't think I had to install texinfo on my Mac.

Step 2: Use el-get to install ecb. Do a web search on 'el-get emacs' to find out more about el-get. The advantage of using el-get is that it will automagically take care of adding ecb to your emacs load path.

BTW, it seems to take a good 15 or so minutes to install ecb using el-get. Be patient and don't exit emacs if it tells you it has an active process running..

When el-get has finished, it will show a message : ecb has been installed successfully (or something to that effect)

Step 3: Add the following to your emacs init file (either ~/.emacs.d/init.el or ~/.emacs -- make the edits to whichever of these two files is already present)

;; start of ecb configuration/customization:
;;
(require 'ecb)


(setq stack-trace-on-error t)
(setq ecb-version-check nil)
(setq ecb-layout-name "left15")
(setq ecb-tip-of-the-day nil)
(setq ecb-primary-secondary-mouse-buttons 'mouse-1--mouse-2)


(setq ecb-source-file-regexps
  '((".*" .     (("\\(^\\(\\.\\|#\\)\\|\\(~$\\|\\.\\(pyc\\|elc\\|obj\\|o\\|class\\|lib\\|dll\\|a\\|so\\|cache\\)$\\)\\)")
             ("^\\.\\(emacs\\|gnus\\)$")))))



;;
;; disable global semantic idle scheduler.
;; it doesn't really seem to work all that well in automatically
;; reparsing buffers and it's actually intrusive when i'm typing:

(add-hook 'ecb-activate-hook
          '(lambda()
             (semantic-mode t)
             (ecb-maximize-window-methods)
             (setq global-semantic-idle-scheduler-mode nil)
             ))



(add-hook 'after-save-hook
          '(lambda()
             (when (bound-and-true-p ecb-minor-mode)
               ;; this is to get the methods buffer to refresh correctly.
               ;; semantic idle mode refresh doesn't seem to work all that     well.
               (run-at-time 1 nil 'semantic-force-refresh)
               )
             ))


(set-face-attribute 'ecb-default-general-face nil
                    :inherit 'default)

(set-face-attribute 'ecb-default-highlight-face nil
                    :background "#464646")

(set-face-attribute 'ecb-tag-header-face nil
                    :background "#464646")
;;
;; end of ecb configuration/customization

Step 4: Restart emacs, open a python source file (as a test example) in emacs and then type: M-x ecb-activate

If you get a methods list window on the left and the source file view on the right, you've got it working.

Cupel answered 8/7, 2015 at 12:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.