What is ECB

From the web page:

ECB stands for “Emacs Code Browser”. While Emacs already has good editing support for many modes, its browsing support is somewhat lacking. That’s where ECB comes in: it displays a number of informational windows that allow for easy source code navigation and overview.
The informational windows can contain:
As an added bonus, ECB makes sure to keep these informational windows visible, even when you use C-x 1 and similar commands.
It goes without saying that you can configure the layout, ie which informational windows should be displayed where. ECB comes with a number of ready-made window layouts to choose from.
If you use XEmacs you must have installed the package c-support (contains hideshow.el). If you want to read the online-help of ECB in HTML-format you must have the library browse-url (part of the mail-lib XEmacs package) installed; this package is also needed for submitting problem-reports to the ECB-maintainers!

PracticalECB attempts to give a practical guide on how to use ECB and what it can do



ECB requires

Get latest version

To get the development version easily and set it up you can use nXhtml which has a tool for this in the nXhtml menus (see nXhtml / Tools / ECB).

The latest ECB version (2.40) does not work with the CEDET in Emacs 23.2. The CVS version of ECB, however, works with 23.2. You can get it with the following command:

cvs -z3 -d:pserver:anonymous@ecb.cvs.sourceforge.net:/cvsroot/ecb co -P ecb

As of september 2012, the CVS ecb version does not work with the bzr Emacs version: ECB 2.40 - Error: ECB can only be used with cedet [1.0pre6, 1.0.9]! Please install it and restart Emacs!. The current CEDET is 1.1

There is patched version of ECB that works with fresh Emacs & CEDET. See http://alexott.blogspot.com/2012/06/ecb-fresh-emacscedet.html for more details on installation

Via package

The patched version of ECB is also available on the MELPA package repository.

CategoryModes CategoryProgrammerUtils CategoryProject

Multi-Frame ECB

I came up with a solution to satisfy my need to use ECB in multiple frames, and would like to share it here. The solution just deactivate ECB, then ectivates it again in current selected frame.

The following is the lisp code. It is an command. So just put it in your Emacs configuration file and call it as any other commands.

    (defun ecb-activated-in-selected-frame ()
    "A hack to use ECB in multiple frames. It first deactivates ECB, then
    activate it in current frame."
    (let ((current-frame (selected-frame)))
        ; The frame foucs change when activating or deactivating ECB is weird, so
        ; activate current selected frame explicitly.
        (if (and (boundp 'ecb-minor-mode) (ecb-minor-mode))
        (select-frame current-frame)

The code is also on Github: https://github.com/shawnLeeZX/emacs.d/blob/master/lisp/init-ecb.el

Happy coding 😊

Shuai Li