This is the user manual for ECB version 1.96.

ECB stands for ``Emacs Code Browser'' and is a source code browser for (X)Emacs. It is a global minor-mode which displays a couple of windows that can be used to browse directories, files and file-contents like methods and variables. It supports source-code parsing for semantic-supported languages like Java, C, C++, Elisp and Scheme as well as for source-types supported ``only'' by imenu or etags (e.g. perl, TeX, LaTeX etc.).

Please note: Experienced ECB users find a complete alphabetical list of all commands and user-options in Interactive ECB commands and Customizable options.

The latest version of ECB can always be found at the URL http://ecb.sourceforge.net.

To send bug reports, or participate in discussions about ECB, use the mailing list ecb-list@lists.sourceforge.net via the URL http://lists.sourceforge.net/lists/listinfo/ecb-list.

Installation and first steps of ECB
***********************************

This chapter describes how to install ECB and setup (X)Emacs correctly and what are the first steps after activation of ECB.

Installation of ECB
===================

This section describes how to install ECB.

Installation of ECB for XEmacs users
------------------------------------

For XEmacs-users it is strongly recommended to use the package-management-system of XEmacs for first-time downloading/installing ECB or for upgrading to a newer version of ECB. Here is a short guide (for details about the package-manager of XEmacs see the related info-manual):

Caution: If ECB is already installed and you just want upgrading to a newer version then it is recommended to deactivate ECB before proceeding with the steps below!

 1. Choose a download-site

     This can be done via the menu ``Tools --> Packages --> Add Download Site'': Choose one of the listed sites. Or you can customize the option package-get-remote by hand and save it for future sessions.

 2. Activate the packages list

     This can be done either by the menu ``Tools --> Packages --> List and Install'' or via the command pui-list-packages. After that a special packages-buffer is displayed where you can interactively install or upgrade packages. At the end of this buffer there is a short description how to use this buffer.

 3. Install ECB and all required packages

     Mark the package named ``ecb'' for install. Do this also for the required packages ``semantic'', ``eieio'' and ``speedbar''. The package ``mail-lib'' is needed for easy submitting of problem-reports to the ECB-maintainers and the package ``c-support'' is needed for easy using hideshow within the Methods-buffer of ECB (All required packages can simply autom. marked by hitting r in the packages buffer. But this installs a lot of packages more (e.g. the Newsreader Gnus) which are really not essential for ECB. Therefore it is recommended to mark the required packages by hand.).

     After marking all needed packages for installation hit x to install them.

     If you have already installed ECB and you want just upgrading to the latest available version then proceed as described above - same if you want to upgrade one of the required packages.

 4. Start ECB

     Now you can immediately start ECB via the command ecb-activate; there is no need to restart XEmacs! As an alternative you can first read the online-help via ecb-show-help.

If you do not like the package-manager of XEmacs but you want installing ECB ``by hand'' direct from the ECB-website then you have to follow the instructions for GNU Emacs, see GNU Emacs Installation.

Installation of ECB for GNU Emacs users
---------------------------------------

IMPORTANT: If you are a XEmacs-user please read XEmacs Installation before proceeding with the following instructions!

 1. Download and unpack the ECB archive (probably you have already done this :-)

 2. Read the file README in the ECB-directory and install the required semantic-, eieio- and speedbar-version (The speedbar-version shipped with GNU Emacs <= 21.3 does not satisfy the requirements for this feature - download a newer one!).

     Please note: ECB maybe requires a newer version of these libraries than shipped with (X)Emacs. You have to install exactly a version ECB requires and also to make sure that the correct version is loaded into (X)Emacs!

     But ECB performs two autom checks:

       - At load-time: It checks if the packages semantic, eieio and speedbar are at least installed so ECB can be loaded. If not it offers to download and install them.

       - At start-time: It checks if the correct versions of semantic, eieio and speedbar are installed and gives you proper feedback. See Download required packages.

     So if you are not sure if you have installed the required packages at all or if you have installed the correct versions of these packages then do not worry about this, just go on with the following installation steps: If ECB is missing something it will give you proper feedback and support not later than at load-time or start-time!

 3. Add the new ECB-directory to your load-path variable.

     You MUST add the ECB-install-directory to the load-path either by changing the load-path variable directly in your .emacs or site-lisp/site-start.el or by working with a file subdirs.el (This works at least for Emacs 20.X and Emacs 21.X but XEmacs may have slightly different mechanisms; see the XEmacs documentation).

     ATTENTION: ECB is NOT properly installed if it's directory is not added to load-path and for example just loaded by

          (load-file "/path/to/ecb/ecb.el")

     Do not do this!

 4. Load ECB by adding code to your .emacs:

     If you want to load the complete ECB at (X)Emacs-loadtime (Advantage: All ECB-options available after loading ECB. Disadvantage: Increasing loadtime (Cause of full loading of ECB itself and also the packages semantic, eieio and speedbar regardless if ECB is started.)):

          (require 'ecb)

     If you want to load the ECB first after starting it by ecb-activate (Advantage: Fast loading (ECB, semantic, eieio and speedbar are first loaded after starting ECB or with other words: ECB and semantic are not loaded if you do not use/need them). Disadvantage: ECB- and semantic-options first available after starting ECB):

          (require 'ecb-autoloads)

     This loads all available autoloads of ECB, e.g. ecb-activate, ecb-minor-mode, ecb-byte-compile and ecb-show-help.

 5. Restart (X)Emacs.

ECB is now ready for use and can be activated by calling M-x ecb-activate or ecb-minor-mode. Now you can either starting using ECB or you can do these optional installation steps:

 6. Reading the online help with ecb-show-help

     Maybe you are interested to read the online-help of ECB before first start.

 7. Bytecompiling ECB with ecb-byte-compile

     This byte compiles ECB. You can safely ignore all messages if there are any. (You can also bytecompile ECB from the command-line either by using the Makefile or by using the batch-file make.bat; just read the comments in that file you choose.)

 8. Installing the Info-help of ECB

     The ECB distribution contains a subdirectory info-help which contains the online-help of ECB in Info-format. You can install this online help so it's available in the Top-directory of Info. There are two ways to do this:

       - Use ``install-info'' (recommended):

           1. Copy the files of the subdirectory info-help into the info-directory of Emacs

           2. Install the file info-help/ecb.info with the command ``install-info'' (if available on your system) in the dir-file.

          The supplied Makefile offers a target install-help which does both of these steps. You have just to call make install-help with the correct EMACSINFOPATH set (see the comment in Makefile). Here is an example:

               make EMACSINFOPATH=/path/to/emacs/info install-help

       - Manual Installation:

          Copy the files of the subdirectory info-help into the info-directory of Emacs and modify the file dir manually.

     But it doesn't matter if you do not execute this step (8.) because the online help of ECB is always available though, see ecb-show-help (see Interactive ECB commands).

How to set up Emacs for file parsing with ECB
=============================================

Please note: Normally it should not necessary for you to bother with the following stuff unless you have problems getting ECB working correctly for you.

General hints for a correct setup
---------------------------------

ECB is for browsing files and therefore you have to setup your Emacs-configuration properly so the file-parsing engines like semantic, imenu or etags can be activated automatically for parsing your Emacs-Lisp, C, C++ or Java buffers (semantic supports some more ``languages'' like Makefiles etc. but these are the most important ones.). For this Emacs must activate the correct major-mode for the source-files and Emacs can only do this if the option auto-mode-alist is setup correctly. The correct major-modes and possible file-extensions (Especially for C++ and C you can use any extension you want but these are the most common ones!) are:

LANGUAGE

MAJOR-MODE

EXTENSION(S)

Emacs Lisp   emacs-lisp-mode   .el

C   c-mode   .h, .c

C++   c++-mode   .h, .hxx, .hh, .HH, .cxx, .cpp,
.cc, .CC

Java   java-mode or jde-mode (if you use JDEE)
.java

Example: If you want files with extension ``.cpp'' being c++-parsed by semantic and ECB, your auto-mode-alist must contain an entry like:

     ("\\.cpp\\'" . c++-mode)

After this ECB will correctly parse your ``.cpp''-sources and display all the parsing information in the ECB-methods buffer.

Setting up semantic
-------------------

To ensure ECB and semantic are working correctly for all by semantic supported languages you have to pay attention to the following aspects concerning your Emacs-setup:

 1. Setting up semantic itself

     For all semantic-supported file-types parsing files is done completely by semantic. ECB just displays the parsing results. For all needs of ECB semantic is completely setup by ECB itself, i.e. ECB sets up semantic for you! You have only to add the installation directory of semantic to your load-path (in an appropriate way)!

     Please note: If you setup semantic for yourself following the recommendations in the installation instructions of semantic then you have probably added code to your startup-file like:

          (setq semantic-load-turn-everything-on t)
          (require 'semantic-load)

     Be aware that this also enables the minor-modes semantic-show-dirty-mode and semantic-show-unmatched-syntax-mode where the former one highlights all code which has to be reparsed with dark background (which results in large portions of dark background ;-) and the latter one underlines all syntax which can not be parsed. Especially the former one can be really annoying.

     To switch off these modes you can add to your startup-file:

          (global-semantic-show-dirty-mode -1)
          (global-semantic-show-unmatched-syntax-mode -1)

 2. Checking your hooks

     If you have already checked point (1.) and if you have still problems getting ECB/semantic working properly for your sources you should check the related major-mode hook. Every major-mode X has a hook with name ``X-hook'' which is evaluated after activating the major-mode (see above, 2.), e.g. the hook for the major-mode c++-mode is c++-mode-hook.

     Semantic adds automatically during load-time a special ``semantic-setup'' to these major-mode hooks (Of course only for major-modes supported by semantic!) in form of a ``setup-function''. Example: For c and c++ modes semantic adds semantic-default-c-setup to c-mode-hook and c++-mode-hook.

     If your own Emacs-setup (e.g. in .emacs or site-lisp/site-start.el) overwrites such a major-mode-hook then semantic can not be activated for this major-mode and in consequence ECB can not work properly too!

     Check if your Emacs-setup uses somewhere setq for adding code to a major-mode-hook. IMPORTANT: Use add-hook instead of setq (setq replaces/overwrites the current value of a hook with the new value whereas add-hook adds the new value to the old-value of the hook!)!

If your source-files are ``running'' with correct major-mode and correct major-mode hooks ECB and semantic will do what you expect them doing!

Setup for file types not supported by semantic
----------------------------------------------

From version 1.94 on ECB supports also parsing and displaying file-contents for file-types not supported by semantic (i.e. there is no semantic-grammar available for such file-types).

Such non-semantic file-types can often be parsed by imenu and/or etags. Both of these parsing methods are now supported: ECB can display the results of imenu and/or etags in its Method-buffer. ECB uses for this speedbar-logic. Therefore the following speedbar options takes effect for this feature:

  - speedbar-dynamic-tags-function-list

  - speedbar-tag-split-minimum-length

  - speedbar-tag-regroup-maximum-length

  - speedbar-tag-hierarchy-method

Normally there should no need for you to bother with these options, because the default values are suitable for most situations! But if you are not satisfied with the parsing/display results then you can change some of these options.

First steps after activating ECB first time
===========================================

This section of the ECB online-help is displayed automatically by ECB after activating ECB first time and describes what are the first basic steps:

 1. Configure where ECB can find your sources:

     Call M-x customize-option RET ecb-source-path RET (This means first hitting the keys M (Meta- or Alt-key) and x simultaneously, inserting ``customize-option'' in the minibuffer, hitting RETURN, inserting ``ecb-source-path'' in the minibuffer and finally hitting RETURN again). This lets you customize the option ecb-source-path with the customize-feature of Emacs. This opens a customize-buffer where you can insert all the directories where ECB can find your source-files. Save your changes with the button ``Save for future sessions'' and then throw away this customize-buffer either by killing it with M-x kill-buffer or clicking at the button ``Finish''.

 2. Read the online-help of ECB:

     The online-help of ECB is available via

       - calling M-x ecb-show-help,

       - pressing C-c . o or

       - using the menu ``ECB''.

     (The section you are currently reading is part of the online-help of ECB)

 3. Start working with ECB.

Overview
********

ECB is a global minor-mode which offers a couple of ECB-windows for browsing your sources comfortable with the mouse and the keyboard. These ``special'' windows are also called tree-buffer in this manual. Every item in such a tree-buffer, i.e. every line, is also called a node of this tree-buffer. There are currently three different types of ECB-windows/tree-buffers:

  - ECB-Directories

  - ECB-Sources

  - ECB-Methods

In addition to these ``special'' ECB-windows you have always one or two edit-windows (see The edit-window) in the ECB-frame and at the bottom a compilation-window (optional), where all the output of Emacs-compilation (compile, grep etc.) is shown (see Temp- and compile-buffers).

The following ``ascii-screenshot'' illustrates the typical layout of the ECB-frame (This is only one example of the layouts ECB offers, see Changing the ECB-layout):

     ------------------------------------------------------------------
     |              |                                                 |
     |  Directories |                                                 |
     |              |                                                 |
     |--------------|                                                 |
     |              |                                                 |
     |  Sources     |                                                 |
     |              |                                                 |
     |--------------|                 Edit-window(s)                  |
     |              |        (can be splitted in two windows)         |
     |  Methods     |                                                 |
     |              |                                                 |
     |--------------|                                                 |
     |              |                                                 |
     |  History     |                                                 |
     |              |                                                 |
     ------------------------------------------------------------------
     |                                                                |
     |                 Compilation-window (optional)                  |
     |                                                                |
     ------------------------------------------------------------------

In the following subsections the ``special'' ECB-windows will be explained in detail.

ECB Directories-buffer
======================

  * Select directories (and - if enabled - source files) in the ECB-Directories buffer by clicking a mouse button on the directory name or by hitting RETURN when the cursor is placed on the item line, see Usage of ECB.

     IMPORTANT: If you use the POWER-click (i.e. hold down the SHIFT-key while clicking with the primary mouse button (see Using the mouse) or RETURN (see Using the keyboard)) on a directory node in the this buffer then the directory-contents-cache for this directory will be refreshed and actualized.

  * Directory names with a ``[+]'' symbol after (or before) them can be expanded/collapsed by clicking on the symbol, pressing the TAB key (see Using the keyboard) when the cursor is placed on the package line or clicking a mouse button on the item, see Using the mouse.

  * Right clicking on an item will open a popup menu where different operations on the item under the mouse cursor can be performed.

  * Pressing F2 will open the ECB customization group (see Customizing) in the edit window. F3 shows the online help in the edit-window. Pressing F4 in the ECB-directories buffer will offer adding a new source-path.

ECB Sources-buffer
==================

  * Source files can be selected by clicking a mouse button (see Using the mouse) or hitting RETURN (see Using the keyboard) on the source row in the ECB-Sources or ECB- History windows.

     IMPORTANT: If you use the POWER-click (i.e. hold down the SHIFT-key while clicking with the primary mouse button (see Using the mouse) or RETURN (see Using the keyboard)) on a source row in the ECB-Sources or ECB-History windows then the source will not be displayed in the edit-window but it will be scanned in the background and all its contents (e.g. methods and variables) are listed in the ECB Methods window (see ECB Methods-buffer. So you can get an overlook over the source without changing the buffer in the edit-window.

  * Clicking on the source file with the secondary mouse button or C-RETURN (see Usage of ECB) will open the source file in the other edit window.

  * Right clicking on a source file will open a popup menu where different operation on the item under the mouse cursor can be performed.

ECB Methods-buffer
==================

The ECB-Methods buffer contains all parsed and recognized tokens of the current source-buffer. It is called ``Method-buffer'' because ECB is mostly designed for browsing sourcecode files and for programming-languages these tokens are often methods (and variables etc.) To simplify explanations we talk in the following only about methods and variables - but in general the method-buffer can contain any kind of tokens (e.g. sections and subsections for texinfo buffers).

  * When a method/variable is selected with the primary mouse button (see Using the mouse) or RETURN (see Using the keyboard) the edit buffer will jump to the method/variable.

     IMPORTANT: If you use the POWER-click (i.e. hold down the SHIFT-key while clicking with the primary mouse button (see Using the mouse) or RETURN (see Using the keyboard)) on a node in this buffer then the edit-buffer will be narrowed to the selected token (see also option ecb-token-visit-post-actions). But this works only for sources parsed by semantic, not by imenu or etags!

  * Clicking on a method/variable with the secondary mouse button or C-RETURN (see Usage of ECB) will jump to the method in the other edit window.

  * Right clicking on a method/variable will open a popup menu where different operation on the item under the mouse cursor can be performed.

Activation and Deactivation
***************************

This chapter describes all aspects of activating and deactivating ECB.

IMPORTANT: Regardless of the activation-type (standard or automatic) the activation-process of ECB is always completely failure-save. This means any error during any step of the activation-process forces a complete cleanup (e.g. removing hooks, disabling advices etc.) of all settings ECB did (e.g. adding hooks, activating advices etc.) until the failure. Therefore if ECB-activation stops cause of a failure then you can be sure that your Emacs has the same state as before the ECB-activation-start!

Standard activation and deactivation
====================================

Call M-x ecb-activate and M-x ecb-deactivate to activate or deactivate ECB (Activation is also possible via the menu ``Tools --> Start Code Browser (ECB)''.). If you want ECB started in a new frame see the option ecb-new-ecb-frame (default is nil). ecb-activate always raises and selects the ECB-frame even if ECB is already started.

Because ECB is a global minor-mode it can also be (de)activated/toggled by M-x ecb-minor-mode.

The following sequence of hooks is evaluated during activation of ECB:

 1. ecb-before-activate-hook

 2. <All actions for activation but no layout drawing>

 3. ecb-activate-before-layout-draw-hook

 4. ecb-redraw-layout-before-hook

 5. <Drawing the layout>

 6. ecb-redraw-layout-after-hook

 7. ecb-activate-hook

The following sequence of hooks is evaluated during deactivation of ECB:

 1. ecb-before-deactivate-hook

 2. <All actions for deactivation of ECB>

 3. ecb-deactivate-hook

Automatic activation and deactivation
=====================================

There are three options for auto. (de)activation ECB after Emacs-start and also major-mode based.

ecb-auto-activate
     This option is for auto. activating ECB after Emacs-startup. Set this to not nil and ECB will automatically be started after Emacs comes up.

ecb-major-modes-activate
ecb-major-modes-deactivate
     These option give you the possibility to activate (rsp. deactivate) ECB on a major-mode basis, means you can define for which major-modes ECB should be activated and for which modes it should deactivated (See Activation hook-sequence and Deactivation hook-sequence).

     If activating or deactivating is too strong you can also customize ECB with these two option only hiding/showing it's ECB-windows (tree-buffers) on a major-mode basis. At last this is nothing more than auto. calling ecb-toggle-ecb-windows (see Interactive ECB commands) depending which major-mode is active.

If you activate ECB on a major-mode basis you probably want switch off displaying the tip of the day. You can do this with the option ecb-tip-of-the-day.

Usage of ECB
************

This chapter describes in a detailed manner all aspects of using the Emacs Code Browser.

Working with the mouse in the ECB-windows
=========================================

Normally you get best usage if you use ECB with a mouse. ECB distinguishes between a primary and a secondary mouse-button.

With the option ecb-primary-secondary-mouse-buttons the following combinations of primary and secondary mouse-buttons are possible:

  - primary: mouse-2, secondary: C-mouse-2 (means mouse-2 while CTRL-key is pressed.). This is the default.

  - primary: mouse-1, secondary: C-mouse-1

  - primary: mouse-1, secondary: mouse-2

If you change this during ECB is activated you must deactivate and activate ECB again to take effect.

The primary mouse-button
------------------------

A click with the primary button causes the main effect in each ECB-buffer:

  - ECB Directories: Expanding/collapsing nodes and displaying files in the ECB-Sources buffer.

  - ECB sources/history: Opening the file in that edit-window specified by the option ecb-primary-mouse-jump-destination.

  - ECB Methods: Jumping to the method in that edit-window specified by the option ecb-primary-mouse-jump-destination.

The POWER- or SHIFT-click
-------------------------

A click with the primary mouse-button while the SHIFT-key is pressed is called the POWER-click and does the following (depending on the ECB-buffer where the POWER-click occurs):

  - ECB Directory: Refreshing the directory-contents-cache (see ecb-cache-directory-contents).

  - ECB sources/history: Only displaying the source-contents in the method-buffer but not displaying the source-file in the edit-window. This means it opens the clicked source only in the background and shows all its methods/variables in ECB-Methods; the buffer of the edit-window is not changed! This is very useful to get only an overlook for a certain source.

  - ECB Methods: Narrowing to the clicked method/variable/ect... (see ecb-token-visit-post-actions). But this works only for sources parsed by semantic, not by imenu or etags!

Per default the complete node-name of an item in a tree-buffer is displayed in the echo-area if the mouse moves over it, regardless if the related window is the active one or not. You get the same effect always after a POWER-click. In general: Via ecb-show-node-info-in-minibuffer you can specify in a detailed manner for every ECB tree-buffer when and which node-info should be displayed in the minibuffer.

The secondary mouse-button
--------------------------

The secondary mouse-button is for opening (jumping to) the file in the other window (see the documentation ecb-primary-mouse-jump-destination).

The right mouse-button
----------------------

In each ECB-buffer mouse-3 (= right button) opens a special context popup-menu for the clicked item where you can choose several senseful actions.

With the options ecb-directories-menu-user-extension, ecb-sources-menu-user-extension, ecb-methods-menu-user-extension and ecb-history-menu-user-extension you can add new commands to the popup-menus.

With the options ecb-directories-menu-sorter, ecb-sources-menu-sorter, ecb-methods-menu-sorter and ecb-history-menu-sorter you can even re-arrange all the entries of the popup-menus.

Horizontal scrolling with the mouse
-----------------------------------

In each tree-buffer of ECB you can easily scroll left and right with the mouse if the option ecb-tree-easy-hor-scroll is not nil.

The reason for this is: XEmacs has horizontal scroll-bars so invisible parts beyond the right window-border of a tree-buffer can always made visible very easy.

GNU Emacs does not have hor. scroll-bars so especially with the mouse it is quite impossible to scroll smoothly right and left. The functions scroll-left and scroll-right can be annoying and are also not bound to mouse-buttons.

ECB offers three ways for smoothly hor. scrolling with GNU Emacs if ecb-tree-easy-hor-scroll is a positive integer-value S:

  * In all ECB-tree-buffers the keys M-mouse-1 and M-mouse-3 are bound to scrolling left rsp. right with scroll-step S.

  * Clicking with mouse-1 or mouse-2 onto the edge of the modeline has the same effect, i.e. if you click with mouse-1 onto the left \(resp right) edge of the modeline you will scroll left \(resp. right) with scroll-step S.

  * Additionally C-M-mouse-1 and C-M-mouse-3 are bound to scrolling left rsp. right with scroll-step window-width - 2.

This is NOT done for XEmacs cause of its horizontal scrollbars. If you want scrolling left and right with the mouse in XEmacs then activate the horizontal scrollbars.

Working with the keyboard in the ECB-windows
============================================

ECB offers the ecb-mode-map which binds the most important functions of ECB to keys so you can easily use ECB in every window (Regardless if a tree-window or an edit-window) without a mouse.

IMPORTANT: Do not modify ecb-mode-map directly! The option ecb-key-map defines all ECB keybindings, including a common prefix-key (This is by default C-c .). If there are conflicts with other minor-modes or packages you can define very easy another prefix. Please read carefully the description of ecb-key-map (see ecb-general).!

The following sections describe special topics about using the keyboard in the ECB-tree-buffers:

Navigation and Selection in a tree-buffer
-----------------------------------------

In the ECB-buffers RETURN and TAB are the most important keys:

  * RETURN does the same as the primary button and C-RETURN does the same as the secondary button. S-RETURN is the same as the SHIFT-click or POWER-click. The terms ``primary'', ``secondary'', ``SHIFT-'' and ``POWER-click'' are explained in Using the mouse. See also the option ecb-tree-RET-selects-edit-window and the function ecb-toggle-RET-selects-edit-window which is bound to C-t in each tree-buffer of ECB!

  * TAB always expands or collapses expandable nodes.

The RETURN and TAB keys can not be (re)defined with ecb-key-map!

If you set ecb-tree-navigation-by-arrow to not nil then the left- and right-arrow keys work in the ECB tree-window in the following smart way:

  * Left-arrow: If node is expanded then it will be collapsed otherwise (i.e. current node is either not expandable or not expanded) point jumps to the next ``higher'' node in the hierarchical tree (higher means the next higher level or - if no higher level available - the next higher node on the same level).

  * Right-arrow: If node is expandable but not expanded then it will be expanded. Otherwise (i.e. current node is either not expandable or already expanded) point jumps to the next following node (which is the first subnode in case of an already expanded node or simply the next node in the following line).

Incremental search for a node in current tree-buffer
----------------------------------------------------

Each display-able key (e.g. all keys normally bound to self-insert-command) is appended to the current search-pattern. The tree-buffer tries to jump to the first node which matching the current search-pattern either as substring or as prefix (see below). If no match is found then nothing is done. There are some special keys:

  * backspace and delete: Delete the last character from the search-pattern.

  * home: Delete the complete search-pattern

  * end: Expand either to a complete node if current search-pattern is already unique or expands to the greatest common substring or prefix of the nodes. If there are at least two nodes with the same greatest common-prefix than every hit of end jumps to the next node with this common prefix.

For better overlooking the current search-pattern is shown in the echo area. After selecting a node with RET the search-pattern is cleared out. With ecb-tree-incremental-search you can specify if the current search-pattern must be a real prefix of the node (default) or if any substring is matched.

For faster and easier finding the right node in a ecb-window the incremental search ignores the following non interesting stuff:

  - any leading spaces

  - expand/collapse-buttons: [+] rsp. [-]

  - protection-signs (+, -, #) in the method-window if uml-notation is used

  - variables types or return-types in front of variable- or method-names.

  - const specifier for variables

This means: Just type in the prefix (rsp. a substring) of a class-, variable-, method-, directory- or filename and ECB will bring you as fast as possible to the node you want. Incremental node-search uses the value of case-fold-search.

Tip: The ecb-minor-mode offers you in the ecb-mode-map (customizable via ecb-key-map) some keys for selecting every window of the ecb-frame. This makes window-selection a child´s play. For example you can jump into the method-window by hitting C-c . gm.

Adding personal keybindings
---------------------------

There are five hooks which can be used for adding personal keybindings to the ECB tree-buffers:

  - ecb-common-tree-buffer-after-create-hook

  - ecb-directories-buffer-after-create-hook

  - ecb-sources-buffer-after-create-hook

  - ecb-methods-buffer-after-create-hook

  - ecb-history-buffer-after-create-hook

These hooks are called directly after tree-buffer creation so they can be used to add personal local keybindings (To be more general: They can be used to run any arbitrary lisp code after a tree-buffer creation!) either to all tree-buffers (ecb-common-tree-buffer-after-create-hook) or just to a certain tree-buffer. Here is a list which keys MUST NOT be rebound:

  * RET and all combinations with Shift and Ctrl: Used for selecting nodes in all tree-buffers.

  * TAB: Used for expanding/collapsing nodes in all tree-buffers.

  * C-t: Used for toggling ``jump after selection'' in all tree-buffers, see command ecb-toggle-RET-selects-edit-window.

  * All self-inserting characters: Used for easy and fast navigation in all tree-buffers, see Incremental search.

  * F2, F3, F4: Used for customizing ECB, adding source-path in the directories buffer.

The following example binds C-a to some useful code in ALL tree-buffers and C-d to even more useful code ONLY in the directories buffer:

     (add-hook 'ecb-common-tree-buffer-after-create-hook
               (lambda ()
                  (local-set-key (kbd "C-a")
                                 (lambda ()
                                    (interactive)
                                    (message "ECB is great!")))))

     (add-hook 'ecb-directories-buffer-after-create-hook
               (lambda ()
                  (local-set-key (kbd "C-d")
                                 (lambda ()
                                    (interactive)
                                    (message "ECB is wonderful!")))))

Working with the edit-window
============================

ECB offers you all what you need to work with the edit-window as if the edit-window would be the only window of the ECB-frame.

ECB offers you to advice the following functions so they work best with ECB:

  - other-window

  - delete-window

  - delete-other-windows

  - delete-windows-on

  - split-window-horizontally

  - split-window-vertically

  - split-window

  - display-buffer

  - switch-to-buffer

  - switch-to-buffer-other-window

  - other-window-for-scrolling

The behavior of the adviced functions is (slightly simplified):

  * All these adviced functions behaves exactly like their corresponding original functions but they always act as if the edit-window(s) of ECB would be the only window(s) of the ECB-frame. So the edit-window(s) of ECB seems to be a normal Emacs-frame to the user.

  * If there is a durable compile-window (see Temp- and compile-buffers) then all compilation-buffers in the sense of ecb-compilation-buffer-p will be displayed in the compile-window.

  * If called in another frame than the ECB-frame these functions behave exactly like the not adviced original versions!

ATTENTION: If you want to work within the edit-window with splitting and unsplitting the edit-window(s) it is highly recommended to use the adviced-functions of ECB instead of the original Emacs-functions (see above). Per default ECB advices all of the functions mentioned above but with the option ecb-advice-window-functions you can customizes which functions should be adviced by ECB. Please read carefully the documentation of this option!

Another interesting option in the context of the edit-window and these adviced functions is ecb-layout-always-operate-in-edit-window!

Documentation of the adviced window functions
---------------------------------------------

This section describes for every adviced window function (s.a.) how it differs from the original version. Only the differences are mentioned, so if you want the full documentation of such a function call describe-function or C-h f.

 -- Command: other-window ARG &optional ALL-FRAMES
     Around-advice ecb: The ECB-version of other-window. Works exactly like the original function with the following ECB-adjustment: The behavior depends on ecb-other-window-jump-behavior.

 -- Command: delete-window &optional WINDOW
     Around-advice ecb: The ECB-version of delete-window. Works exactly like the original function with the following ECB-adjustment:

     If optional argument WINDOW is nil (i.e. probably called interactively): If called in a splitted edit-window then it works like as if the two parts of the splitted edit window would be the only windows in the frame. This means the part of the splitted edit-window which contains the point will be destroyed and the other part fills the whole edit-window. If called in an unsplitted edit-window then nothing is done. If called in any other window of the current ECB-layout there are two alternatives:

       - If the function is contained in ecb-layout-always-operate-in-edit-window it jumps first in the (first) edit-window and does then it´s job.

       - Otherwise an error is reported.

     If optional argument WINDOW is a live window (i.e. called from program): If WINDOW is an edit-window then this window is deleted, otherwise an error is reported.

 -- Command: delete-other-windows &optional WINDOW
     Around-advice ecb: The ECB-version of delete-other-windows. Works exactly like the original function with the following ECB-adjustment:

     If optional argument WINDOW is nil (i.e. probably called interactively): If called in a splitted edit-window then it works like as if the two parts of the splitted edit window would be the only windows in the frame. This means the part of the splitted edit-window which contains the point fills the whole edit-window.

       - If called in an unsplitted edit-window then nothing is done.

       - If called in one of the ecb-windows then the current one is maximized, i.e. the other ecb-windows (not the edit-windows!) are deleted.

       - If called in the compile window there are two alternatives: If the function is contained in ecb-layout-always-operate-in-edit-window it jumps first in the (first) edit-window and does then it´s job. Otherwise an error is reported.

     If optional argument WINDOW is a live window (i.e. called from program): If WINDOW is an edit-window then this window is maximized (i.e. the other edit-window is deleted), if WINDOW is an ecb-window then only the other ecb-windows are deleted and in all other cases an error is reported.

 -- Command: delete-windows-on BUFFER &optional FRAME
     Around-advice ecb: The ECB-version of delete-windows-on. Works exactly like the original function with the following ECB-adjustment:

     An error is reported if BUFFER is an ECB-tree-buffer. These windows are not allowed to be deleted.

 -- Command: split-window &optional WINDOW SIZE HORFLAG
     Around-advice ecb: The ECB-version of split-window. The meaning of WINDOW must be one of the edit-windows of ECB otherwise an error is reported. If the edit-window is already splitted then nothing will be done. Besides this (e.g. called for a window in another frame than the ecb-frame) it behaves like the original version.

 -- Command: split-window-vertically
     Around-advice ecb: The ECB-version of split-window-vertically. Works exactly like the original function with the following ECB-adjustment:

     Called in an unsplitted edit-window then the edit window will be splitted vertically. If called in an already splitted edit-window then nothing is done. If called in any other window of the current ECB-layout it stops with an error if this function is not contained in ecb-layout-always-operate-in-edit-window.

 -- Command: split-window-horizontally
     Around-advice ecb: The ECB-version of split-window-horizontally. Works exactly like the original function with the following ECB-adjustment:

     Called in an unsplitted edit-window then the edit window will be splitted horizontally. If called in an already splitted edit-window then nothing is done. If called in any other window of the current ECB-layout it stops with an error if this function is not contained in ecb-layout-always-operate-in-edit-window!

 -- Command: display-buffer BUFFER &optional NOT-THIS-WINDOW FRAME
     Around-advice ecb: Makes this function compatible with ECB if called in or for the ecb-frame. It displays all buffers which are ``compilation-buffers'' in the sense of ecb-compilation-buffer-p in the compile-window of ECB. If the compile-window is temporally hidden then it will be displayed first.

     If there is no compile-window (ecb-compile-window-height is nil) then it splits the edit-window if unsplitted and displays BUFFER in the other edit-window but only if pop-up-windows is not nil (otherwise the edit-window will not splitted).

     If called from outside the edit-area for a non-``compilation-buffers'' (s.a.) then it behaves as if called from within an edit-window if display-buffer is contained in ecb-layout-always-operate-in-edit-window: It depends on pop-up-windows if the edit-window is automatically splitted ot not. If ecb-layout-always-operate-in-edit-window does not contain display-buffer then the buffer is displayed in the edit-window without splitting it (if unsplitted).

     If called for other frames it works like the original version.

 -- Command: switch-to-buffer BUFFER &optional NORECORD
     Around-advice ecb: The ECB-version of switch-to-buffer. Works exactly like the original but with the following enhancements for ECB:

     ``compilation-buffers'' in the sense of ecb-compilation-buffer-p will be displayed always in the compile-window of ECB (if ecb-compile-window-height is not nil) - if the compile-window is temporally hidden then it will be displayed first. If you do not want this you have to modify the options ecb-compilation-buffer-names, ecb-compilation-major-modes or ecb-compilation-predicates.

     If called for non ``compilation-buffers'' (s.a.) from outside the edit-area of ECB it behaves as if called from an edit-window if switch-to-buffer is contained in the option ecb-layout-always-operate-in-edit-window. Otherwise an error is reported.

 -- Command: switch-to-buffer-other-window BUFFER &optional FRAME
     Around-advice ecb: The ECB-version of switch-to-buffer-other-window. Works exactly like the original but with some adaptions for ECB so this function works in a ``natural'' way:

     If called in any special ecb-window of the current ECB-layout then it goes always to the first edit-window and then goes on as if called from this edit-window.

     If a compile-window is used (i.e. ecb-compile-window-height is not nil) then ``compilation-buffers'' in the sense of ecb-compilation-buffer-p are always displayed in the compile-window. If the compile-window is temporally hidden then it will be displayed first. If no compile-window is used it behaves like the original.

     If called from within the compile-window then ``compilation-buffers'' will be displayed still there and all other buffers are displayed in one of the edit-windows - if the destination-buffer is already displayed in one of the edit-windows then this one is used otherwise it behaves like the original.

     If called within an edit-window it behaves like the original function except for compilation-buffers (if a compile-window is used, see above).

 -- Function: other-window-for-scrolling
     Around-advice `ecb': This function determines the window which is scrolled if any of the ``other-window-scrolling-functions'' is called (e.g. scroll-other-window). If edit-window is splitted, point stays in the ``other'' edit-window and there is no durable compilation-window then always the first edit-window is chosen.

Temp- and compile-buffers display in ECB
========================================

If you call any help in Emacs, e.g. by calling describe-function, or if you do a completion in the minibuffer, then Emacs displays the result-buffer in another window. This behavior you have also in ECB.

Standard Emacs behavior
-----------------------

If the edit-window is already splitted then the temp-buffer is displayed in the ``other'' edit-window otherwise the edit-window will be splitted first. The variables temp-buffer-max-height and temp-buffer-resize-mode (the latter one does not exist in XEmacs) work also correctly with ECB.

Same for all compilation output-buffers (e.g. after a compile or grep) and the variable compilation-window-height.

This is default behavior of ECB. But there is also another way to display such buffers: Using a durable extra window at the bottom of the ECB-frame:

Using a durable compile window
------------------------------

With the option ecb-compile-window-height you can define if the ECB layout should contain per default a compile-window at the bottom (just specify the number of lines which should be used for the compile-window at the bottom of the frame). If ``yes'' ECB displays all buffers for which the function ecb-compilation-buffer-p returns not nil (e.g. all output of compilation-mode (compile, grep etc.) or all temp-buffers like *Help*-buffers) in this special window.

In general: With the options ecb-compilation-buffer-names, ecb-compilation-major-modes and ecb-compilation-predicates you can define which buffers should be displayed in the compile-window of ECB (for example if you call switch-to-buffer or display-buffer or if you run compile or if you display *Help*-buffers). Per default these are all temp-buffers like *Help*-buffers, all compile- and grep buffers, *Occur*-buffers etc. See the default values of these options.

With the command ecb-toggle-compile-window (bound to C-c . \) you can toggle the visibility of the compile-window (see Interactive ECB commands).

There are some more useful options and commands related to the compile-window of ECB (to see all options for the compile-window see the customization group ecb-compilation):

  * With the option ecb-compile-window-temporally-enlarge you can allow Emacs to enlarge temporally the ECB-compile-window in some situations. Please read the comment of this option. See also the description of the command ecb-toggle-compile-window-height.

  * With the option ecb-enlarged-compilation-window-max-height you specify how ecb-toggle-compile-window-height should enlarge the compile-window.

  * With the command ecb-cycle-through-compilation-buffers (see Interactive ECB commands) you can cycle through all current open compilation-buffers (in the sense of ecb-compilation-buffer-p) very fast.

What to do if there are problems with the compile-window
--------------------------------------------------------

Normally displaying temp- and compilation-buffers (or more general: displaying buffer for which ecb-compilation-buffer-p is not nil) should work reliable. But if there are problems which you can not handle with the options ecb-compilation-buffer-names, ecb-compilation-major-modes or ecb-compilation-predicates then please go on like follows:

 1. Set the option ecb-layout-debug-mode to not nil.

 2. Reproduce the wrong behavior exactly by repeating all the operations which lead to the problem. If possible then restart Emacs before reproducing the problem so you can begin from the beginning!

 3. Now send immediately a bug report with ecb-submit-problem-report.

 4. Set ecb-layout-debug-mode back to nil if you do not want further debugging output in the *Messages* buffer"

Using and customizing the ECB-Methods buffer
============================================

ECB is mostly designed to display parsing information for files supported by semantic. But from version 1.94 on it also supports other parsing engines like imenu and etags, so also files not supported by semantic but by imenu/etags can be displayed in the Method-buffer of ECB. Therefore we have to introduce some terminology:

  - semantic-sources: These are file-types for which a semantic grammar is available, so the files are parse-able by semantic. These sources are supported best by ECB and most of the following options and descriptions are related to these file-types. Examples are programming-sources like C++, C, Java, Emacs-Lisp and Texinfo-file and some more.

  - non-semantic-sources: For these files there is no semantic-grammar available so they can not be parsed by semantic. Examples are Perl-, LaTeX- and TeX-files. But for many of these files imenu and/or etags parsers exist. ECB supports now parsing and displaying these file-types too and it uses for this some speedbar-logic.

This chapter describes how to use and customize the Methods-buffer of ECB.

Possible actions after visiting a token
---------------------------------------

You visit a token by clicking with either the primary oder secondary mouse-button (or by hitting RET if using the keyboard) onto a node in the Methods-tree-buffer of ECB. This simply selects the ``right'' edit-window (depends if clicked with the primary or secondary button and if the edit-window is splitted) and puts the point onto the first line of the clicked token.

But you can define if after this ``basic'' token-visit-action more additional actions should be performed by ECB. You can either use some of the predefined actions (e.g. highlighting the header-line of the token) or define own actions. You can set different actions for different major-modes. All this is done via the option ecb-token-visit-post-actions.

The following actions are currently predefined:

  - ecb-token-visit-highlight-token-header

  - ecb-token-visit-smart-token-start

  - ecb-token-visit-recenter

  - ecb-token-visit-recenter-top

  - ecb-token-visit-goto-doc-start

  - ecb-token-visit-narrow-token

See the documentation of these function for details what they do.

Per default ECB performs the actions ecb-token-visit-smart-token-start and ecb-token-visit-highlight-token-header for all major-modes.

Explicit and automatic expanding of the ECB-methods-buffer
----------------------------------------------------------

Explicit expanding to a certain expanding level
...............................................

With the command ecb-expand-methods-nodes (bound to C-c . x) you can get a fast overlook of the contents of the source-buffer, because this command allows precisely expanding tokens with a certain indentation-level. So you can either expand no tokens (or with other words collapse all tokens) or expand all tokens so see the contents of a buffer at one glance. Or you can expand exactly that tokens of a certain indentation level.

Which node-types are expanded (rsp. collapsed) by this command depends for semantic-sources on the options ecb-methods-nodes-expand-spec and ecb-methods-nodes-collapse-spec! For non-semantic-sources always all node-types are expanded/collapsed, i.e. the two options above takes no effect for these files.

Automatic expanding the ECB-methods-buffer
..........................................

If the option ecb-highlight-token-with-point is switched on, then then always that node in the method-buffer is highlighted which belongs to the current semantic-token under point in the edit-window. But if this node is invisible (probably because its parent node is collapsed) then no node is highlighted if the auto. expanding feature is switched off.

You can either switch on this feature with the option ecb-auto-expand-token-tree or even easier with the command ecb-toggle-auto-expand-token-tree.

There is another option ecb-expand-methods-switch-off-auto-expand which makes both explicit and auto. expanding best working together. See the documentation of this option to get the details.

The autom. expanding feature is only available for semantic-sources!

Customizing the display of the Methods-buffer
---------------------------------------------

The ECB-Methods buffer is probably the most important browsing window offered by ECB. It displays all parsing informations of the current source-buffer (the buffer displayed in the edit-window).

Normally ECB gets all informations displayed in this Methods-buffer from the semantic-library - at least for semantic-sources. This library parses auto. the current source-buffer in the edit-window of ECB and returns all information in form of tokens to ECB which displays them in a browse-able form in its Method-buffer. See ECB Methods-buffer for information how to use the Methods-buffer.

There are several options to customize which tokens ECB should display in general, if the tokens should be collapsed or expanded, how to fontify them (i.e. syntax-highlighting) and something more.

ecb-show-tokens
     Which semantic-tokens (e.g. types, methods, variables etc.) should be displayed and should they be collapsed, flattened or expanded. Sorting is also possible.

ecb-font-lock-tokens
ecb-type-token-display
     How to fontify the tokens in the Method-buffer

ecb-token-display-function
     ECB and semantic offer several predefined functions for displaying the tokens. Here you can customize, what informations tokens should contain (only the method-name or the whole signature or something else) and what notation should be used, e.g. UML or not.

These are the most important options for this topic but it is recommended to have a look into the customize-group ecb-methods (see ecb-methods) and check all the options offered there!

All these options are only relevant for semantic-sources and take no effect for non-semantic-sources!

Rebuilding the Methods-buffer
-----------------------------

In almost all cases there is NO need to manually rebuild the method-buffer, because it is always done automatically if necessary; the mechanism depends on the sources:

  - semantic-sources: The command global-semantic-auto-parse-mode switches on autom. reparsing of semantic-sources.

  - non-semantic-sources (imenu supported): You can switch on autom. rescanning/reparsing with the option imenu-auto-rescan. But nevertheless you have to manually rebuild the Method-buffer (with the autom. updated imenu-tags) via the command ecb-rebuild-methods-buffer (bound to C-c . r).

  - non-semantic-sources (etags supported): For these sources there is no built-in auto-rescan mechanism, because etags is an external tool it can only operate on the saved file-contents. So rescanning the buffer contents would need to save the buffer before. Therefore there is no built-in auto-rescan mechanism because this would always result in saving the buffer and running an external tool. But of course you can program such a an etags-auto-rescan mechanism for yourself!

Besides for etags-supported non-semantic-sources there exist a few rare scenarios also for the other sources where a complete manual rebuild can be necessary. Here is one example:

Depending on the semantic-version: If an Elisp-file is parsed which contains a defun X in the middle where the closing ) is missing, then semantic parses only until this defun X is reached and you will get an incomplete ECB-method buffer. In such a case you must complete the defun X and then completely reparse the Elisp-file and rebuild the ECB method buffer!

A complete manually rebuild is done by ecb-rebuild-methods-buffer. For etags-parsed non-semantic-sources this causes an automatic saving of the source-buffer because otherwise etags would not operate with the latest contents!

Changing, customizing, redrawing and creating layouts
=====================================================

The term ECB-layout means in which windows the ECB-frame is divided. This chapter describes all aspects concerning this layout, especially changing, customizing, redrawing and also creating new layouts.

Changing and customizing the ECB-layout
---------------------------------------

ECB offers several predefined layouts with different sets and also different locations of ECB-windows. See below the ``ascii-screenshot'' of all currently built-in layouts (The command ecb-show-layout-help' shows the outline-picture for all built-in layouts.).

In addition to these predefined layouts you can either interactively create new layouts ``by example'' (see Creating a new ECB-layout) or program new layouts with the macro ecb-layout-define (see The layout-engine). The former method is the recommended one!

There are two ways to interactively change the layout:

  * Changing permanently: Customize the option ecb-layout-name and store it for future Emacs sessions.

  * Switching between several layouts at runtime: If you want to switch fast between a certain sequence of layouts see the option ecb-toggle-layout-sequence and the command ecb-toggle-layout (see Simulating speedbar). For just selecting another layout during current Emacs-session use the command ecb-change-layout.

With the option ecb-show-sources-in-directories-buffer you can define if sources are displayed in the directory-window of a layout (see ECB Directories-buffer).

In addition to the general layout you can specify if the layout should contain a durable compilation-window at the bottom of the frame, see ecb-compile-window-height (see Temp- and compile-buffers).

Maybe you want also change the look&feel of the tree-buffers. Then you can change the location of the collapse- and expand-symbols and the indentation of sub-nodes in a tree. See ecb-tree-indent and ecb-tree-expand-symbol-before.

Here are all currently available layouts (for creating own new layouts see Creating a new ECB-layout); just customize the option ecb-layout-name to the related name:

Layout ``left1''

          -------------------------------------------------------
          |              |                                      |
          |  Directories |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |--------------|                                      |
          |      |       |                                      |
          | Sour | Hist  |                 Edit                 |
          |      |       |                                      |
          |      |       |                                      |
          |--------------|                                      |
          |              |                                      |
          |  Methods     |                                      |
          |              |                                      |
          |              |                                      |
          -------------------------------------------------------
          |                                                     |
          |                    Compilation                      |
          |                                                     |
          -------------------------------------------------------

Layout ``left2''

          -------------------------------------------------------
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |  Directories |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |--------------|                 Edit                 |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |  Sources     |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          -------------------------------------------------------
          |                                                     |
          |                    Compilation                      |
          |                                                     |
          -------------------------------------------------------

Layout ``left3''

          -------------------------------------------------------
          |              |                                      |
          |  Directories |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |--------------|                                      |
          |              |                                      |
          |  Sources     |                 Edit                 |
          |              |                                      |
          |              |                                      |
          |--------------|                                      |
          |              |                                      |
          |  Methods     |                                      |
          |              |                                      |
          |              |                                      |
          -------------------------------------------------------
          |                                                     |
          |                    Compilation                      |
          |                                                     |
          -------------------------------------------------------

Layout ``left4''

          -------------------------------------------------------
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |  Directories |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |--------------|                 Edit                 |
          |      |       |                                      |
          |      |       |                                      |
          |      |       |                                      |
          | Sour | Hist  |                                      |
          |      |       |                                      |
          |      |       |                                      |
          |      |       |                                      |
          -------------------------------------------------------
          |                                                     |
          |                    Compilation                      |
          |                                                     |
          -------------------------------------------------------

Layout ``left5''

          -------------------------------------------------------
          |              |                                      |
          |  Directories |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |--------------|                                      |
          |              |                                      |
          |  Sources     |                 Edit                 |
          |              |                                      |
          |              |                                      |
          |--------------|                                      |
          |              |                                      |
          |  History     |                                      |
          |              |                                      |
          |              |                                      |
          -------------------------------------------------------
          |                                                     |
          |                    Compilation                      |
          |                                                     |
          -------------------------------------------------------

Layout ``right1''

          -------------------------------------------------------
          |                                      |              |
          |                                      |  Directories |
          |                                      |              |
          |                                      |              |
          |                                      |--------------|
          |                                      |              |
          |                                      |              |
          |             Edit                     |  Sources     |
          |                                      |              |
          |                                      |              |
          |                                      |--------------|
          |                                      |              |
          |                                      |  Methods     |
          |                                      |              |
          |                                      |              |
          -------------------------------------------------------
          |                                                     |
          |                    Compilation                      |
          |                                                     |
          -------------------------------------------------------

Layout ``left6''

          -------------------------------------------------------
          |  Sources     |                                      |
          |--------------|                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |  Methods     |                 Edit                 |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |--------------|                                      |
          |  History     |                                      |
          -------------------------------------------------------
          |                                                     |
          |                    Compilation                      |
          |                                                     |
          -------------------------------------------------------

Layout ``top1''

          -------------------------------------------------------
          |                        |             |              |
          |                        |             |              |
          |      Directories       |  Sources    |  Methods     |
          |                        |             |              |
          |                        |             |              |
          |-----------------------------------------------------|
          |                                                     |
          |                                                     |
          |                                                     |
          |                                                     |
          |                    Edit                             |
          |                                                     |
          |                                                     |
          |                                                     |
          |                                                     |
          -------------------------------------------------------
          |                                                     |
          |                    Compilation                      |
          |                                                     |
          -------------------------------------------------------

Layout ``left7''

          -------------------------------------------------------
          |              |                                      |
          |  Directories |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |--------------|                 Edit                 |
          |              |                                      |
          |  History     |                                      |
          |              |                                      |
          |--------------|                                      |
          |              |                                      |
          |  Methods     |                                      |
          |              |                                      |
          -------------------------------------------------------
          |                                                     |
          |                    Compilation                      |
          |                                                     |
          -------------------------------------------------------

Layout ``left8''

          -------------------------------------------------------
          |              |                                      |
          |  Directories |                                      |
          |              |                                      |
          |--------------|                                      |
          |              |                                      |
          |  Sources     |                                      |
          |              |                                      |
          |--------------|                 Edit                 |
          |              |                                      |
          |  Methods     |                                      |
          |              |                                      |
          |              |                                      |
          |--------------|                                      |
          |  History     |                                      |
          |              |                                      |
          -------------------------------------------------------
          |                                                     |
          |                    Compilation                      |
          |                                                     |
          -------------------------------------------------------

Layout ``top2''

          -------------------------------------------------------
          |                                                     |
          |                                                     |
          |                    Methods                          |
          |                                                     |
          |                                                     |
          |-----------------------------------------------------|
          |                                                     |
          |                                                     |
          |                                                     |
          |                                                     |
          |                    Edit                             |
          |                                                     |
          |                                                     |
          |                                                     |
          |                                                     |
          -------------------------------------------------------
          |                                                     |
          |                    Compilation                      |
          |                                                     |
          -------------------------------------------------------

Layout ``left9''

          -------------------------------------------------------
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |   Methods    |                 Edit                 |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          -------------------------------------------------------
          |                                                     |
          |                    Compilation                      |
          |                                                     |
          -------------------------------------------------------

Layout ``left10''

          -------------------------------------------------------
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |  Methods     |                 Edit                 |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |--------------|                                      |
          |      |       |                                      |
          | Sou  | Hist  |                                      |
          |      |       |                                      |
          -------------------------------------------------------
          |                                                     |
          |                    Compilation                      |
          |                                                     |
          -------------------------------------------------------

Layout ``left11''

          -------------------------------------------------------
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |  Methods     |                 Edit                 |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |--------------|                                      |
          |              |                                      |
          |  History     |                                      |
          |              |                                      |
          -------------------------------------------------------
          |                                                     |
          |                    Compilation                      |
          |                                                     |
          -------------------------------------------------------

Layout ``left12''

          -------------------------------------------------------
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |   History    |                 Edit                 |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          -------------------------------------------------------
          |                                                     |
          |                    Compilation                      |
          |                                                     |
          -------------------------------------------------------

Layout ``left13''

          -------------------------------------------------------
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          | Directories  |                 Edit                 |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          -------------------------------------------------------
          |                                                     |
          |                    Compilation                      |
          |                                                     |
          -------------------------------------------------------

Layout ``left14''

          -------------------------------------------------------
          |              |                                      |
          |              |                                      |
          |              |                                      |
          | Directories  |                 Edit                 |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |--------------|                                      |
          |              |                                      |
          |  History     |                                      |
          |              |                                      |
          -------------------------------------------------------
          |                                                     |
          |                    Compilation                      |
          |                                                     |
          -------------------------------------------------------

Layout ``left15''

          -------------------------------------------------------
          |              |                                      |
          |  Directories |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |--------------|                 Edit                 |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          |  Methods     |                                      |
          |              |                                      |
          |              |                                      |
          |              |                                      |
          -------------------------------------------------------
          |                                                     |
          |                    Compilation                      |
          |                                                     |
          -------------------------------------------------------

Layout ``leftright1''

          -------------------------------------------------------
          |             |                         |             |
          | Directories |                         |  Methods    |
          |             |                         |             |
          |             |                         |             |
          |             |                         |             |
          |             |                         |             |
          |             |                         |             |
          |-------------|          Edit           |             |
          |             |                         |             |
          | Sources     |                         |             |
          |             |                         |             |
          |-------------|                         |             |
          |             |                         |             |
          | History     |                         |             |
          |             |                         |             |
          -------------------------------------------------------
          |                                                     |
          |                   Compilation                       |
          |                                                     |
          -------------------------------------------------------

Layout ``leftright2''

          -------------------------------------------------------
          |             |                         |             |
          | Directories |                         |  Methods    |
          |             |                         |             |
          |             |                         |             |
          |             |                         |             |
          |             |                         |             |
          |             |                         |             |
          |             |          Edit           |             |
          |-------------|                         |-------------|
          |             |                         |             |
          | Sources     |                         |  History    |
          |             |                         |             |
          |             |                         |             |
          |             |                         |             |
          |             |                         |             |
          -------------------------------------------------------
          |                                                     |
          |                   Compilation                       |
          |                                                     |
          -------------------------------------------------------

Layout ``leftright3''

          -------------------------------------------------------
          |             |                         |             |
          | Directories |                         |  Methods    |
          |             |                         |             |
          |             |                         |             |
          |             |                         |             |
          |             |                         |             |
          |             |                         |             |
          |             |          Edit           |             |
          |             |                         |             |
          |             |                         |             |
          |             |                         |             |
          |             |                         |             |
          |             |                         |             |
          |             |                         |             |
          |             |                         |             |
          -------------------------------------------------------
          |                                                     |
          |                    Compilation                      |
          |                                                     |
          -------------------------------------------------------

Layout ``left-dir-plus-speedbar''

          -------------------------------------------------------
          |             |                                       |
          | Directories |                                       |
          |             |                                       |
          |             |                                       |
          |             |                                       |
          |             |                                       |
          |             |                                       |
          |-------------|                                       |
          |             |                                       |
          |             |                                       |
          |             |                                       |
          | Speedbar    |                                       |
          |             |                                       |
          |             |                                       |
          |             |                                       |
          -------------------------------------------------------
          |                                                     |
          |                    Compilation                      |
          |                                                     |
          -------------------------------------------------------

Redrawing the ECB-layout
------------------------

If you have unintentionally destroyed the ECB-layout, you can always restore the layout with calling ecb-redraw-layout. This is even true, if you get messages like ``wrong-type-argument window-live-p #<window 222>''.

If the variable ecb-redraw-layout-quickly is not nil then the redraw is done by the ecb-redraw-layout-quickly function, otherwise by ecb-redraw-layout-full. But it's strongly recommended to use the quick redraw only if you have really slow machines where a full redraw takes several seconds because the quick redraw is not really safe and may have some drawbacks! On normal machines the full redraw should be done in << 1s!

See also the hooks ecb-redraw-layout-after-hook and ecb-redraw-layout-before-hook!

Changing the sizes of the special ECB-windows
---------------------------------------------

The standard width and height of the special ECB-windows is defined with the options ecb-windows-width and ecb-windows-height. But changing these options always influences all layouts which is not always desired.

ECB offers to re-adjust the width and height of the ECB-windows (e.g. by dragging the windows-borders via the mouse) and then saving exactly these current window-sizes for the current layout so after activating this layout all windows have autom. the stored sizes.

This is done via the option ecb-layout-window-sizes and the commands ecb-store-window-sizes, ecb-restore-window-sizes and ecb-restore-default-window-sizes.

Here is an example how to resize and store the sizes of the ECB-windows of layout ``left1'':

 1. Switch to layout ``left1'' via ecb-change-layout (C-c . lc)

 2. Resize the ECB-windows by dragging the window-borders with the mouse

 3. Call ecb-store-window-sizes

After this layout ``left1'' will be always drawn with the new sizes until you call ecb-restore-default-window-sizes during layout ``left1'' is active.

Please note: ecb-store-window-sizes stores the width and height of the windows per default as fractions of the width (rsp. height) of the ECB-frame, so the stored sizes are always correct regardless of the current frame-size! But if called with a prefix argument then fixed sizes are stored.

Fixing the sizes of the special ECB-windows
-------------------------------------------

GNU Emacs 21 introduced a new feature which can fix the sizes of a window displaying a certain buffer even after resizing the frame. This new feature is driven by the new buffer-local variable window-size-fixed.

ECB offers an option ecb-fix-window-size for fixing the sizes of the special ECB-windows/buffers even after frame-resizing. The fix type (valid values are nil, t, width and height) can either be set on a layout-basis (means a different value for each layout) or one value can be set for all layouts. In the latter case there is an additional value auto which choose autom. the senseful fix-type depending on the current layout-type: For top-layouts the fix-type height and for all other layout-types the fix-type width.

Probably the most senseful value is auto for all layouts because it makes less sense to fix the height of the ecb-windows in a left-, right- or leftright-layout. Same for fixing the width in a top-layout.

Note: With current Emacs 21.2.X there seems to be no distinction between width, height and t. Therefore this option takes no effect (means all ecb-windows have always unfixed sizes) if ecb-compile-window-height is not nil.

Interactively creating new layouts
----------------------------------

If you want to create your own ECB-layout then you can do this very easy ``by example'' with the command ecb-create-new-layout. This command creates a new empty frame and offers a small set of keys to create the new layout by splitting windows. ecb-create-new-layout and this couple of keys are your guide during the layout-creation-process (During the creation process you will be asked in the minibuffer for several options; here you can use TAB-completion and an ``empty'' RET chooses always the first option!).

After calling ecb-create-new-layout you will be asked which type of layout you want to create: ``left'', ``right'', ``top'' or ``left-right''. Here you specify where the ECB-tree-windows/buffers should be located in the ECB-frame:

  - left: All ECB-tree-windows are located on the left side

  - right: All ECB-tree-windows are located on the right side

  - top: All ECB-tree-windows are located on the top side

  - left-right: All ECB-tree-windows are located on the left and right side

Depending on the type you choose the window is splitted by the values of the options ecb-windows-width (types ``left'', ``right'' and ``left-right'') or ecb-windows-height (type ``top'').

Afterwards you will see a frame like follows (here the layout-type is ``left-right''):

     -----------------------------------------------------------------
     |<point>       |                                   |            |
     |              | ECB-layout creation mode          |            |
     |              | ========================          |            |
     |              |                                   |            |
     |              | <This is a durable help-screen>   |            |
     |              |                                   |            |
     |              |                                   |            |
     |              |                                   |            |
     |              |                                   |            |
     |              |                                   |            |
     |              |                                   |            |
     |              |                                   |            |
     |              |                                   |            |
     |              |                                   |            |
     |              |                                   |            |
     -----------------------------------------------------------------
                    |
                    |   ,---
                    `---| Splitted by the value of ecb-windows-width.
                        `---

The big window (here the middle window) will be the edit-window of the new layout and can not be selected, deleted or splitted during the creation process. It displays the help-screen for the layout-creation mode. Here all the available commands are displayed.

The small window(s) (here the left and right windows) can be splitted by you wherever you want (C-s). The left one contains the point. You must give every ECB-tree-window you create a type (C-t) which can be either

  * One of the built-in types

     This can be either ``directories'', ``sources'', ``methods'', ``history'' or ``speedbar''.

  * Any user-defined type:

     In this case you insert ``other'' after hitting C-t and you will then be asked for the name of the user-defined type. You can insert any arbitrary type name X. But to get this layout working you have to define a function with name ecb-set-X-buffer whereas X is the name of the user-defined type you have specified during layout-creation.

     This function ecb-set-X-buffer has first to switch to the buffer you want to display in this window and then making this window dedicated. You have to use the macro ecb-with-dedicated-window in such a function!

     Here is an example: Suppose you have inserted as type name ``example'' then you have to define and load a function ecb-set-example-buffer which could be defined like follows:

          (defun ecb-set-example-buffer ()
            (ecb-with-dedicated-window
              " *ECB example-buffer*"
              'ecb-set-example-buffer
                (switch-to-buffer (get-buffer-create " *ECB example-buffer*"))))

     If you forget to define such a function for the user-defined type then nevertheless ECB will draw this layout but it will use the default-function ecb-set-default-ecb-buffer instead.

If you are satisfied with your new layout just hit C-q. You will be asked for a new layout-name (TAB-completion is offered to get a list of all names already in use) and after inserting a new(!) name the new layout is saved in the file defined by the option ecb-create-layout-file. The new layout is now available via the option ecb-layout-name.

There is no need for you to load the file ecb-create-layout-file manually into your Emacs because it's automatically loaded by ECB!

Please note: During the layout-creation process only the commands displayed in the help-screen are available. ALL other commands are temporally disabled (even the mouse-commands).

For programming new layouts with emacs-lisp see The layout-engine.

With the command ecb-delete-new-layout you can delete previously created layouts (TAB-completion is offered for all names of user created layouts).

Hiding/Showing the ECB windows
==============================

With ecb-toggle-ecb-windows, ecb-hide-ecb-windows and ecb-show-ecb-windows you can hide/show all the ECB windows without changing the activation state of ECB and also without deactivating the advices for delete-other-windows and/or delete-window. This is most useful if you use a layout like ``top2'' (see Tips and tricks) or if you want to have maximum space for editing and you don't need the browsing windows all the time.

The following sequence of hooks is evaluated during showing again the hidden ECB-windows:

 1. ecb-show-ecb-windows-before-hook

 2. ecb-redraw-layout-before-hook

 3. <Redrawing the layout to show the hidden ECB-windows>

 4. ecb-redraw-layout-after-hook

 5. ecb-show-ecb-windows-after-hook

The following sequence of hooks is evaluated during hiding the ECB-windows:

 1. ecb-hide-ecb-windows-before-hook

 2. <Hiding the ECB-windows>

 3. ecb-hide-ecb-windows-after-hook

Maximizing the ECB windows
==========================

To get a better overlook about the contents of a certain ECB-window every ECB-window can be ``maximized'', means all other ECB-windows are deleted so only the edit-window(s) and this maximized ECB-window are visible (and maybe a compile-window if active). There are several ways to do this:

  * Via the popup-menus of the ECB-windows

  * Via the main ``ECB''-menu and here ``Display window maximized''

  * Via calling the adviced version of delete-other-windows (This command is adviced per default, see The edit-window.) (bound to C-x 1) in one of the ECB windows.

  * Via one of the commands ecb-maximize-window-directories, ecb-maximize-window-sources, ecb-maximize-window-methods, ecb-maximize-window-history or ecb-maximize-window-speedbar or the bound short-cuts for those commands.

  * Via the new command ecb-cycle-maximized-ecb-buffers which cycles through all ecb-buffers of current layout by maximizing exactly one of the ecb-windows after every cycle-step.

Minimizing such a maximized ECB-window, i.e. bringing back to its original size, can simply be done by redrawing the layout via the command ecb-redraw-layout (bound to C-c . lr).

Back- and forward navigation like a browser
===========================================

With ECB you can ``browse'' in your source-files like with a web-browser. This means ECB stores the current buffer- and window-position relative to the current token (e.g. a method, a variable or any other semantic token) in the edit-window after

  - selecting a token in the ECB-methods buffer or

  - selecting a source-file in the ECB-sources/history-buffer.

ECB offers two commands ecb-nav-goto-next (C-c . n) and ecb-nav-goto-previous (C-c . p) to go forward and backward within this navigation history-list. These commands are also available via the menu ``ECB --> Navigate''.

Aside normal ``location-browsing'' this is useful for example in a scenario where the buffer is narrowed to a token (see ecb-token-visit-post-actions):

 1. You edit a function

 2. Goto another function above the current in the same file

 3. Add a few lines

 4. Call ecb-nav-goto-previous

     Now you will edit at the same place in the function.

Synchronization of the ECB-windows
==================================

Per default ECB synchronizes automatically the contents of the ECB-windows/tree-buffers with the current active edit-window (rsp. the current buffer of the edit window):

  * ECB-directories:

     This windows is synchronized to display the directory where the source-file which is displayed in the edit-window is located. If the source-path (i.e. an element of the option ecb-source-path) containing this directory is not expanded it will be auto. expanded according to the value of the option ecb-auto-expand-directory-tree (see ecb-directories).

  * ECB-sources:

     The ECB-sources-buffer contains after synchronizing all the sources of the directory of the ``current'' source-file displayed in the edit-window. The entry of the ``current'' source-file is highlighted.

  * ECB-methods:

     Contains after synchronizing all the tokens of the buffer in the edit-window, i.e. all methods, variables etc... depending of the major-mode.

  * ECB-history:

     Highlights the entry of the buffer displayed in the edit-window if this buffer is a source-file.

This feature can be customized with the option ecb-window-sync:

If active then the synchronization takes place always a buffer changes in the edit window, if deactivated then never. But you can also set this option to a list of major-modes and then the sync. will only be done if the major-mode of the current buffer belongs NOT to this list.

But in every case the synchronization takes only place if the major-mode of the current-buffer in the edit-window has a relation to files or directories. Examples for the former one are all programming-language-modes like c++-mode or java-mode, Info-mode too, an example for the latter one is dired-mode. For all major-modes related to non-file/directory-buffers like help-mode, customize-mode and others never a synchronization will be done!

It's recommended to exclude at least Info-mode because it makes no sense to synchronize the ECB-windows after calling the Info help. Per default also dired-mode is excluded but it can also making sense to synchronize the ECB-directories/sources windows with the current directory of the dired-buffer in the edit-window.

If you often need to toggle between autom. synchronization on and off then customizing the option ecb-window-sync is inefficient and therefore ECB offers the command ecb-toggle-window-sync.

Please note: With the command ecb-window-sync you can do a manually synchronization if the automatic one is switched off or if you just want to do this!

Interactive ECB commands
========================

ECB offers a lot of interactive commands. Some of these commands prompt the user in the minibuffer if called with a prefix argument.

Example: If ecb-clear-history is called with a prefix argument then you will be prompted in the minibuffer with:

     Clear from history: [all, not-existing-buffers, existing-buffers]

You can choose one of the options enclosed in brackets with TAB-completion; hitting RET direct after the prompt chooses auto. the first offered option (in the example above ``all'').

Please note: The following interactive commands of ECB are listed without the prefix ``ecb-'' (e.g. the command ecb-activate is listed with name ``activate''). This has been done for a better readable command index. See Command Index.

 -- Command: activate
     Activates ECB and creates the special buffers for the choosen layout. For the layout see ecb-layout-name. This function raises always the ECB-frame if called from another frame. This is the same as calling ecb-minor-mode with a positive argument.

 -- Command: add-all-buffers-to-history
     Add all current file-buffers to the history-buffer of ECB. If ecb-sort-history-items is not nil then afterwards the history is sorted alphabetically. Otherwise the most recently used buffers are on the top of the history and the seldom used buffers at the bottom.

 -- Command: change-layout &optional preselect-type
     Select a layout-name from all current available layouts (TAB-completion is offered) and change the layout to the selected layout-name. If optional argument PRESELECT-TYPE is not nil then you can preselect a layout-type \(TAB-completion is offered too) and then you will be asked only for layouts of that preselected type. Note: This function works by changing the option ecb-layout-name but only for current Emacs-session.

 -- Command: clear-history &optional clearall
     Clears the ECB history-buffer. If CLEARALL is nil then the behavior is defined in the option ecb-clear-history-behavior otherwise the user is prompted what buffers should be cleared from the history-buffer. For further explanation see ecb-clear-history-behavior.

 -- Command: create-new-layout
     Start process for interactively creating a new ECB-layout (see Creating a new ECB-layout).

 -- Command: cycle-maximized-ecb-buffers
     Cycles through all ecb-buffers of current layout by maximizing exactly one of the ecb-windows after every cycle-step.

 -- Command: cycle-through-compilation-buffers &optional choose-buffer
     Cycle through all compilation buffers currently open and display them within the compilation window ecb-compile-window. If the currently opened buffer within the compilation window is not a compilation buffer, we jump to the first compilation buffer. If not we try to loop through all compilation buffers. If we hit the end we go back to the beginning.

     If CHOOSE-BUFFER is not nil then the user will be prompted for the compilation-buffer to switch to.

 -- Command: deactivate
     Deactivates the ECB and kills all ECB buffers and windows.

 -- Command: delete-new-layout
     Select a layout-name for a layout created by ecb-create-new-layout and delete this layout. This means the layout-definition is removed from the file ecb-create-layout-file and the layout-function and associated aliases are unbound.

 -- Command: display-upgraded-options
     Display a message-buffer which options have been upgraded or reset.

 -- Command: download-ecb
     Download ECB from the ECB-website and install it. For this the option ecb-download-url must be set correct, whereas the default value of this option should always be correct.

     If ecb-download-package-version-type is set to -1 (means asking for a version) then you will be ask in the minibuffer for the version to download. Otherwise ECB downloads autom. the latest version available for the type specified in ecb-download-package-version-type. If no newer version than the current one is available no download will be done.

     For details about downloading and what requirements must be satisfied see function ecb-package-download and option ecb-download-package-version-type!

     After successful downloading the new ECB will be installed in a subdirectory of ecb-download-install-parent-dir. After adding this subdirectory to load-path and restarting Emacs the new ECB version can be activated by ecb-activate.

     If current running ECB is installed as regular XEmacs-package and not with the archive available at the ECB website then this function asks for proceeding!

 -- Command: download-semantic
     Download semantic from the semantic-website and install it. For this the variable ecb-cedet-url must be set correct, whereas the default value of this variable should always be correct.

     If ecb-download-package-version-type is set to -1 (means asking for a version) then you will be ask in the minibuffer for the version to download. Otherwise ECB downloads autom. the latest version available for the type specified in ecb-download-package-version-type. If no newer version than the current one is available no download will be done.

     For details about downloading and what requirements must be satisfied see function ecb-package-download and option ecb-download-package-version-type!

     After successful downloading the new semantic will be installed in a subdirectory of ecb-download-install-parent-dir. After adding this new subdirectory to load-path and restarting Emacs the new semantic version is loaded and is used after next start of ECB.

     If current running semantic is installed as regular XEmacs-package and not with the archive available at the semantic website then this function asks for proceeding!

 -- Command: expand-methods-nodes &optional force-all
     Set the expand level of the nodes in the ECB-methods-buffer.

     This command asks in the minibuffer for an indentation level LEVEL. With this LEVEL you can precisely specify which level of nodes should be expanded. LEVEL means the indentation-level of the nodes.

     A LEVEL value X means that all nodes with an indentation-level <= X are expanded and all other are collapsed. A negative LEVEL value means all visible nodes are collapsed.

     Nodes which are not indented have indentation-level 0!

     Which node-types are expanded (rsp. collapsed) by this command depends on the options ecb-methods-nodes-expand-spec and ecb-methods-nodes-collapse-spec! With optional argument FORCE-ALL all tokens will be expanded/collapsed regardless of the values of these options.

     Examples:

       - LEVEL = 0 expands only nodes which have no indentation itself.

       - LEVEL = 2 expands nodes which are either not indented or indented indented once or twice

       - LEVEL ~ 10 should normally expand all nodes expect there are nodes which are indented deeper than 10.

     Note 1: This command switches off auto. expanding of the method-buffer if ecb-expand-methods-switch-off-auto-expand is not nil. But it can be switched on again quickly with ecb-toggle-auto-expand-token-tree or [C-c . a].

     Note 2: All this is only valid for file-types parsed by semantic. For other file types which are parsed by imenu or etags (see ecb-process-non-semantic-files) FORCE-ALL is always true!

 -- Command: eshell-current-buffer-sync
     Synchronize the eshell with the directory of current source-buffer. This is only done if the eshell is currently visible in the compile-window of ECB and if either this function is called interactively or ecb-eshell-synchronize is not nil.

 -- Command: eshell-recenter
     Recenter the eshell window so that the prompt is at the buffer-end.

 -- Command: expand-directory-nodes
     Set the expand level of the nodes in the ECB-directories-buffer. For argument LEVEL see ecb-expand-methods-nodes.

     Be aware that for deep structured paths and a lot of source-paths this command can last a long time - depending of machine- and disk-performance.

 -- Command: goto-window-compilation
     Goto the ecb compilation window ecb-compile-window.

 -- Command: goto-window-directories
     Make the ECB-directories window the current window. If ecb-use-speedbar-instead-native-tree-buffer is dir then goto to the speedbar-window.

 -- Command: goto-window-edit1
     Make the (first) edit-window window the current window.

 -- Command: goto-window-edit2
     Make the second edit-window (if available) window the current window.

 -- Command: goto-window-history
     Make the ECB-history window the current window.

 -- Command: goto-window-methods
     Make the ECB-methods window the current window. If ecb-use-speedbar-instead-native-tree-buffer is method then goto to the speedbar-window.

 -- Command: goto-window-sources
     Make the ECB-sources window the current window. If ecb-use-speedbar-instead-native-tree-buffer is source then goto to the speedbar-window.

 -- Command: jde-display-class-at-point
     Display in the ECB-methods-buffer the contents (methods, attributes etc...) of the class which contains the definition of the ``thing'' under point (this can be a variable-name, class-name, method-name, attribute-name). This function needs the same requirements to work as the method-completion feature of JDEE (see jde-complete)!. The source-file is searched first in jde-sourcepath, then in jde-global-classpath, then in $CLASSPATH, then in current-directory.

     Works only for classes where the source-code (i.e. the *.java-file) is available.

 -- Command: maximize-window-directories
     Maximize the ECB-directories-window, i.e. delete all other ECB-windows, so only one ECB-window and the edit-window(s) are visible (and maybe a compile-window). Works also if the ECB-directories-window is not visible in current layout.

 -- Command: maximize-window-sources
     Maximize the ECB-sources-window, i.e. delete all other ECB-windows, so only one ECB-window and the edit-window(s) are visible (and maybe a compile-window). Works also if the ECB-sources-window is not visible in current layout.

 -- Command: maximize-window-methods
     Maximize the ECB-methods-window, i.e. delete all other ECB-windows, so only one ECB-window and the edit-window(s) are visible (and maybe a compile-window). Works also if the ECB-methods-window is not visible in current layout.

 -- Command: maximize-window-history
     Maximize the ECB-history-window, i.e. delete all other ECB-windows, so only one ECB-window and the edit-window(s) are visible (and maybe a compile-window). Works also if the ECB-history-window is not visible in current layout.

 -- Command: maximize-window-speedbar
     Maximize the ECB-speedbar-window, i.e. delete all other ECB-windows, so only one ECB-window and the edit-window(s) are visible (and maybe a compile-window). Does nothing if the speedbar-window is not visible within the ECB-frame.

 -- Command: minor-mode &optional arg
     Toggle ECB minor mode. With prefix argument ARG, turn on if positive, otherwise off. Return non-nil if the minor mode is enabled.

 -- Command: nav-goto-previous
     Go backward in the navigation history-list, see Back/forward navigation.

 -- Command: nav-goto-next
     Go forward in the navigation history-list, see Back/forward navigation.

 -- Command: rebuild-methods-buffer
     Updates the methods buffer with the current buffer after deleting the complete previous parser-information, means no semantic-cache is used! Point must stay in an edit-window otherwise nothing is done. This method is merely needed for semantic parsed buffers if semantic parses not the whole buffer because it reaches a not parse-able code or for buffers not supported by semantic but by imenu or etags.

     Examples when a call to this function can be necessary:

       * If an Elisp-file is parsed which contains in the middle a defun X where the closing ) is missing then semantic parses only until this defun X is reached and you will get an incomplete ECB-method buffer. In such a case you must complete the defun X and then call this function to completely reparse the Elisp-file and rebuild the ECB method buffer!

       * For not semantic supported buffers which can be parsed by imenu or etags (see ecb-process-non-semantic-files) because for these buffers there is no built-in auto-rebuild mechanism. For these buffers this command calls ecb-rebuild-methods-buffer-for-non-semantic.

 -- Command: redraw-layout
     Redraw the ECB screen. If the variable ecb-redraw-layout-quickly is not nil then the redraw is done by the ecb-redraw-layout-quickly function, otherwise by ecb-redraw-layout-full. But it's strongly recommended to use the quick redraw only if you have really slow machines where a full redraw takes several seconds because the quick redraw is not really safe and may have some drawbacks! On normal machines the full drawback should be done in << 1s!

 -- Command: restore-default-window-sizes
     Resets the sizes of the ECB windows to their default values.

 -- Command: restore-window-sizes
     Sets the sizes of the ECB windows to their stored values. See option ecb-layout-window-sizes and command ecb-store-window-sizes.

 -- Command: show-help &optional format
     Shows the online help of ECB either in Info or in HTML format depending of the value of ecb-show-help-format. If called with prefix argument, i.e. if FORMAT is not nil then the user is prompted to choose the format of the help (Info or HTML). If an error about not finding the needed help-file occurs please take a look at the options ecb-help-info-start-file and ecb-help-html-start-file!

     Note: If you got ECB as a standard XEmacs-package maybe the HTML-online-documentation is not included.

 -- Command: show-layout-help
     Select a name of a layout and shows the documentation of the associated layout-function. At least for the built-in layouts the documentation contains a picture of the outline of the chosen layout.

 -- Command: show-tip-of-the-day
     Show tip of the day if ecb-tip-of-the-day is not nil or if called interactively.

 -- Command: store-window-sizes &optional fix
     Stores the sizes of the ECB windows for the current layout. The size of the ECB windows will be set to their stored values when ecb-redraw-layout or ecb-restore-window-sizes is called. To reset the window sizes to their default values call ecb-restore-default-window-sizes. Please read also the documentation of ecb-layout-window-sizes!

     The windows sizes are stored per default as fractions of current frame-width and -height of the ecb-frame, so the stored values will ``work'' for other frame sizes too. But if FIX is not nil (means called with a prefix argument) then the fixed values of current width and height are stored!

 -- Command: submit-problem-report
     Submit a problem report for the ECB to the ECB mailing-list. This command generates in the edit-window a problem-report which contains already the current values of all ECB options, the current backtrace-buffer if there is any and the current message-buffer. You will be asked for a problem-report subject and then you must insert a description of the problem. Please describe the problem as detailed as possible!

 -- Command: toggle-auto-expand-token-tree &optional arg
     Toggle auto expanding of the ECB-methods-buffer. With prefix argument ARG, make switch on if positive, otherwise switch off. If the effect is that auto-expanding is switched off then the current value of ecb-auto-expand-token-tree is saved so it can be used for the next switch on by this command.

 -- Command: toggle-compile-window &optional arg
     Toggle the visibility of the compile-window of ECB. With prefix argument ARG, make visible if positive, otherwise invisible. The height of the compile-window is always the current saved (for future sessions) value of ecb-compile-window-height, i.e. this command can only display a compile-window if ecb-compile-window-height has such a saved value of not nil!

 -- Command: toggle-compile-window-height &optional arg
     Toggle whether the ecb-compile-window is enlarged or not. If ARG > 0 then shrink or enlarge the the compile-window according to the value of ecb-enlarged-compilation-window-max-height. But never shrink below the value of ecb-compile-window-height. If ARG <= 0 then shrink ecb-compile-window to ecb-compile-window-height and if ARG is nil then toggle the enlarge-state.

 -- Command: toggle-ecb-windows &optional arg
     Toggle visibility of the ECB-windows. With prefix argument ARG, make visible if positive, otherwise invisible. This has nothing to do with (de)activating ECB but only affects the visibility of the ECB windows. ECB minor mode remains active!

 -- Command: toggle-layout
     Toggles between the layouts defined in ecb-toggle-layout-sequence (See also option ecb-show-sources-in-directories-buffer). Note: This function works by changing the options ecb-layout-name but only for current Emacs-session.

 -- Command: toggle-window-sync &optional arg
     Toggle auto synchronizing of the ECB-windows. With prefix argument ARG, switch on if positive, otherwise switch off. If the effect is that auto-synchronizing is switched off then the current value of the option ecb-window-sync is saved so it can be used for the next switch on by this command. See also the option ecb-window-sync.

 -- Command: update-directories-buffer
     Updates the ECB directories buffer.

 -- Command: upgrade-options
     Check for all ECB-options if their current value is compatible to the defined type. If not upgrade it to the new type or reset it to the default-value of current ECB. Try also to upgrade renamed options. Displays all upgraded or reset options with their old (before the upgrade/reset) and new values.

 -- Command: window-sync
     Synchronizes all special ECB-buffers with current buffer.

     Depending on the contents of current buffer this command performs different synchronizing tasks but only if ECB is active and point stays in an edit-window.

       * If current buffer is a file-buffer then all special ECB-tree-buffers are synchronized with current buffer.

       * If current buffer is a dired-buffer then the directory- and the sources-tree-buffer are synchronized if visible

     In addition to this the hooks in ecb-current-buffer-sync-hook run.

Most of these functions are also available via the menu ``ECB'' and also via the ECB key-map with prefix C-c . (see ecb-minor-mode for a complete list of the keybindings).

Customizing ECB
***************

This chapter describes how to customize ECB for your personal taste. The first section introduces some general aspects (which you should really know!), the second one gives an overview of the most important options and the third one lists all options of ECB (divided into the customize groups).

General aspects for customizing ECB
===================================

The best way to customize all the options of ECB is via the customize-feature of (X)Emacs, i.e. means calling the commands customize-option or customize-group etc. This is also the strongly recommended way!

But of course you can also use setq or some Elisp-code to change the values of many but not all of the options. The values of the following options MUST NOT be changed via setq or Elisp-code but only with the customize-feature!

ecb-advice-window-functions
ecb-bucket-token-display
ecb-compile-window-height
ecb-compile-window-temporally-enlarge
ecb-exclude-parents-regexp
ecb-font-lock-tokens
ecb-highlight-token-with-point-delay
ecb-key-map
ecb-layout-name
ecb-layout-window-sizes
ecb-mode-line-prefixes
ecb-show-node-info-in-minibuffer
ecb-show-tokens
ecb-source-path
ecb-token-display-function
ecb-tree-RET-selects-edit-window
ecb-type-token-display
ecb-windows-height
ecb-window-sync-delay
ecb-windows-width
ecb-use-speedbar-instead-native-tree-buffer
ecb-toggle-layout-sequence
ecb-mode-line-data
ecb-mode-line-display-window-number
ecb-compile-window-width

IMPORTANT: If you are the administrator for an Emacs-site, means you are responsible for the basic customization of a lot of Emacs users, then you maybe need a way to customize Emacs and ECB without changing everyones .emacs-file and normally you will do this with the file site-start.el. You can customize all options of ECB in a central site-start.el (even the options mentioned above!) but you MUST NOT do this via setq but you have to use custom-set-variables (At least for the options for which setq is explicitly forbidden, but it is recommended to use always custom-set-variables!)! Here is a short example how this can be done:

     (custom-set-variables '(ecb-show-tokens ((include collapsed nil)
                                              (parent collapsed nil)
                                              (type flattened nil)
                                              (variable collapsed name)
                                              (function flattened name)
                                              (rule flattened name)
                                              (section flattened nil)
                                              (def collapsed name)
                                              (t collapsed name)))
                           '(ecb-font-lock-tokens t)
                           ;; add here more options of ECB it you want
                           )

But ensure that you customize the options with the correct lisp format. Read carefully the docstrings of the options you want to customize from within Elisp-code!

The most important options of ECB
=================================

Here are the most important options (it is recommended to check at least the following options before working with ECB):

ecb-source-path
     Where ECB can find your sources. You must set this option!

ecb-show-help-format
     Should the online help of ECB be displayed in the standard Info format or in HTML format in a web-browser.

ecb-auto-activate
ecb-major-modes-activate
ecb-major-modes-deactivate
     Auto. (de)activation of ECB

ecb-key-map
     All ECB-keybindings incl. a common prefix-key (see Using the keyboard).

ecb-new-ecb-frame
     Should ECB create a new frame at activation time.

ecb-primary-secondary-mouse-buttons
ecb-primary-mouse-jump-destination
     Define how to use the mouse (see Using the mouse).

ecb-tree-expand-symbol-before
ecb-tree-indent
     The look&feel of the trees in the tree-buffers. Maybe you like a value of 4 for the latter one if you display the expand-symbol before (see Changing the ECB-layout).

ecb-source-file-regexps
     Which files will (not) be shown in ECB.

ecb-show-node-info-in-minibuffer
     When and which node-info should be displayed in the minibuffer?

ecb-layout-name
     The ECB layout, means which windows you want to be displayed in the ECB-frame and also the location of these windows (see Changing the ECB-layout).

ecb-token-display-function
ecb-type-token-display
ecb-show-tokens
     How to display the entries in the ECB-method window for semantic supported sources (see Customizing the display). These options take only effect for semantic-sources (see Definition of semantic- and non-semantic-sources).

ecb-process-non-semantic-files
     Displaying file-contents for not by semantic supported files too, e.g. for LaTeX- and perl-sources.

But to make ECB working best for you it is also recommended to have a look at Customizable options!

All customizable options of ECB
===============================

All customization of ECB is divided into the following ``customize groups''. You can highly customize all the ECB behavior/layout so just go to these groups and you will see all well documented ECB-options.

Please note: All options in the following subsections are listed without the prefix ``ecb-'' (e.g. the option ecb-layout-name is listed with name ``layout-name''). This has been done for a better readable option index. See Option Index.

Group ecb-general
-----------------

This group contains the following options:

 -- User Option: activate-before-layout-draw-hook
     Normal hook run at the end of activating the ecb-package by running ecb-activate. This hooks are run after all the internal setup process but directly before(!) drawing the layout specified in ecb-layout (means before dividing the frame into several windows).

     A senseful using of this hook can be maximizing the Emacs-frame for example, because this should be done before the layout is drawn because ECB computes the size of the ECB-windows with the current frame size! If you need a hook-option for the real end of the activating process (i.e. after the layout-drawing) look at ecb-activate-hook.

     IMPORTANT: The difference between this hook and ecb-redraw-layout-before-hook is that the latter one is evaluated always before the layout is redrawn (for example after calling ecb-redraw-layout) whereas the former one (this hook) is only evaluated exactly once during the activation-process of ECB. So during the activation process there is the following sequence of hooks:

      1. ecb-activate-before-layout-draw-hook \(this one)

      2. ecb-redraw-layout-before-hook

      3. <Drawing the layout>

      4. ecb-redraw-layout-after-hook

      5. ecb-activate-hook

 -- User Option: activate-hook
     Hook run at the end of activating ECB by ecb-activate. This hooks are run at the real end of the activating process, means after the layout has been drawn!. If you need hooks which are run direct before the layout-drawing look at ecb-activate-before-layout-draw-hook.

 -- User Option: auto-activate
     Automatically startup ECB when Emacs starts up. This should only be true if you always want to run ecb-activate.

 -- User Option: auto-compatibility-check
     Check at ECB-startup if all ECB-options have correct values. If not nil then all ECB-options are checked if their current value have the correct type. It the type is incorrect the option is either auto. upgraded to the new type or reset to the default-value of current ECB if no upgrade is possible. This feature can also upgrade options which are renamed in current ECB and try to transform the old-value to the new named option. After startup all upgraded or reset options are displayed with their old (before upgrade/reset) and new values. See also the commands ecb-upgrade-options and ecb-display-upgraded-options. If this option is off then the user can perform the check and reset manually with ecb-upgrade-options. See Auto. option-upgrading.

 -- User Option: before-activate-hook
     Normal hook run at the beginning of activating the ecb-package by running ecb-activate. These hooks run before any other tasks of the activating process are performed. If any of these hooks returns nil then ECB will not be activated!

     This can be used to check some conditions and then only start ECB if all conditions are true. For example a function could be added which returns only nil if Gnus is running. Then calling ecb-activate or ecb-minor-mode will only start ECB if Gnus is not already running.

 -- User Option: before-deactivate-hook
     Normal hook run at the beginning of deactivating ECB by running ecb-deactivate. These hooks run before any other tasks of the deactivating process are performed. If any of these hooks returns nil then ECB will not be deactivated! See also ecb-before-activate-hook.

 -- User Option: common-tree-buffer-after-create-hook
     Local hook running at the end of each tree-buffer creation. Every function of this hook is called once without arguments direct after creating a tree-buffer of ECB and it's local key-map. So for example a function could be added which performs calls of local-set-key to define new keybindings for EVERY tree-buffer.

     The following keys must not be rebind in all tree-buffers:

       - RET and all combinations with Shift and Ctrl

       - TAB

       - C-t

 -- User Option: current-buffer-sync-hook
     Normal hook run at the end of ecb-current-buffer-sync.

     See documentation of ecb-current-buffer-sync for conditions when synchronization takes place and so in turn these hooks are evaluated.

     Precondition for such a hook: Current buffer is the buffer of the current selected edit-window.

     Postcondition for such a hook: Point must stay in the same edit-window as before evaluating the hook.

     Important note: If ecb-window-sync is not nil ecb-current-buffer-sync is running either every time Emacs is idle or even after every command (see ecb-window-sync-delay). So these hooks can be really called very often! Therefore each function of this hook should/must check in an efficient way at beginning if its task have to be really performed and then do them only if really necessary! Otherwise performance of Emacs could slow down dramatically!

     It is strongly recommended that each function added to this hook uses the macro ecb-do-if-buffer-visible-in-ecb-frame at beginning! See ecb-speedbar-current-buffer-sync and ecb-eshell-current-buffer-sync for examples how to use this macro!

 -- User Option: deactivate-hook
     Normal hook run at the end of deactivating (but before the ecb-layout is cleared!) ECB by running ecb-deactivate.

 -- User Option: debug-mode
     If not nil ECB displays debug-information in the Messages-buffer. This is done for some critical situations concerning semantic-tokens and their overlays (or extends for XEmacs). Normally you should not need this switched on! But if you get errors like ``destroyed extend'' for XEmacs or ``wrong-argument-type'' concerning overlays for GNU Emacs then you should switch on this option and submitting a bug-report to the ecb-mailing-list (ecb-submit-problem-report) after getting the error again!

 -- User Option: key-map
     Specifies all keybindings for the ECB minor-mode key-map. The value is a cons-cell where the car is a common-prefix key for all the keybindings. The cdr is a list of keybindings each of them a list again. A key-binding has the following form:

          '(<common-prefix-flag> <keysequence> <function>) where

     <common-prefix-flag>
          If t then the common-prefix-key defined as car of the value (see above) is used.

     <keysequence>
          If the common prefix-key is used then the final key-binding is the concatenation of the common-prefix-key (see above) and this keysequence.

     <function>:
          The function to bind to the key. This can also be a lambda-expression .

     It is highly recommended to use one of the standard keys C-c or C-x as first key of your common-prefix-key!

     You MUST change this option via customize to take effect!

     All keysequences must be inserted as a string and must follow the syntax needed by read-kbd-macro or kbd. This means you can insert the key in the same manner C-h k displays keysequences. Here is the summary of the syntax:

     Text is divided into ``words'' separated by whitespace. Except for the words described below, the characters of each word go directly as characters of the keysequence. The whitespace that separates words is ignored. Whitespace in the macro must be written explicitly, as in C-c SPC.

       * The special words RET, SPC, TAB, DEL, LFD, ESC, and NUL represent special control characters. The words must be written in uppercase.

       * A word in angle brackets, e.g., <return>, <down>, <left> or <f1>, represents a function key. (Note that in the standard configuration, the function key <return> and the control key RET are synonymous.). You can use angle brackets on the words RET, SPC, etc., but they are not required there.

       * Keys can be written by their ASCII code, using a backslash followed by up to six octal digits. This is the only way to represent keys with codes above ÿ.

       * One or more prefixes M- (meta), C- (control), S- (shift), A- (alt), H- (hyper), and s- (super) may precede a character or key notation. For function keys, the prefixes may go inside or outside of the brackets: C-<down> = <C-down>. The prefixes may be written in any order: M-C-x = C-M-x. Prefixes are not allowed on multi-key words, e.g., C-abc, except that the Meta prefix is allowed on a sequence of digits and optional minus sign: M--123 = M-- M-1 M-2 M-3.

       * The ^ notation for control characters also works: ^M = C-m.

 -- User Option: major-modes-activate
     List of major-modes for which ECB should be activated or shown. Do not mistake this option with ecb-auto-activate. The latter one is for activating ECB after Emacs-startup (even without opening a buffer) and this one is for defining for which major-modes ECB should be activated if the mode goes active!

     The behavior is like follows: If a mode is contained in this option ECB is activated after activating this mode (if ECB was deactivated before) or the ECB-windows are shown if ECB was already active but its windows were hidden. In every case ECB is activated with visible ECB-windows afterwards!

     For every major mode there can be specified an ecb-layout-name:

       - default: The value customized with ecb-layout-name is chosen.

       - a string: ECB is activated with this layout-name. This changes the value of ecb-layout-name but only for current emacs-session! But the layout is only changed if ECB was activated, if just the ECB-windows were shown, the current layout is used!

     There are two additional options:

       - none: No major-modes should activate ECB automatically.

       - a regexp: This means all major-modes which are not listed in ecb-major-modes-deactivate activate ECB except the symbol-name of major-mode matches this regexp. If this option is set then the default regexp excludes all Info- and customize-buffers because this buffers should not change anything in the ECB-activation state.

     Any auto. activation is only done if the current-frame is unsplitted to avoid changing unnecessarily or unintentionally the frame-layout if the user just jumps between different windows.

 -- User Option: major-modes-deactivate
     List of major-modes for which ECB should be deactivated or hidden. Specify if ECB should be deactivated or at least hidden if a major-mode is active. For each major-mode there must be added an action what should be done:

       - hide: ECB just hides all the ECB windows like with ecb-hide-ecb-windows.

       - deactivate: ECB is completely deactivated after activating the major-mode.

     There are two additional options:

       * none: No major-modes should deactivate/hide ECB automatically.

       * A cons for the meaning ``All except the activated modes of ecb-major-modes-activate''. The car of this cons can be:

            - hide-all-except-activated: All major-modes which are not listed in ecb-major-modes-activate hide the ECB-windows.

            - deactivate-all-except-activated: All major-modes which are not listed in ecb-major-modes-activate deactivate ECB.

          The cdr of this cons is a regexp: This means all major-modes which are not listed in ecb-major-modes-activate deactivate/hide ECB except the symbol-name of major-mode matches this regexp. If this option is set then the default regexp excludes all Info- and customize-buffers because this buffers should not change anything in the ECB-activation state.

     If a major-mode is listed in ecb-major-modes-activate as well as in ecb-major-modes-deactivate then ECB is activated!

     Any auto. deactivation/hiding is only done if the edit-window of ECB is unsplitted and point is in the edit-window to avoid changing unnecessarily or unintentionally the frame-layout if the user just jumps between different edit-windows, the tree-windows and the compile-window of ECB.

     There is one exception from this rule: If the edit-window is splitted and one window contains a dired-buffer and a ``ECB-deactivating''-file is opened via dired then opening this file deactivates ECB (rsp. hides the ECB-windows).

 -- User Option: minor-mode-text
     String to display in the mode line when ECB minor mode is active. (When the string is not empty, make sure that it has a leading space.)

 -- User Option: mode-line-data
     Data shown in the modelines of the special ECB-buffers. Everey element of this list is a cons-cell where the car is used to define a buffer-name and the cdr to define the modeline-data for that buffer. For details about how to defining a buffer-name see ecb-mode-line-prefixes - its completely the same.

     The cdr is the data for ths modeline and can either be the symbol sel-dir or sel-source whereas the former one displays the current selected directory as modeline-data and the latter one the current selected source-file (without path).

     In addition to these two predefined values for every special ECB-buffer a function can be specified which gets three args (name of the buffer, current selected directory and current selected source-file) and must return a string which will be displayed in the modeline (or nil if no data should be displayed).

     If a special ECB-buffer should not display special data in its modeline then this buffer-name should either not being added to this option or added with ``No data'' (= nil as cdr).

     The whole modeline of the special ECB-buffer consists of the prefix of ecb-mode-line-prefixes and the data of ecb-mode-line-data - eventually prepended by the window-number, see ecb-mode-line-display-window-number.

 -- User Option: mode-line-display-window-number
     Display in the modeline of every special ECB-window the window-number. The left-top-most window in a frame has the window-number 0 and all other windows are numbered with increasing numbers in the sequence, functions like other-window or next-window would walk through the frame.

     This can be used to jump to windows by number with commands like:

            (defun my-switch-to-window-number (number)
              ``Switch to the nth window''
              (interactive ``P'')
              (if (integerp number)
                  (select-window (nth number (window-list)))))

     Currently this feature is only available for GNU Emacs 21.X, because neither GNU Emacs < 21 nor XEmacs can evaluate dynamically forms in the mode-line.

 -- User Option: mode-line-prefixes
     Prefixes shown in the modelines of the special ECB-buffers. The displayed prefix then looks like: ``[ <PREFIX>[: ]]'', means if a prefix is defined for an special ECB-buffer then a single space is prepended and if there is additional text to display (e.g. the current directory in the sources buffer, see ecb-mode-line-data) then also the string ``: '' is appended.

     Everey element of this list is a cons-cell where the car is used to define a buffer-name and the cdr to define the modeline-prefix for that buffer.

     The buffer-name can either be defined as plain string or with a symbol which contains the buffer-name as value. The latter one is recommended to define a prefix for one of the builtin ECB-tree-buffers because then simply the related option-symbol can be used. To add a prefix for the builtin directories tree-buffer just set the symbol ecb-directories-buffer-name as car.

     The cdr is the prefix for a buffer and can either be a string which used as it is or a function-symbol which is called with three argument (the buffer-name, the current selected directory and the current selected source-file) and must return either nil (for no prefix) or a string which is then used a prefix.

     If a special ECB-buffer should not have a prefix in its modeline then this buffer-name should either not being added to this option or added with ``No prefix'' (= nil as cdr).

 -- User Option: primary-mouse-jump-destination
     Jump-destination of a primary mouse-button click. Defines in which edit-window (if splitted) ECB does the ``right'' action (opening the source, jumping to a method/variable) after clicking with the primary mouse-button (see ecb-primary-secondary-mouse-buttons) onto a node. There are two possible choices:

       - left-top: Does the ``right'' action always in the left/topmost edit-window.

       - last-point: Does the ``right'' action always in that edit-window which had the point before.

     If the edit-window is not splitted this setting doesn't matter.

     Note: A click with the secondary mouse-button (see again ecb-primary-secondary-mouse-buttons does the ``right'' action always in the ``other'' window related to the setting in this option.

 -- User Option: primary-secondary-mouse-buttons
     Primary- and secondary mouse button for using the ECB-buffers. A click with the primary button causes the main effect in each ECB-buffer:

       * ECB Directories: Expanding/collapsing nodes and displaying files in the ECB Sources buffer.

       * ECB sources/history: Opening the file in that edit-window specified by the option ecb-primary-mouse-jump-destination.

       * ECB Methods: Jumping to the method in that edit-window specified by the option ecb-primary-mouse-jump-destination.

     A click with the primary mouse-button while the SHIFT-key is pressed called the POWER-click and does the following (depending on the ECB-buffer where the POWER-click occurs):

       * ECB Directories: Refreshing the directory-contents-cache (see ecb-cache-directory-contents).

       * ECB sources/history: Only displaying the source-contents in the method-buffer but not displaying the source-file in the edit-window.

       * ECB Methods: Narrowing to the clicked method/variable/ect... (see ecb-token-visit-post-actions). This works only for semantic supported sources but not for imenu- or etags-supported ones!

     In addition always the whole node-name is displayed in the minibuffer after a POWER-click \(for this see also `ecb-show-node-info-in-minibuffer').

     The secondary mouse-button is for opening (jumping to) the file in the other window (see the documentation ecb-primary-mouse-jump-destination).

     The following combinations are possible:

       - primary: mouse-2, secondary: C-mouse-2 (means mouse-2 while CTRL-key is pressed). This is the default setting.

       - primary: mouse-1, secondary: C-mouse-1

       - primary: mouse-1, secondary: mouse-2

     If you change this during ECB is activated you must deactivate and activate ECB again to take effect

 -- User Option: show-node-info-in-minibuffer
     Node info to display in a tree-buffer. Define which node info should displayed in a tree-buffer after mouse moving over the node or after a shift click onto the node.

     For every tree-buffer you can define ``when'' node info should be displayed:

       - always: Node info is displayed by moving with the mouse over a node.

       - if-too-long: Node info is only displayed by moving with the mouse over a node does not fit into the window-width of the tree-buffer window. In the ECB directories buffer this means also if a node is shortened or if the node has an alias (see ecb-source-path).

       - shift-click: Node info is only displayed after a shift click with the primary mouse button onto the node.

       - never: Node info is never displayed.

     For every tree-buffer you can define what info should be displayed:

       * Directory-buffer:

            - name: Only the full node-name is displayed.

            - path: The full-path of the node is displayed.

       * Sources-buffer:

            - name: Only the full node-name is displayed.

            - file-info: File infos for this file are displayed.

            - file-info-full: Fill infos incl. full path for this file are displayed.

       * History-buffer: see Directories-buffer.

       * Methods-buffer:

            - name: Only the full node name is displayed.

            - name+type: The full name + the type of the node (function, class, variable) is displayed.

     Do NOT set this option directly via setq but use always customize!

 -- User Option: tip-of-the-day
     Show tip of the day at start time of ECB.

 -- User Option: tip-of-the-day-file
     File where tip-of-the-day cursor is stored.

 -- User Option: tree-RET-selects-edit-window
     In which tree-buffers RET should finally select an edit-window. If a name of an ECB tree-buffer is contained in this list then hitting RET in this tree-buffer selects as last action the right edit-window otherwise only the right action is performed (opening a new source, selecting a method etc.) but point stays in the tree-buffer.

     A special remark for the ecb-directories-buffer-name: Of course here the edit-window is only selected if ecb-show-sources-in-directories-buffer is not nil (otherwise this would not make any sense)!

     The setting in this option is only the default for each tree-buffer. With ecb-toggle-RET-selects-edit-window the behavior of RET can be changed fast and easy in a tree-buffer without customizing this option, but of course not for future Emacs sessions!

 -- User Option: tree-easy-hor-scroll
     Scroll step for easy hor. scrolling via mouse-click in tree-buffers. XEmacs has horizontal scroll-bars so invisible parts beyond the right window-border of a tree-buffer can always made visible very easy.

     GNU Emacs does not have hor. scroll-bars so especially with the mouse it is quite impossible to scroll smoothly right and left. The functions scroll-left and scroll-right can be annoying and are also not bound to mouse-buttons.

     If this option is a positive integer S then in all ECB-tree-buffers the keys M-mouse-1 and M-mouse-3 are bound to scrolling left rsp. right with scroll-step S - clicking with mouse-1 or mouse-2 onto the edge of the modeline has the same effect, i.e. if you click with mouse-1 onto the left (rsp right) edge of the modeline you will scroll left (rsp. right).

     Additionally C-M-mouse-1 and C-M-mouse-3 are bound to scrolling left rsp. right with scroll-step window-width - 2.

     Default is a scroll-step of 5. If the value is nil then no keys for horizontal scrolling are bound.

 -- User Option: tree-expand-symbol-before
     Show the expand symbol before the items in a tree.

 -- User Option: tree-incremental-search
     Enable incremental search in the ECB-tree-buffers. For a detailed explanation see Using the keyboard. If you change this during ECB is activated you must deactivate and activate ECB again to take effect.

 -- User Option: tree-indent
     Indent size for tree buffer. If you change this during ECB is activated you must deactivate and activate ECB again to take effect.

 -- User Option: tree-navigation-by-arrow
     Enable smart navigation in the tree-windows by horiz. arrow-keys. If not nil then the left- and right-arrow keys work in the ECB tree-window in the following smart way if onto an expandable node:

       * Left-arrow: If node is expanded then it will be collapsed otherwise point jumps to the next ``higher'' node in the hierarchical tree (higher means the next higher tree-level or - if no higher level available - the next higher node on the same level).

       * Right-arrow: If node is not expanded then it will be expanded. Onto a not expandable node the horizontal arrow-keys go one character in the senseful correct direction.

     If this option is changed the new value takes first effect after deactivating ECB and then activating it again!

 -- User Option: tree-use-image-icons
     Use icons for expand/collapse tokens instead of the ascii-strings. If true the ECB displays in its tree-buffers the expand- and collapse symbols with appropriate icons - the icons are the same as used by speedbar.

 -- User Option: truncate-lines
     Truncate lines in ECB buffers. If you change this during ECB is activated you must deactivate and activate ECB again to take effect.

 -- User Option: truncate-long-names
     Truncate long names that don't fit in the width of the ECB windows. If you change this during ECB is activated you must deactivate and activate ECB again to take effect.

 -- User Option: use-recursive-edit
     Tell ECB to use a recursive edit. If set then it can easily be deactivated by (keyboard-escape-quit).

 -- User Option: version-check
     Checks at start-time if the requirements are fulfilled. It checks if the required versions of the libraries semantic, eieio and speedbar are installed and loaded into Emacs.

     It is strongly recommended to set this option to not nil!

 -- User Option: window-sync
     Synchronize the ECB-windows automatically with current edit window. If always then the synchronization takes place always a buffer changes in the edit window, if nil then never. If a list of major-modes then only if the major-mode of the new buffer belongs NOT to this list.

     But in every case the synchronization takes only place if the current-buffer in the edit-window has a relation to files or directories. Examples for the former one are all programming-language-modes, Info-mode too, an example for the latter one is dired-mode. For all major-modes related to non-file/directory-buffers like help-mode, customize-mode and others never an autom. synchronization will be done!

     It's recommended to exclude at least Info-mode because it makes no sense to synchronize the ECB-windows after calling the Info help. Per default also dired-mode is excluded but it can also making sense to synchronize the ECB-directories/sources windows with the current directory in the dired-buffer.

     IMPORTANT NOTE: Every time the synchronization is done the hook ecb-current-buffer-sync-hook is evaluated.

 -- User Option: window-sync-delay
     Time Emacs must be idle before the ECB-windows are synchronized with current edit window. If nil then there is no delay, means synchronization takes place immediately. A small value of about 0.25 seconds saves CPU resources and you get even though almost the same effect as if you set no delay.

Group ecb-directories
---------------------

This group contains the following options:

 -- User Option: add-path-for-not-matching-files
     Add path of a file to ecb-source-path if not already contained. This is done during the auto. windows synchronization which happens if a file is opened not via the file/directory-browser of ECB. In such a situation ECB adds the path of the new file auto. to ecb-source-path at least temporally for the current Emacs session. This option defines two things:

      1. Should only the root-part (which means for Unix-like systems always '/' and for windows-like systems the drive) of the new file be added as source-path to ecb-source-path or the whole directory-part?

      2. Should this path be added for future sessions too?

     The value of this option is a cons-cell where the car is a boolean for 1. and the cdr is a boolean for 2.

     A value of not nil for the car (1.) is reasonably if a user often opens files not via the ECB-browser which are not located in any of the paths of ecb-source-path because then only one path for each drive (windows) or the root-path (Unix) is added to the directory buffer of ECB.

 -- User Option: auto-expand-directory-tree
     Automatically expand the directory tree to the current source file. There are three options:

       - best: Expand the best-matching source-path

       - first: Expand the first matching source-path

       - nil: Do not automatically expand the directory tree.

 -- User Option: cache-directory-contents
     Cache contents of directories.

     This can be useful if ecb-source-path contains directories with many files and subdirs, especially if these directories are mounted net-drives (``many'' means here something > 1000, dependent of the speed of the net-connection and the machine). For these directories actualizing the sources- and/or directories- buffer of ECB (if displayed in current layout!) can slow down dramatically so a caching increases speed a lot.

     The value of this option is a list where each element is a cons-cell and looks like:

            (<dir-regexp> . <filenumber threshold>) with

     <dir-regexp>:
          Regular expression a directory must match to be cached.

     <filenumber threshold>:
          Number of directory contents must exceed this number.

     A directory will we only be cached if and only if the directory-name matches one rexexp of this option and its content-number exceeds the related threshold.

     The cache entry for a certain directory will be refreshed and actualized only by using the POWER-click (see ecb-primary-secondary-mouse-buttons) in the directories-buffer of ECB (see Using the mouse).

     Examples:

     A value of ("~/bigdir*" . 1000) means the contents of every subdirectory of the home-directory will be cached if the directory contains more than 1000 entries and its name begins with ``bigdir''.

     A value of (".*" . 1000) caches every directory which has more than 1000 entries.

     A value of (".*" . 0) caches every directory regardless of the number of entries."

 -- User Option: directories-buffer-after-create-hook
     Local hook running after the creation of the directories-buffer. Every function of this hook is called once without arguments direct after creating the directories-buffer of ECB and it's local key-map. So for example a function could be added which performs calls of local-set-key to define new keybindings only for the directories-buffer of ECB.

     The following keys must not be rebind in the directories-buffer: F2, F3 and F4

 -- User Option: directories-buffer-name
     Name of the ECB directory buffer. Because it is not a normal buffer for editing you should enclose the name with stars, e.g. `` *ECB Directories*''.

     If it is necessary for you you can get emacs-lisp access to the buffer-object of the ECB-directory-buffer by this name, e.g. by a call of set-buffer.

     Changes for this option at runtime will take affect only after deactivating and then activating ECB again!

 -- User Option: directories-menu-sorter
     Function which re-sorts the menu-entries of the directories buffer.

     If a function then this function is called to re-arrange the menu-entries of the combined menu-entries of the user-menu-extensions of ecb-directories-menu-user-extension and the built-in-menu ecb-directories-menu. If nil then no special sorting will be done and the user-extensions are placed in front of the built-in-entries.

     The function get one argument, a list of menu-entries. For the format of this argument see ecb-directories-menu-user-extension. The function must return a new list in the same format. Of course this function can not only re-arrange the entries but also delete entries or add new entries.

 -- User Option: directories-menu-user-extension
     User extensions for the popup-menu of the directories buffer.

     Value is a list of elements of the following type: Each element defines a new menu-entry and is a list containing two sub-elements, whereas the first is the name of the menu-entry and the second the function (a function symbol or a lambda-expression) being called if the menu-entry is selected. If there is no second sub-element and the first one is the string ``---'' then a non-selectable menu-separator is displayed.

     The function must follow the following guidelines: It takes one argument which is the tree-buffer-node of the selected node (means the node for which the popup-menu has been opened). With the function tree-node-get-data the related data of this node is accessible and returns in case of the directories buffer the directory for which the popup-menu has been opened. The function can do any arbitrary things with this directory.

     Example for such a menu-function:

          (defun ecb-my-special-dir-popup-function (node)
            (let ((node-data=dir (tree-node-get-data node)))
               (message "Dir under node: %s" node-data=dir)))

     Per default the user-extensions are added at the beginning of the built-in menu-entries of ecb-directories-menu but the whole menu can be re-arranged with ecb-directories-menu-sorter.

     If you change this option you have to restart ECB to take effect.

 -- User Option: display-default-dir-after-start
     Automatically display current default-directory after activating ECB.

     If a file-buffer is displayed in the edit-window then ECB synchronizes its tree-buffers to this file-buffer - at least if the option ecb-window-sync it not nil. So for this situation ecb-display-default-dir-after-start takes no effect but this option is for the case if no file-buffer is displayed in the edit-window after startup:

     If true then ECB selects autom. the current default-directory after activation even if no file-buffer is displayed in the edit-window. This is useful if ECB is autom. activated after startup of Emacs and Emacs is started without a file-argument. So the directory from which the startup has performed is auto. selected in the ECB-directories buffer and the ECB-sources buffer displays the contents of this directory.

 -- User Option: excluded-directories-regexp
     Directories that should not be included in the directories list. The value of this variable should be a regular expression.

 -- User Option: grep-function
     Function used for performing a grep. The popup-menu of the tree-buffers ``Directories'', ``Sources'' and ``History'' offer to grep the ``current'' directory:

       - Directory-buffer: The grep is performed in the current popup-directory after clicking the right mouse-button onto a node.

       - Sources-buffer: The grep is performed in the current selected directory.

       - History-buffer: The grep is performed in the directory of the current popup-source after clicking the right mouse-button onto a node.

 -- User Option: grep-find-function
     Function used for performing a recursive grep. For more Details see option `ecb-grep-function' and replace ``grep'' with ``recursive grep''.

 -- User Option: show-sources-in-directories-buffer
     Show source files in directories buffer.

 -- User Option: source-path
     Paths where to find code sources. Each path can have an optional alias that is used as it's display name. If no alias is set, the path is used as display name.

 -- User Option: use-speedbar-instead-native-tree-buffer
     If true then uses speedbar for directories, sources or methods. This means that speedbar is integrated in the ECB-frame and is displayed in that window normally displaying the standard ECB-directories-buffer, ECB-sources-buffer or ECB-methods-buffer.

     This option takes effect in all layouts which contain either a directory window, a sources window or a method window.

     This option can have four valid values:

       - nil: Do not use speedbar (default)

       - dir: Use speedbar instead of the standard directories-buffer

       - source: Use speedbar instead of the standard sources-buffer

       - method: Use speedbar instead of the standard methods-buffer

     Note: For directories and sources a similar effect and usability is available by setting this option to nil (or method) and setting ecb-show-sources-in-directories-buffer to not nil, because this combination displays also directories and sources in one window.

     ecb-use-speedbar-instead-native-tree-buffer is for people who like the speedbar way handling directories and source-files or methods and want it in conjunction with ECB.

Group ecb-sources
-----------------

This group contains the following options:

 -- User Option: show-source-file-extension
     Show the file extension of source files.

 -- User Option: source-file-regexps
     Specifies which files are shown as source files.

     This is done on directory-base, which means for each directory-regexp the files to display can be specified. If more than one directory-regexp matches the current selected directory then always the first one (and its related file-exclude/include-regexps) is used! If no directory-regexp matches then all files are displayed for the currently selected directory.

     Important note: It is recommended that the *LAST* element of this list should contain an always matching directory-regexp (".*")!

     So the value of this option is a list of cons-cells where the car is a directory regexp and the cdr is a 2 element list where the first element is a exclude regexp and the second element is a include regexp. A file is displayed in the source-buffer of ECB iff: The file does not match the exclude regexp OR the file matches the include regexp.

     But regardless of the value of this option a file F is never displayed in the sources-buffer if the directory matches ecb-sources-exclude-cvsignore and the directory contains a file .cvsignore which contains F as an entry!

     There are three predefined and useful combinations of an exclude and include regexp:

       * All files

       * All, but no backup, object, lib or ini-files (except .emacs and .gnus). This means all files except those starting with ``.'', ``#'' or ending with ``~'', ``.elc'', ``.obj'', ``.o'', ``.lib'', ``.dll'', ``.a'', ``.so''. (but including .emacs and .gnus)

       * Common source file types (.c, .java etc.)

     In addition to these predefined values a custom exclude and include combination can be defined.

     Tips for the directory- and file-rexexps: "$^" matches no files/directories, ".*" matches all files/directories.

 -- User Option: sources-buffer-after-create-hook
     Local hook running after the creation of the sources-buffer. Every function of this hook is called once without arguments direct after creating the sources-buffer of ECB and it's local key-map. So for example a function could be added which performs calls of local-set-key to define new keybindings only for the sources-buffer of ECB.

 -- User Option: sources-buffer-name
     Name of the ECB sources buffer. Because it is not a normal buffer for editing you should enclose the name with stars, e.g. ``*ECB Sources*''.

     If it is necessary for you you can get emacs-lisp access to the buffer-object of the ECB-sources-buffer by this name, e.g. by a call of set-buffer.

     Changes for this option at runtime will take affect only after deactivating and then activating ECB again!

 -- User Option: sources-exclude-cvsignore
     Specify if files contained in a .cvsignore should be excluded.

     Value is a list of regular expressions or nil. If you want to exclude files listed in a .cvsignore-file from being displayed in the ecb-sources-buffer then specify a regexp for such a directory.

     If you want to exclude the contents of .cvsignore-files for every directory then you should add one regexp ``.*'' which matches every directory.

     If you never want to exclude the contents of .cvsignore-files then set this option to nil.

 -- User Option: sources-menu-sorter
     Function which re-sorts the menu-entries of the directories buffer.

     If a function then this function is called to sort the menu-entries of the combined menu-entries of the user-menu-extensions of ecb-sources-menu-user-extension and the built-in-menu ecb-sources-menu. If nil then no special sorting will be done and the user-extensions are placed in front of the built-in-entries.

     For the guidelines for such a sorter-function see ecb-directories-menu-sorter.

 -- User Option: sources-menu-user-extension
     User extensions for the popup-menu of the sources buffer.

     For further explanations see ecb-directories-menu-user-extension.

     The node-argument of a menu-function contains as data the filename of the source for which the popup-menu has been opened.

     Per default the user-extensions are added at the beginning of the built-in menu-entries of ecb-sources-menu but the whole menu can be re-arranged with ecb-sources-menu-sorter.

     If you change this option you have to restart ECB to take effect.

 -- User Option: sources-sort-method
     Defines how the source files are sorted.

       - name: Sorting by name.

       - extension: Sorting first by name and then by extension.

       - nil: No sorting, means source files are displayed in the sequence returned by directory-files (called without sorting).

Group ecb-methods
-----------------

This group contains the following options:

 -- User Option: auto-expand-token-tree
     Expand the methods-token-tree automatically if node invisible.

     This option has only an effect if option ecb-highlight-token-with-point is switched on too. There are three possible choices:

       - nil: No auto. expanding of the method buffer.

       - expand-spec: Auto expand the method-buffer nodes if the node belonging to current token under point is invisible because its parent-node is collapsed. But expanding is only done if the type of the token under point in the edit-buffer is contained in ecb-methods-nodes-expand-spec.

       - all: Like expand-spec but expands all tokens regardless of the setting in ecb-methods-nodes-expand-spec.

     This options takes only effect for semantic-sources - means sources supported by semantic!

 -- User Option: auto-update-methods-after-save
     Automatically updating the ECB method buffer after saving a source.

 -- User Option: bucket-token-display
     How ECB displays bucket tokens in the ECB methods buffer. Bucket tokens are tokens like ``[+] Variables'', ``[+] Dependencies'' etc. The name of the bucket-token comes from semantic but you can define a prefix, a suffix and a special face for the bucket token.

     The default are empty prefix/suffix-strings and 'ecb-bucket-token-face'. But an alternative can be for example ("[" "]" nil) which means no special face and a display like ``[+] [<bucket-name>]''.

     This options takes only effect for semantic-sources - means sources supported by semantic!

 -- User Option: exclude-parents-regexp
     Regexp which parent classes should not be shown in the methods buffer (see also ecb-show-parents). If nil then all parents will be shown if ecb-show-parents is not nil.

     This options takes only effect for semantic-sources - means sources supported by semantic!

 -- User Option: expand-methods-switch-off-auto-expand
     Switch off auto expanding in the ECB-method buffer. If on then auto expanding is switched off after explicit expanding or collapsing by ecb-expand-methods-nodes.

     This is done with ecb-toggle-auto-expand-token-tree so after the switch off the auto expanding feature can again switched on quickly.

     But after explicitly expanding/collapsing the methods-buffer to a certain level the auto. expanding could undo this when the node belonging to current token under point in the edit-window is invisible after ecb-expand-methods-nodes - then the auto. expand feature would make this node immediately visible and destroys the explicitly set expand-level.

 -- User Option: font-lock-tokens
     Adds font-locking (means highlighting) to the ECB-method buffer.

     This options takes only effect for semantic-sources - means sources supported by semantic!

 -- User Option: highlight-token-with-point
     How to highlight the method or variable under the cursor.

       - highlight-scroll: Always scroll the method buffer, so the current method of the edit-window is highlighted in the method-window.

       - highlight: Only highlight the current method of the edit window in the method window if the method is visible in the method-window.

       - nil: No highlighting is done.

     See also ecb-highlight-token-with-point-delay.

     This options takes only effect for semantic-sources - means sources supported by semantic!

 -- User Option: highlight-token-with-point-delay
     Time Emacs must be idle before current token is highlighted. If nil then there is no delay, means current token is highlighted immediately. A small value of about 0.25 seconds saves CPU resources and you get even though almost the same effect as if you set no delay. But such a delay prevents also ``jumping backward/forward'' during scrolling within java-classes if point goes out of method-definition into class-definition. Therefore the default value is a delay of 0.25 seconds.

     This options takes only effect for semantic-sources - means sources supported by semantic!

 -- User Option: methods-buffer-after-create-hook
     Local hook running after the creation of the methods-buffer. Every function of this hook is called once without arguments direct after creating the methods-buffer of ECB and it's local key-map. So for example a function could be added which performs calls of local-set-key to define new keybindings only for the methods-buffer of ECB.

 -- User Option: methods-buffer-name
     Name of the ECB methods buffer. Because it is not a normal buffer for editing you should enclose the name with stars, e.g. `` *ECB Methods*''.

     If it is necessary for you you can get emacs-lisp access to the buffer-object of the ECB-methods-buffer by this name, e.g. by a call of set-buffer.

     Changes for this option at runtime will take affect only after deactivating and then activating ECB again!

 -- User Option: methods-menu-sorter
     Function which re-sorts the menu-entries of the directories buffer.

     If a function then this function is called to sort the menu-entries of the combined menu-entries of the user-menu-extensions of ecb-methods-menu-user-extension and the built-in-menu ecb-methods-menu. If nil then no special sorting will be done and the user-extensions are placed in front of the built-in-entries.

     For the guidelines for such a sorter-function see ecb-directories-menu-sorter.

 -- User Option: methods-menu-user-extension
     User extensions for the popup-menu of the methods buffer.

     For further explanations see ecb-directories-menu-user-extension.

     The node-argument of a menu-function contains as data the semantic-token of the method/variable/token for which the popup-menu has been opened.

     Per default the user-extensions are added at the beginning of the built-in menu-entries of ecb-methods-menu but the whole menu can be re-arranged with ecb-methods-menu-sorter.

     If you change this option you have to restart ECB to take effect.

 -- User Option: methods-nodes-collapse-spec
     Semantic token-types collapsed by ecb-expand-methods-nodes. For valid values of this option see ecb-methods-nodes-expand-spec!

     This options takes only effect for semantic-sources - means sources supported by semantic!

 -- User Option: methods-nodes-expand-spec
     Semantic token-types expanded by ecb-expand-methods-nodes.

     The value of this option is either the symbol all (all tokens are expanded regardless of their type) or a list of symbols where each symbol is a valid semantic token-type. For a description of semantic token types see option ecb-show-tokens.

     But this option also defines if bucket-nodes in the ECB-method-buffer (e.g. ``[Variables]'') should be expanded. Therefore valid symbols for this list are also all cars of the variable semantic-symbol->name-assoc-list.

     If there is a bucket-name (the node-name stripped of the settings in ecb-bucket-token-display) which is not contained as cdr in semantic-symbol->name-assoc-list then the symbol with this bucket-name as name is also a valid symbol for this list. Example: In ECB there are buckets ``[Parents]''. The bucket-name is ``Parents'' and the valid symbol-name is then Parents.

     This options takes only effect for semantic-sources - means sources supported by semantic!

 -- User Option: post-process-semantic-tokenlist
     Define mode-dependent post-processing for the semantic-tokenlist. This is an alist where the car is a major-mode symbol and the cdr is a function-symbol of a function which should be used for post-processing the tokenlist (returned by semantic-bovinate-toplevel) for a buffer in this major-mode. Such a function is called with current semantic tokenlist of current buffer and must return a valid tokenlist again.

     For oo-programming languages where the methods of a class can be defined outside the class-definition (e.g. C++, Eieio) the function ecb-group-function-tokens-with-parents can be used to get a much better method-display in the methods-window of ECB, because all method implementations of a class are grouped together.

     This options takes only effect for semantic-sources - means sources supported by semantic!

 -- User Option: show-only-positioned-tokens
     Show only nodes in the method-buffer which are ``jump-able''. If not nil then ECB displays in the method-buffer only nodes which are ``jump-able'', i.e. after selecting it by clicking or with RET then ECB jumps to the corresponding location in the edit-window. Example: With CLOS or Eieio source-code there can exist some position-less nodes like variable-attributes in a defclass form which are only displayed if this option is nil. Displaying such nodes can be senseful even if they can not be jumped.

     This options takes only effect for semantic-sources - means sources supported by semantic!

 -- User Option: show-tokens
     How to show tokens in the methods buffer first time after find-file. This variable is a list where each element represents a type of tokens:

          (<token type> <display type> <sort method>)

     The tokens in the methods buffer are displayed in the order as they appear in this list.

     <token type>
          A Semantic token type symbol (function, variable, rule, include etc.) or one of the following:

            - t: All token types not specified anywhere else in the list.

            - parent: The parents of a type.

     <display type>
          A symbol which describes how the tokens of this type shall be shown:

            - expanded: The tokens are shown in an expanded node.

            - collapsed: The tokens are shown in a collapsed node.

            - flattened: The tokens are added to the parent node.

            - hidden: The tokens are not shown.

     <sort method>
          A symbol describing how to sort the tokens of this type:

            - name: Sort by the token name.

            - access: Sort by token access (public, protected, private) and then by name.

            - nil: Don't sort tokens. They appear in the same order as in the source buffer.

     This options takes only effect for semantic-sources - means sources supported by semantic!

 -- User Option: token-display-function
     Function to use for displaying tokens in the methods buffer. This functionality is set on major-mode base, i.e. for every major-mode a different function can be used. The value of this option is a list of cons-cells:

       - The car is either a major-mode symbol or the special symbol 'default which means if no function for a certain major-mode is defined then the cdr of the 'default cons-cell is used.

       - The cdr is the function used for displaying a token in the related major-mode.

     Every function is called with 3 arguments:

      1. The token

      2. The parent-token of token (can be nil)

      3. The value of ecb-font-lock-tokens.

     Every function must return the display of the token as string, colorized if the third argument is not nil.

     The following functions are predefined:

       * All functions of semantic-token->text-functions.

       * For every function in semantic-token->text-functions with name ``semantic-XYZ'' a function with name ``ecb-XYC'' is predefined. The differences between the semantic- and the ECB-version are:

            - The ECB-version displays for type tokens only the type-name and nothing else (exception: In c++-mode a template specifier is appended to the type-name if a template instead a normal class).

            - The ECB-version displays type-tokens according to the setting in ecb-type-token-display. This is useful for better recognizing different classes, structs etc. in the ECB-method window.

          For all tokens which are not types the display of the ECB-version is identical to the semantic version. Example: For semantic-name-nonterminal the pendant is ecb-name-nonterminal.

     This functionality also allows the user to display tokens as UML. To enable this functionality set the function for a major-mode (e.g. jde-mode) to semantic-uml-concise-prototype-nonterminal, semantic-uml-prototype-nonterminal, or semantic-uml-abbreviate-nonterminal or the ECB-versions of these functions.

     If the value is nil, i.e. neither a function for a major-mode is defined nor the special 'default, then semantic-prototype-nonterminal is used for displaying the tokens.

     This options takes only effect for semantic-sources - means sources supported by semantic!

 -- User Option: token-jump-sets-mark
     Set the mark after jumping to a token from the ECB-method buffer. If set the user can easily jump back.

 -- User Option: token-visit-post-actions
     Actions to perform after visiting a token from the Method-buffer. With this option actions can be added which will be performed after visiting the start of the token in the source-buffer.

     This functionality is set on a major-mode base, i.e. for every major-mode a different setting can be used. The value of this option is a list of cons-cells:

       - The car is either a major-mode symbol or the special symbol 'default.

       - The cdr is a list of action-functions or nil.

     ECB first performs all actions defined for the special symbol 'default (if any) and then all actions defined for current major-mode (if any).

     ECB offers some predefined senseful action-functions. Currently there are: ecb-token-visit-highlight-token-header ecb-token-visit-smart-token-start ecb-token-visit-recenter ecb-token-visit-recenter-top ecb-token-visit-goto-doc-start ecb-token-visit-narrow-token See the documentation of these function for details what they do.

     But you can add any arbitrary function if the following conditions are fulfilled: The function gets the semantic token as argument returns the (new) point after finishing its job.

 -- User Option: type-token-display
     How to display semantic type-tokens in the methods buffer. Normally all token displaying, colorizing and facing is done by semantic according to the value of semantic-face-alist and the semantic display-function (e.g. one from semantic-token->text-functions). But sometimes a finer distinction in displaying the different type specifiers of type-tokens can be useful. For a description when this option is evaluated look at ecb-token-display-function!

     This functionality is set on a major-mode base, i.e. for every major-mode a different setting can be used. The value of this option is a list of cons-cells:

       * The car is either a major-mode symbol or the special symbol 'default which means if no setting for a certain major-mode is defined then the cdr of the 'default cons-cell is used.

       * The cdr is a list of 3-element-lists:

           1. First entry is a semantic type specifier in string-form. Current available type specifiers are for example ``class'', ``interface'', ``struct'', ``typedef'' and ``enum''. In addition to these ones there is also a special ECB type specifier ``group'' which is related to grouping tokens (see ecb-post-process-semantic-tokenlist and ecb-group-function-tokens-with-parents). Any arbitrary specifier can be set here but if it is not ``group'' or not known by semantic it will be useless.

           2. Second entry is a flag which indicates if the type-specifier string from (1.) itself should be removed (if there is any) from the display.

           3. Third entry is the face which is used in the ECB-method window to display type-tokens with this specifier. ECB has some predefined faces for this (ecb-type-token-class-face, ecb-type-token-struct-face, ecb-type-token-typedef-face, ecb-type-token-enum-face and ecb-type-token-group-face) but any arbitrary face can be set here. This face is merged with the faces semantic already uses to display a token, i.e. the result is a display where all face-attributes of the ECB-face take effect plus all face-attributes of the semantic-faces which are not set in the ECB-face (with XEmacs this merge doesn't work so here the ECB-face replaces the semantic-faces; this may be fixed in future versions).

     The default value is nil means there is no special ECB-displaying of type-tokens in addition to the displaying and colorizing semantic does. But a value like the following could be a useful setting:

          ((default
             ("class" t ecb-type-token-class-face)
             ("group" nil ecb-type-token-group-face))
           (c-mode
            ("struct" nil ecb-type-token-struct-face)
            ("typedef" nil ecb-type-token-typedef-face)))

     This means that in c-mode only ``struct''s and ``typedef''s are displayed with special faces (the specifiers itself are not removed) and in all other modes ``class''s and grouping-tokens (see ecb-token-display-function, ecb-group-function-tokens-with-parents) have special faces and the ``class'' specifier-string is removed from the display.

     This options takes only effect for semantic-sources - means sources supported by semantic!

Group ecb-history
-----------------

This group contains the following options:

 -- User Option: clear-history-behavior
     The entries of the history buffer to delete with `ecb-clear-history' Three options are available:

       - not-existing-buffers: All entries which represent a buffer-name not existing anymore in the buffer-list will be cleared. Probably the most senseful value.

       - existing-buffers: The opposite of 'not-existing-buffers.

       - all: The whole history will be cleared.

 -- User Option: history-buffer-after-create-hook
     Local hook running after the creation of the history-buffer. Every function of this hook is called once without arguments direct after creating the history-buffer of ECB and it's local key-map. So for example a function could be added which performs calls of local-set-key to define new keybindings only for the history-buffer of ECB.

 -- User Option: history-buffer-name
     Name of the ECB history buffer. Because it is not a normal buffer for editing you should enclose the name with stars, e.g. ``*ECB History*''.

     If it is necessary for you you can get emacs-lisp access to the buffer-object of the ECB-history-buffer by this name, e.g. by a call of set-buffer.

     Changes for this option at runtime will take affect only after deactivating and then activating ECB again!

 -- User Option: history-item-name
     The name to use for items in the history buffer.

 -- User Option: history-menu-sorter
     Function which re-sorts the menu-entries of the directories buffer.

     If a function then this function is called to sort the menu-entries of the combined menu-entries of the user-menu-extensions of ecb-history-menu-user-extension and the built-in-menu ecb-history-menu. If nil then no special sorting will be done and the user-extensions are placed in front of the built-in-entries.

     For the guidelines for such a sorter-function see ecb-directories-menu-sorter.

 -- User Option: history-menu-user-extension
     User extensions for the popup-menu of the history buffer.

     For further explanations see ecb-directories-menu-user-extension.

     The node-argument of a menu-function contains as data the filename of the source for which the popup-menu has been opened.

     Per default the user-extensions are added at the beginning of the built-in menu-entries of ecb-history-menu but the whole menu can be re-arranged with ecb-history-menu-sorter.

     If you change this option you have to restart ECB to take effect.

 -- User Option: kill-buffer-clears-history
     Define if kill-buffer should also clear the history. There are three options:

       - auto: Removes automatically the corresponding history-entry after the buffer has been killed.

       - ask: Asks, if the history-entry should be removed after the kill.

       - nil: kill-buffer does not affect the history (this is the default).

 -- User Option: sort-history-items
     Sorts the items in the history buffer.

Group ecb-layout
----------------

This group contains the following options:

 -- User Option: activate-before-new-frame-created-hook
     Normal hook run before the new ECB-frame is created if ecb-new-ecb-frame is not nil (otherwise this hook is not evaluated).

 -- User Option: advice-window-functions
     Advice functions to be more intelligent if used with ECB. You can choose the following functions to be adviced by ECB so they behave as if the edit-window(s) of ECB would be the only windows(s) of the ECB-frame:

       * other-window For this one see also the option ecb-other-window-jump-behavior!

       * delete-window

       * delete-other-windows

       * delete-windows-on

       * split-window-horizontally

       * split-window-vertically

       * split-window If this advice is enabled then split-window-vertically and split-window-horizontally are autom. enabled too!

       * switch-to-buffer

       * switch-to-buffer-other-window

       * display-buffer Especially if ecb-compile-window-height is not nil it is strongly recommended not to disable this advice!

       * other-window-for-scrolling If this advice is enabled then the following functions scroll always the first edit-window if the edit-window is splitted, point stays in the ``other'' edit-window and there is no durable compilation-window (see ecb-compile-window-height):

            - scroll-other-window

            - scroll-other-window-down

            - beginning-of-buffer-other-window

            - end-of-buffer-other-window

          This advice is per default not enabled.

     For working most conveniently with ECB it is the best to advice all these functions, because then all the standard shortcuts of these functions are also usable with ECB without doing anything else. Also other packages can interact best with ECB if these functions are all adviced. If these adviced functions are called in another frame than the ECB-frame they behave all exactly like the not adviced versions!

     But please read also the following:

     Normally all packages should work correct with ECB and it´s adviced functions but if there occur problems with a package cause of some of these adviced functions ECB offers the following fall-back solution:

      1. Deactivate in ecb-advice-window-functions all the adviced-functions which make problems with other packages.

      2. For every of the advice-able functions <adv-func> ECB offers a interactively function named ``ecb-<adv-func>'' which does exactly the same as the adviced version of <adv-func>. Use ``ecb-<adv-func>'' instead the original one to get the proper ECB behavior even if the function is not adviced anymore.

      3. You can bind in ecb-activate-hook the standard-shortcut of <adv-func> to ``ecb-<adv-func>'' and rebind it in ecb-deactivate-hook to <adv-func>.

      4. Now you have the best of both worlds: The problematic package works and you have the ECB-behavior of <adv-func> as if it would be adviced.

     Here is an example: Suppose you must deactivating the advice for switch-to-buffer-other-window. Then you deactivate this function with this option and you can use ecb-switch-to-buffer-other-window instead. Bind the shortcut you normally use for switch-to-buffer-other-window to ecb-switch-to-buffer-other-window (use ecb-activate-hook for this) and rebind it to the original function in the ecb-deactivate-hook.

 -- User Option: fix-window-size
     Fix size of the ECB-windows/buffers even after frame-resizing. The fix type (valid values are nil, t, width and height) can either be set on a layout-basis (means a different value for each layout) or one value can be set for all layouts.

     For a detailed description of the valid values see description of window-size-fixed which is newly introduced in GNU Emacs 21 and is only available there. Therefore this option takes only effect with GNU Emacs 21.

     Note1: Manually resizing the ECB-windows via enlarge-window, shrink-window, mouse-drag-vertical-line and mouse-drag-mode-line is still possible even if the window-sizes are fixed for frame-resizing!

     Note2: The description of window-size-fixed in the Elisp-info-manual is more detailed than the description offered by C-h v!

     Note3: With current Emacs 21.2.X there seems to be no distinction between width, height and t. Therefore this option takes no effect (means all ecb-windows have always unfixed sizes) if ecb-compile-window-height is not nil.

     Per default no window-size fixing has been done.

 -- User Option: hide-ecb-windows-after-hook
     Hooks run direct after the ECB windows have been hidden either by ecb-toggle-ecb-windows or ecb-hide-ecb-windows.

 -- User Option: hide-ecb-windows-before-hook
     Hooks run direct before the ECB windows will be hidden either by ecb-toggle-ecb-windows or ecb-hide-ecb-windows. This means that at runtime of this hook all the ECB-tree-windows of current layout are visible.

 -- User Option: layout-always-operate-in-edit-window
     Adviced window functions work always in the edit-window. If we are in an ECB special buffer (methods, directories, etc), and any of the adviced windowing functions is called (see ecb-advice-window-functions), we will select the ecb-edit-window first. This is useful if you have any functions that use such functions and you don't want them to just error with a method complaining that the current buffer can not be split, or something similar.

     Because this may not be desirable in all situations and all adviced functions this can be enabled separately for every advisable function (see also ecb-advice-window-functions). If the symbol of an adviced function is contained in the value of this option, then the edit-window is first selected otherwise either an error is reported or some other special reaction; see the documentation of the adviced functions for this.

     For other-window, other-window-for-scrolling and switch-to-buffer-other-window this makes no sense, therefore you can not enable this for them.

     Per default this is enabled for delete-window, delete-other-windows, switch-to-buffer.

 -- User Option: layout-debug-mode
     Write debug-information about layout-operations in the Messages-buffer. Normally there should be no need to set this option to true but if there are problems to display buffers in the compile-window of ECB (e.g. buffers which should be displayed there aren't or the temporally enlarging-mechanism does not do what you think it should do etc...) then please do the following steps:

      1. Set ecb-layout-debug-mode to not nil

      2. Reproduce the wrong behavior exactly by repeating all the operations which lead to the problem.

      3. Now send immediately a bug report with ecb-submit-problem-report.

      4. Set ecb-layout-debug-mode back to nil if you do not want further debugging output in the *Messages* buffer

 -- User Option: layout-name
     Select a window layout of ECB. Value is any arbitrary string. There are four different types of layouts: left, right, top and left-right, which means the location of the ECB-tree-windows in the ECB-frame. Currently there are 20 predefined layouts; names see below. You can savely try out any of them by changing this value and saving it only for the current session. If you are sure which layout you want you can save it for future sessions. To get a picture of the layout for name <name> call `ecb-show-layout-help'. ecb-layout-function-9.

     Currently available layouts:

       * Left layouts: left1 left2 left3 left4 left5 left6 left7 left8 left9 left10 left11 left12 left13 left14 left15

       * Right layouts: right1

       * Top layouts: top1 top2

       * Left-right layouts: leftright1 leftright2

     Regardless of the settings you define here: If you have destroyed or changed the ECB-screen-layout by any action you can always go back to this layout with ecb-redraw-layout

 -- User Option: layout-window-sizes
     Specifies the sizes of the ECB windows for each layout. The easiest way (and also the strongly recommended way) to change this variable is to change the window sizes by dragging the window borders using the mouse and then store the window sizes by calling the command ecb-store-window-sizes. Next time the layout is redrawn the values stored in this option will be used.

     If ecb-store-window-sizes is used then the windows sizes are stored per default as fractions of current frame-width and -height of the ecb-frame, so the stored values will ``work'' for other frame sizes too. But if you call ecb-store-window-sizes with a prefix-argument then the fixed values of current width and height are stored!

     If this option is set ``by hand'' (i.e. not by ecb-store-window-sizes) then the following is important:

       - It is recommended to use fractions of frame-width and -height!.

       - The order of the sequence of the inserted window sizes must be the same as other-window (the not-adviced version!) would walk!

 -- User Option: new-ecb-frame
     Create a new frame at activation time of ECB.

 -- User Option: other-window-jump-behavior
     Which windows of ECB should be accessible by the ECB-adviced function other-window, an intelligent replacement for the Emacs standard version of other-window. The following settings are possible:

       - all: ECB will cycle through all windows of ECB, means it behaves like the original other-window.

       - only-edit: ECB will only cycle through the (max. 2) edit-windows of ECB.

       - edit-and-compile: Like 'only-edit plus the compile window if any.

 -- User Option: redraw-layout-after-hook
     Hooks run direct before the ECB windows will be shown either by ecb-toggle-ecb-windows or ecb-show-ecb-windows. This means that at runtime of this hook the ECB-windows are already visible.

 -- User Option: redraw-layout-before-hook
     Hooks run direct before the ECB-layout will be redrawn by either ecb-redraw-layout.

 -- User Option: redraw-layout-quickly
     If non-nil, we will attempt to redraw the layout quickly. Please read also carefully the documentation of ecb-redraw-layout.

 -- User Option: select-edit-window-on-redraw
     Select the first edit window on ecb-redraw-layout.

 -- User Option: show-ecb-windows-after-hook
     Hooks run direct before the ECB windows will be shown either by ecb-toggle-ecb-windows or ecb-show-ecb-windows. This means that at runtime of this hook the ECB-windows are already visible.

     IMPORTANT: Showing the hidden ECB-windows is internally done by calling ecb-redraw-layout and therefore also the hooks ecb-redraw-layout-before-hook and ecb-redraw-layout-after-hook are evaluated. So there is the following sequence of hooks during the process of showing the hidden ECB-windows:

      1. ecb-show-ecb-windows-before-hook

      2. ecb-redraw-layout-before-hook

      3. <redrawing the layout to show the hidden ECB-windows>

      4. ecb-redraw-layout-after-hook

      5. ecb-show-ecb-windows-after-hook

     So be aware which code you add to which hook!

 -- User Option: show-ecb-windows-before-hook
     Hooks run direct before the ECB windows will be shown either by ecb-toggle-ecb-windows or ecb-show-ecb-windows. This means that at runtime of this hook the ECB-windows are still hidden.

     IMPORTANT: Showing the hidden ECB-windows is internally done by calling ecb-redraw-layout and therefore also the hooks ecb-redraw-layout-before-hook and ecb-redraw-layout-after-hook are evaluated. So there is the following sequence of hooks during the process of showing the hidden ECB-windows:

      1. ecb-show-ecb-windows-before-hook

      2. ecb-redraw-layout-before-hook

      3. <redrawing the layout to show the hidden ECB-windows>

      4. ecb-redraw-layout-after-hook

      5. ecb-show-ecb-windows-after-hook

     So be aware which code you add to which hook!

 -- User Option: split-edit-window
     Sets how and if the edit window should be splitted. But be aware: This option determines only if the edit-window should be splitted at start-time of ECB.

 -- User Option: toggle-layout-sequence
     Toggle sequence for layout toggling with ecb-toggle-layout. Every element of this list has to be a valid layout-name i.e. either one of the predefined layouts or one of the user-defined layouts.

     You can add here as many layouts as you want but to use this option most effective you should not add more than 2 or 3 layouts so every layout can be accessed very fast by toggling with ecb-toggle-layout. It is also senseful to add layouts which have the same principal outline, i.e. all their tree-buffers are on the same side of the frame and the tree-buffer-''column'' (or -''row'') has identical size for the layouts.

     Recommended values are for example:

       - (``left10'' ``left15''), toggles between methods and directories/history

       - (``left10'' ``left13''), toggles between methods and directories

       - (``left10'' ``left14''), toggles between methods and history

       - (``left10'' ``left13'' ``left14''), toggles between methods, history and directories

     See also option ecb-show-sources-in-directories-buffer.

     This option makes only sense if the value is a list with more than 1 element!

 -- User Option: windows-height
     The height of the ECB windows in lines for top-layouts. If the number is less than 1.0 the width is a fraction of the frame height.

 -- User Option: windows-width
     The width of the ECB windows in columns for left- and right layouts. If the number is less than 1.0 the width is a fraction of the frame width.

Group ecb-compilation
---------------------

This group contains the following options:

 -- User Option: compilation-buffer-names
     Additional buffer names that should be displayed in the compile-window. Buffer names can either be defined as strings or as regexps. If the buffer-name of a buffer matches one of the defined string or regexp then it will be displayed in the compile-window of ECB even if compilation-buffer-p says nil for this buffer.

     It is not recommended to add the eshell-buffer-names to this list because ECB already handles the eshell-integration as best as possible (see Using eshell).

 -- User Option: compilation-major-modes
     Additional major-mode that should be displayed in the compile-window. All buffers of a major-mode contained in this list are displayed in the compile-window even if compilation-buffer-p says nil for such a buffer.

     It is not recommended to add eshell-mode to this list because ECB already handles the eshell-integration as best as possible (see Using eshell).

 -- User Option: compilation-predicates
     Predicates when a buffer should be treated as compilation-buffer. Every element of this list has to be a function or lambda-expression which gets as argument a buffer-object and which has to return not nil when this buffer should be treated as compilation-buffer (even if compilation-buffer-p says nil) and therefore be displayed in the compile-window of ECB (if there is any).

     In combination with the values of ecb-compilation-buffer-names and ecb-compilation-major-modes ECB decides when a buffer is displayed in the compile-window.

     Default value is the function comint-check-proc which returns not nil when the buffer is related to a living process.

 -- User Option: compile-window-height
     Height of the durable compilation-window of ECB. If you want a compilation window shown at the bottom of the ECB-layout then set here the height of it (Default is a height of 5). If you redraw the current layout with ecb-redraw-layout then the compilation window (if any) has the height you set here. If the number is less than 1.0 the height is a fraction of the frame height.

     If you do not set a durable compilation window then doing a compilation or displaying temp-buffers (e.g. *Help*-buffers) splits temporally the edit window vertically if the edit window is not splitted already or uses the ''other'' edit window temporally for compilation output if the edit window is already splitted. This is the recommended value for this option because this is the standard-behavior of Emacs.

     Beware: If you set a durable compilation window then ECB displays all buffers for which ecb-compilation-buffer-p returns not nil in that durable compilation window. If a buffer which should being displayed there is not displayed there then try to modify the options ecb-compilation-buffer-names, ecb-compilation-major-modes or ecb-compilation-predicates (in this sequence).

     See also the options ecb-compile-window-temporally-enlarge and ecb-enlarged-compilation-window-max-height and also the command ecb-toggle-compile-window-height!

     Regardless of the settings you define here: If you have destroyed or changed the ECB-screen-layout by any action you can always go back to this layout with ecb-redraw-layout

 -- User Option: compile-window-prevent-shrink-below-height
     Allow the compile-window to be shrunken below its height. A non nil value means ECB prevents the compile-window from being shrunken below the threshold of ecb-compile-window-height by displaying temp-buffers (e.g. *Help* etc.) or after running compilations or greps. But interactively it is always allowed to shrink it to every height!

     If nil then ECB does nothing to prevent being shrunken below the value of ecb-compile-window-height.

     Default is t.

 -- User Option: compile-window-temporally-enlarge
     Let Emacs temporally enlarge the compile-window of the ECB-layout. This option has only an effect if ecb-compile-window-height is not nil!

     The following values are possible:

       - after-display: After displaying a ``compilation-buffer'' (in the sense of ecb-compilation-buffer-p!) in the compile-window of ECB. For the max. height of the enlarged compile-window see the option ecb-enlarged-compilation-window-max-height.

       - after-selection: Selecting the ecb-compile-window auto. enlarges it and de-selecting (means leaving ecb-compile-window) auto. shrinks it. Enlarging and shrinking the ecb-compile-window is done with ecb-toggle-compile-window-height. See also the documentation of this function!

       - both: The combination of 'after-display and 'after-selection.

       - nil: ECB fixes always the height of the ecb-compile-window at the value of ecb-compile-window-height.

     To restore the ECB-layout after such a buffer-enlarge just call ecb-toggle-compile-window-height or ecb-redraw-layout.

 -- User Option: compile-window-width
     Width of the compile-window.

     Possible values are frame and edit-window. With frame the compile-window looks like:

             -------------------------------------------------------
             |              |                                      |
             |  Directories |                                      |
             |              |                                      |
             |--------------|            edit-window(s)            |
             |              |                                      |
             |  Methods     |                                      |
             |              |                                      |
             -------------------------------------------------------
             |                                                     |
             |                    Compilation                      |
             |                                                     |
             -------------------------------------------------------

     With edit-window the compile-window looks like:

             -------------------------------------------------------
             |              |                                      |
             |  Directories |                                      |
             |              |                                      |
             |--------------|            edit-window(s)            |
             |              |                                      |
             |  Methods     |                                      |
             |              |                                      |
             |              |---------------------------------------
             |              |                                      |
             |              |            Compilation               |
             |              |                                      |
             -------------------------------------------------------

     This option takes only effect if ecb-compile-window-height is not nil!

 -- User Option: enlarged-compilation-window-max-height
     The max height of the compile-window after enlarging it. The max height of the compilation window after enlarged by ecb-toggle-compile-window-height. The following values are allowed:

     best:

     ECB fits the height of the compile-window exactly to the size of its current contents but never shrinks below the value of ecb-compile-window-height or enlarges over the half of the frame-height of the ECB-frame. The values of the options compilation-window-height and temp-buffer-max-height are taken into account dependent of the current major-mode of the buffer in the compile-window: If compilation-mode then compilation-window-height is used otherwise temp-buffer-max-height.

     half:

     1/2 the frame-height of the ECB-frame

     Any number:

     Max height in lines. If the number is less than 1.0 the height is a fraction of the frame height (e.g. 0.33 results in a max-height of 1/3 the frame-height).

Group ecb-create-layout
-----------------------

This group contains the following options:

 -- User Option: create-layout-file
     File where all layouts created by ecb-create-new-layout are stored.

 -- User Option: ecb-create-layout-frame-height
     Frame height of the layout creation frame.

 -- User Option: ecb-create-layout-frame-width
     Frame width of the layout creation frame.

Group ecb-face-options
----------------------

This group contains the following options:

 -- User Option: directories-general-face
     Basic face for the ECB directories buffer. This defines the basic face the whole directory buffer should displayed with. If the face ecb-default-general-face is used then the display of all ECB-tree-buffers can be changed by modifying only the face ecb-default-general-face.

     Changes take first effect after finishing and reactivating ECB!

 -- User Option: directory-face
     Face used for highlighting current directory in the directories buffer. If the face ecb-default-highlight-face is used then the display of all ECB-tree-buffers can be changed by modifying only the face ecb-default-highlight-face.

     Changes take first effect after finishing and reactivating ECB!

 -- User Option: history-face
     Face used for highlighting current history-entry in the history buffer. If the face ecb-default-highlight-face is used then the display of all ECB-tree-buffers can be changed by modifying only the face ecb-default-highlight-face.

     Changes take first effect after finishing and reactivating ECB!

 -- User Option: history-general-face
     Basic face for the ECB directory buffer. This defines the basic face the whole history buffer should displayed with. If the face ecb-default-general-face is used then the display of all ECB-tree-buffers can be changed by modifying only the face ecb-default-general-face.

     Changes take first effect after finishing and reactivating ECB!

 -- User Option: method-face
     Face used for highlighting current method, class or variable in the methods buffer. If the face ecb-default-highlight-face is used then the display of all ECB-tree-buffers can be changed by modifying only the face ecb-default-highlight-face.

     Changes take first effect after finishing and reactivating ECB!

 -- User Option: method-non-semantic-face
     Face used for for displaying tokens of sources not supported by semantic.

     Changes take first effect after finishing and reactivating ECB!

 -- User Option: methods-general-face
     Basic face for the ECB methods buffer. This defines the basic face the whole methods buffer should displayed with. If the face ecb-default-general-face is used then the display of all ECB-tree-buffers can be changed by modifying only the face ecb-default-general-face.

     Changes take first effect after finishing and reactivating ECB!

 -- User Option: source-face
     Face used for highlighting current source in the sources buffer. If the face ecb-default-highlight-face is used then the display of all ECB-tree-buffers can be changed by modifying only the face ecb-default-highlight-face.

     Changes take first effect after finishing and reactivating ECB!

 -- User Option: source-in-directories-buffer-face
     Face for source files in the directories buffer.

 -- User Option: sources-general-face
     Basic face for the ECB sources buffer. This defines the basic face the whole sources buffer should displayed with. If the face ecb-default-general-face is used then the display of all ECB-tree-buffers can be changed by modifying only the face ecb-default-general-face.

     Changes take first effect after finishing and reactivating ECB!

 -- User Option: token-header-face
     Face used for highlighting the token header after jumping to it by clicking onto a node in the methods buffer.

Group ecb-faces
---------------

This group contains the following faces:

ecb-bucket-token-face:
     Face which can be used for displaying bucket tokens in the methods buffer. See also `ecb-bucket-token-display'.

ecb-default-general-face:
     Basic face for all ECB tree-buffers. It's recommended to define here the font-family, the font-size, the basic color etc.

     In GNU Emacs 21.X all faces (even the face ecb-default-highlight-face) used in the ECB tree-buffers inherit from this face. Therefore the default attributes like font etc. of a face used in a tree-buffer can be very easily changed with face ecb-default-general-face.

     With XEmacs and GNU Emacs 20.X there is no inheritance-feature but the options ecb-directories-general-face, ecb-sources-general-face, ecb-methods-general-face and ecb-history-general-face offer the choice to use the face ecb-default-general-face so also with XEmacs and GNU Emacs 20.X the basic face-settings can be easily changed just by customizing the face ecb-default-general-face!

ecb-default-highlight-face:
     Define basic face for highlighting the selected node in an ECB tree-buffer.

     In GNU Emacs 21.X all highlighting faces in the ECB tree-buffers inherit from this face. Therefore the default attributes like font etc. of a face used in a tree-buffer for highlighting the current token can be very easily changed with face ecb-default-highlight-face.

     With XEmacs and GNU Emacs 20.X there is no inheritance-feature but the options ecb-directory-face, ecb-source-face, ecb-method-face and ecb-history-face offer the choice to use the face ecb-default-highlight-face so also with XEmacs and GNU Emacs 20.X the basic face-settings can be easily changed just by customizing the face ecb-default-highlight-face!

ecb-directories-general-face:
     Basic face for the ECB directories buffer. It´s recommended to define here the font-family, the font-size, the basic color etc.

ecb-directory-face:
     Define face used for highlighting current directory in the directories buffer.

ecb-history-face:
     Define face used for highlighting current history-entry in the history buffer.

ecb-history-general-face:
     Basic face for the ECB history buffer. It´s recommended to define here the font-family, the font-size, the basic color etc.

ecb-method-face:
     Define face used for highlighting current method, class or variable in the methods buffer.

ecb-methods-general-face:
     Basic face for the ECB methods buffer. It´s recommended to define here the font-family, the font-size, the basic color etc.

ecb-method-non-semantic-face:
     Define face used for displaying tokens of sources not supported by semantic.

ecb-source-face:
     Define face used for highlighting current source in the sources buffer.

ecb-source-in-directories-buffer-face:
     Define a face for displaying sources in the directories buffer.

ecb-sources-general-face:
     Basic face for the ECB sources buffer. It´s recommended to define here the font-family, the font-size, the basic color etc.

ecb-token-header-face:
     Define face used for highlighting the token header after jumping to it by clicking onto a node in the methods buffer.

ecb-type-token-class-face:
     Define face used with option ecb-type-token-display.

ecb-type-token-enum-face:
     Define face used with option ecb-type-token-display.

ecb-type-token-group-face:
     Define face used with option ecb-type-token-display.

ecb-type-token-interface-face:
     Define face used with option ecb-type-token-display.

ecb-type-token-struct-face:
     Define face used with option ecb-type-token-display.

ecb-type-token-typedef-face:
     Define face used with option ecb-type-token-display.

Just call customize-face <face-name> to customize these faces for your personal taste. Or customize the related option in the group ecb-face-options.

Group ecb-download
------------------

This group contains the following options:

 -- User Option: download-delete-archive
     Should the downloaded archive be deleted after successful installation or after failure during the installation-process. Possible values are:

       - only-after-success: Archive is only deleted after successful installation but not if a failure occurs during the installation process.

       - always: Archive is also deleted if an error occurs.

       - nil: Archive will never be deleted.

 -- User Option: download-install-parent-dir
     Parent directory where downloaded packages are installed.

     ECB installs a downloaded package in this directory, i.e. the downloaded archive X.tar.gz will be extracted in this directory so afterwards this directory contains a new subdirectory X which contains the downloaded package.

     This directory must be write-able!

 -- User Option: download-package-version-type
     Version type ECB is allowed to download for upgrading.

     If you want to upgrade to a newer ECB-version via ecb-download-ecb or if you must upgrade to newer semantic- eieio- and/or speedbar-versions (because ECB requires these newer versions) then this option specifies which version-types are allowed. ECB checks on the download-sites of ECB/semantic/eieio/speedbar which versions are currently available and then downloads always the latest version matching the specified type:

       - 2: Get the newest version of all stable versions available.

       - 1: Get the newest version of all stable and beta versions available.

       - 0: Get the newest version of all stable, beta and alpha versions available.

       - -1: Ask before downloading in the minibuffer for a version (TAB-completion of all available versions is possible).

     So, 2 means stable, 1 means stable and betas, 0 means stable, betas and alphas and -1 means ask the user for a version.

     Per default stable and beta-versions are allowed (value 1).

     But all versions must match the restrictions of the specified min- and max-versions of the required packages. For this see the file README!

 -- User Option: download-url
     URL where download-able ECB-versions are located. The ECB-archive-file (e.g. ecb-1.70.tar.gz) will be appended to this URL and ecb-download-ecb will try to download this archive.

     Note: Normally this URL should never change but who knows...

Group ecb-help
--------------

This group contains the following options:

 -- User Option: help-html-path
     Path where the ECB online help in HTML format resides. This must be the location of the ecb.html which comes with the ECB distribution. If is installed by unpacking the archive available on the ECB website then this is the subdir ecb-help-html-subdir of the installation directory of ECB. If it is installed as XEmacs-package (e.g. via the package manager of XEmacs) then this is probably either the directory ``../../html/'' or ``../../etc/ecb/html/'' (both relative to the Elisp directory of ECB).

     The path can either be an absolute path or a path relative to the directory where the Elisp files of ECB are.

     Normally there should be no need to change this option!

 -- User Option: help-info-path
     Path where the ECB online help in info format resides. This must be the location of the ecb.info which comes with the ECB distribution. If is installed by unpacking the archive available on the ECB website then this is the subdir ecb-help-info-subdir of the installation directory of ECB. If it is installed as XEmacs-package (e.g. via the package manager of XEmacs) then this is probably the directory ``../../info/'' (relative to the Elisp directory of ECB).

     The path can either be an absolute path or a path relative to the directory where the Elisp files of ECB are.

     Normally there should be no need to change this option!

 -- User Option: show-help-format
     The format ecb-show-help shows its online help. Allowed values are 'info (for the Info format) and 'html (for HTML format). If the value is 'html then browse-url-browser-function says which browser is used.

     Note: If you got ECB as a standard XEmacs-package maybe the HTML-online-documentation is not included.

Group ecb-eshell
----------------

This group contains the following options:

 -- User Option: eshell-auto-activate
     Startup the eshell and display it in the compile-window. If current layout does not display a compile-window (see ecb-compile-window-height) then nothing is done.

 -- User Option: eshell-enlarge-when-eshell
     Enlarge the compile-window if it is selected by eshell. This takes only effect if the command eshell is called!

 -- User Option: eshell-fit-window-to-command-output
     Fit the compile-window after an eshell-command to the output. This is done by the function ecb-eshell-fit-window-to-output which is added to eshell-post-command-hook ie. which is running autom. after each eshell-command.

 -- User Option: eshell-synchronize
     Synchronize eshell with the default-directory of current source-buffer. The synchronization is done by ecb-eshell-current-buffer-sync which can be called interactively but normally it is called autom. by the ecb-current-buffer-sync-hook.

Group ecb-non-semantic
----------------------

This group contains the following options:

 -- User Option: auto-save-before-etags-methods-rebuild
     Automatic saving of current buffer before rebuilding its methods.

     This option is only relevant for sources which are supported and parsed by etags (see ecb-process-non-semantic-files). Because etags is an external tool a source-buffer can only be reparsed if the buffer is saved to disk. So the command ecb-rebuild-methods-buffer checks for sources which are not supported by semantic or imenu if either this option is t or if the major-mode of the source-buffer is contained in this list: In both cases ECB saves the current source-buffer before it re-runs etags for reparsing the source. If nil or if the major-mode is not contained then no automatic saving will be done!

     For all source supported by semantic or by imenu this option takes no effect.

 -- User Option: non-semantic-exclude-modes
     Exclude modes from parsing with imenu or etags. Per default, ECB tries to parse all file-types not supported by semantic with imenu or etags or some other method (for details see the option ecb-non-semantic-parsing-function). If a file-type can not be parsed by semantic, imenu or etags than this simply results in an empty method-buffer for this file. But nevertheless you will get a message ``Sorry, no support for a file of that extension'' which comes from the speedbar-library and can not switched off. Therefore if a major-mode is known as not parse-able by semantic, imenu or etags it can be added to this option and then it will be excluded from being tried to parsed.

 -- User Option: non-semantic-methods-initial-expand
     Initially expand all tokens for not by semantic supported sources. This option can be customized on a major-mode basis, i.e. if a major-mode is contained in this option then all tokens for this modes will be initially expanded - otherwise not.

 -- User Option: non-semantic-parsing-function
     Define mode-dependent parsing functions for non-semantic files. This is an alist where the car is a major-mode symbol and the cdr is a function-symbol of a function which should be used for parsing a non-semantic buffer, i.h. a buffer for which no semantic grammar exists. Such a function gets one argument - the filename of current buffer - and has to generate and return a token/tag list which is understandable by speedbar-insert-generic-list. speedbar has already included two functions speedbar-fetch-dynamic-imenu and speedbar-fetch-dynamic-etags which can be used for parsing buffers with imenu rsp. etags.

     This option takes only effect if ecb-process-non-semantic-files is not nil: Then ECB checks for non-semantic buffers if current major-mode is contained in this option and if yes, then the specified parsing function is called; if not then the cars of the elements of speedbar-dynamic-tags-function-list are called in that sequence they are listed in this variable. See option speedbar-dynamic-tags-function-list for further details.

     In most cases imenu-parsing is preferable over etags-parsing because imenu operates on Emacs-buffers and needs no external tool and therefore parsing works also if current contents of a buffer are not saved to disk. But maybe sometimes etags may return better parsing results

     IMPORTANT: if imenu-parsing should be used then the option speedbar-use-imenu-flag must be set to not nil!

 -- User Option: process-non-semantic-files
     Display content of non-semantic-files in the ECB-methods-buffer. See also ecb-non-semantic-parsing-function.

 -- User Option: rebuild-non-semantic-methods-before-hook
     Hook running at beginning of the function ecb-rebuild-methods-buffer-for-non-semantic. This function is always called by the command ecb-rebuild-methods-buffer for not semantic supported source-types.

     Every function of this hook gets one argument: The complete filename of the current source-buffer in the edit-window. The Method-buffer is only rebuild by ecb-rebuild-methods-buffer-for-non-semantic if either the hook contains no function (the default) or if no function of this hook returns nil! See run-hook-with-args-until-failure for description how these function are processed.

Group ecb-winman
----------------

This group contains the following options:

 -- User Option: winman-escreen-number
     Number of the escreen which is reserved for ECB. If you go to the escreen with this number you go always to the escreen with activated ECB. All other escreen-numbers are escreens with deactivated ECB!

 -- User Option: winman-winring-name
     Name of the winring-window-configuration reserved for ECB. If you go to the window-configuration with this name you go always to the window-configuration with activated ECB. All other window-configuration are configurations with deactivated ECB!

Submitting a problem report
***************************

If you run into problems with ECB you should first take a look into

  - FAQ or

  - Conflicts and bugs or

  - Tips and tricks or

  - the appropriate section of this online-manual.

If your problem(s) still remain you can/should send a problem report to the ECB mailing list ecb-list@lists.sourceforge.net. ECB offers you a command which does all necessary for you to send a problem report. Just call ecb-submit-problem-report! Please read the documentation of this command, see Interactive ECB commands.

This command creates a problem-report buffer for you. After that you get a menu ``Mail'' (dependent on the mail-package used, the menu can have a different name) with commands to send the problem report. But for this the variable mail-user-agent must be configured right for your system. If you can´t get working this mechanism you can simply copy the whole problem-report buffer after filling it out and sending it with your standard mail-client to ecb-list@lists.sourceforge.net!

Please read also the documentation of the option ecb-debug-mode and switch on the debug mode of ECB (also available in the Help-menu of ECB!) before submitting a problem-report!

Upgrading and downloading packages
**********************************

This chapter describes all aspects of upgrading to a newer version of ECB.

The first section describes how to download and install a new package from the web, where ``package'' means either ECB itself or the required libraries semantic, eieio and speedbar.

After installing a new ECB-version ECB checks if the values of the customized ECB-options are still compatible. If not ECB does some smart things. This is the topic of the second section.

Downloading new versions of ECB and/or required packages
========================================================

ECB offers the possibility to upgrade to newer versions direct from the ECB-website. This can be done if the following requirements are satisfied:

 1. A connection to the web is available

 2. The tools ``wget'', ``tar'' and ``gzip'' are installed

     With Unix-systems these tools are in the standard-distribution. If you are running any Microsoft Windows system then you need cygwin (cygwin is available at) http://cygwin.com/ which offers these tools too. On every system these tools must reside in the PATH environment-variable!

     If you are behind a firewall and you have to use a proxy you maybe need the following wget-configuration in your file ~/.wgetrc:

          # Define your proxies (where 8080 and 8081 are examples
          # for the port-numbers)
          http_proxy = http://your.proxy.com:8080
          ftp_proxy  = http://your.ftpproxy.com:8081

          # If you do not want to use proxy at all, set this to off.
          use_proxy = on

If these requirements are satisfied you can download and install both ECB itself and also the required versions of semantic, eieio and speedbar:

  * Download a new ECB-version with ecb-download-ecb:

     A description for this command you will find in Interactive ECB commands. Check also the options of the customize-group 'ecb-download' (see ecb-download).

  * Download and install of required packages:

     ECB checks at load-time if the packages semantic, eieio and speedbar are at least installed and at start-time if the required versions of semantic, eieio and speedbar (see README) are installed and loaded into Emacs. If not you will be asked if you want auto. download and install them. If you confirm this then ECB does the following:

      1. Checking which versions are available at the download-site of the required packages. With the option ecb-download-package-version-type you can specify which type of versions (only stable, stable and betas or stable, betas and alphas) you allow to download and install. This option offers also the choice of asking you for a certain version. Depending of this setting ECB either ask you which version it should download and install or chooses autom. the newest version available which is matching both its min-max-requirements and the setting in ecb-download-package-version-type.

          NOTE: Currently there are only beta-versions of speedbar available therefore this option has to be set to 1 (allow stable and beta versions). But the speedbar beta-versions are very stable!

      2. Downloading and installing the right version (see 1.) of the required packages. ECB downloads and installs the new package versions in subdirectories of ecb-download-install-parent-dir.

     If both of these actions succeed then you will get a message-buffer which tells you something like:

          -----------------------------------------------------------------
          Current state of the required packages semantic, eieio, speedbar:

          - semantic author-version must be [1.4, 1.4.9]:
            Installed in /usr/local/lib/site-lisp/semantic-1.4

          - eieio author-version must be [0.17, 0.17.9]:
            Correct version already loaded!

          - speedbar author-version must be [0.14beta1, 0.15.9]:
            Correct version already loaded!

          After adding the new directory to your load-path and then
          restarting Emacs the new package(s) can be activated.
          -----------------------------------------------------------------

     Remark 1: "P author-version must be [x y]" means, that ECB requires package P in a version-number >= x and <= y.

     Remark 2: By setting the option ecb-version-check to nil you can prevent ECB from checking correct versions of semantic, eieio and speedbar but it's strongly recommended not to do this!

Automatic upgrading of options
==============================

User interface for option-upgrading
-----------------------------------

There are two interactive commands (see Interactive ECB commands):

  - ecb-upgrade-options: Does all necessary beginning with a incompatibility-check for all options, upgrading/resetting incompatible options and ending with the display of all upgraded or reset options.

  - ecb-display-upgraded-options: Displays a temp. buffer with all upgraded or reseted ECB-options with their old and new values.

If the option ecb-auto-compatibility-check has a non-nil value (which is the default) then ECB does all this stuff automatically at startup. This is very recommended!

If you are interested in some background information, read Background information!

Background information
----------------------

Big packages like ECB will be enhanced and developed continuously so sometimes a new version must be released. Such packages offer in general a lot of customizable options so probably some of these options change the type or are renamed because the old type and/or name of the option makes no sense in the new release.

Especially options which have changed the type of their value are now a problem for the user which want to upgrade to the latest ECB-version: If the user has saved a certain value for option X in its file .emacs but the type of this saved value doesn't match the new defined type in the defcustom-form after an ECB-upgrade then there can occur serious problems like ECB can not be started anymore or even Emacs can not be started without errors.

Until now there was only one way to fix these problems: The user must manually edit his file .emacs and remove all entries for options which have now another type. After this and after restarting Emacs the new default-values of the type-changed options in the new ECB-release are active and the user can go on using Emacs and ECB. But this approach to fix the incompatible-option-problem has two serious drawbacks:

 1. The user must manually edit the customize-section in his file .emacs. This should normally not be done and if then only by old-handed Emacs-users.

 2. The customized value of the option X in the old-release (with the old type) is lost because after removing the related entry from the file .emacs the new default-value is active, so the user must re-customize the option X.

OK, this is one half of the option-upgrade-problem but a new ECB-release can also rename a option from name X to name Y because the new name Y makes much more sense and/or is more mnemonic. If only the name has changed but not the type this is not a serious problem like above but also annoying because the customized value of the old-option X takes no effect in the new release but instead the default-value of the new-option Y is now active. But nevertheless this problem has the drawback number 2 (see above).

The last category of upgrade-problems is a renamed option which has also changed its type.

ECB has a solution for all these problems:

  * It checks all customized values of all ECB-options if they are still type-compatible. If not then it tries to upgrade the old-value to the new value-type and if this is not possible then it resets the option to the new default value and store it via customize in the .emacs-file (or in any file which is used for customized options).

  * It offers a special constant ecb-upgradable-option-alist which allows the ECB-maintainers to define special transformings for renamed options so even the value of an old-option X can be savely transformed to the new-option Y and the old setting is not lost.

All these checks and transformings are done at beginning of activating ECB - if the option ecb-auto-compatibility-check is not nil. If ECB has recognized incompatible or renamed options it does its upgrading/reseting-job so all ECB-options have correct types so ECB can start correct. After ECB is started it displays a list of all upgraded or reseted option with their old and new values.

Tips and tricks
***************

This chapter contains some tips and tricks how to deal best with some situations.

Changing faces in the ECB tree-buffers
======================================

There are two basic faces:

  * ecb-default-general-face: Basic face for displaying an ECB-tree-buffer.

     It´s recommended to define the font-family, the font-size, the basic color etc. with this face.

     In GNU Emacs 21.X all faces (even the face ecb-default-highlight-face) used in the ECB tree-buffers inherit from this face. Therefore the default attributes like font etc. of a face used in a tree-buffer can be very easily changed with face ecb-default-general-face.

     With XEmacs and GNU Emacs 20.X there is no inheritance-feature but the options ecb-directories-general-face, ecb-sources-general-face, ecb-methods-general-face and ecb-history-general-face offer the choice to use the face ecb-default-general-face so also with XEmacs and GNU Emacs 20.X the basic face-settings can be easily changed just by customizing the face ecb-default-general-face.

  * ecb-default-highlight-face: Basic face for highlighting the current node in an ECB-tree-buffer.

     In GNU Emacs 21.X all highlighting faces used in the ECB tree-buffers inherit from this face. Therefore the default attributes like font etc. of a highlighting face used in a tree-buffer can be very easily changed with face ecb-default-highlight-face.

     With XEmacs and GNU Emacs 20.X there is no inheritance-feature but the options ecb-directory-face, ecb-source-face, ecb-method-face and ecb-history-face offer the choice to use the face ecb-default-highlight-face so also with XEmacs and GNU Emacs 20.X the basic face-settings can be easily changed just by customizing the face ecb-default-highlight-face.

With these faces you can change the basic attributes easily and fast for ALL ECB-tree-buffers. But you are also able to display each ECB-tree-buffer with different faces, see the different options for every tree-buffer mentioned above.

Please note (only for XEmacs users): Cause of the lack of the font-inheritance feature using ONE other font for the ECB-methods buffer can NOT be achieved just by setting ecb-methods-general-face to ecb-default-general-face and changing the font of this default face. In addition you have to set the same font also for the face ecb-bucket-token-face like in the following example:

     (defconst my-ecb-font
               "-outline-Courier-normal-normal-13-97-96-96-c-*-iso8859-1")
     (set-face-font 'ecb-default-general-face my-ecb-font)
     (set-face-font 'ecb-bucket-token-face my-ecb-font)

This code sets the new defined font my-ecb-font as font for all (Of course ecb-directories-general-face, ecb-sources-general-face, ecb-methods-general-face and ecb-history-general-face must be set to ecb-default-general-face!) ECB-tree-buffers (incl. the methods buffer).

Working with small screens
==========================

If your screen is very small so you need every square-centimeter for displaying the buffer which you want to edit, ECB offers you a special layouts, where only the ECB-methods buffer is displayed on top or on left-side. Here comes what you should/can do to work best with ECB in such a situation:

  * First customize your ECB:

      1. Customize ecb-layout-name to layout-name ``top2'' (on top) or ``left9'' (on left-side)

      2. Ensure that ecb-compile-window-height is nil.

      3. Optional: Adjust the ecb-windows-height rsp. ecb-windows-width.

      4. Save your changes.

  * To edit your buffers: Call ecb-toggle-ecb-windows (also available via the menu ``ECB'' and by C-c . lw) or ecb-hide-ecb-windows to hide the ECB-method buffer so you get all the place of your screen for editing.

  * To browse and select functions: Call ecb-toggle-ecb-windows or ecb-show-ecb-windows to make the ECB-method buffer visible if not already. If you want select a method/variable with the keyboard instead with the mouse you should read the section Using the keyboard in this online help!

The possibility of hiding temporally the ECB windows like described above is also useful for all the other layouts.

Working with big screens
========================

ECB offers a layout type ``left-right'' with special ECB-tree-windows on the left and right side of the edit-window. The layouts ``leftright1'' and ``leftright2''are examples for this layout type. See Creating a new ECB-layout and The layout-engine for details about how to create or program more layouts of this type.

Such a layout is eventually the best choice for big screens because the several ECB-tree-windows are bigger and can display more informations without scrolling.

With such a layout it can could be senseful to reduce the value of the option ecb-windows-width compared to layouts of type left or right. A value of max. 0.25 should be enough.

Simulating speedbar without an extra frame
==========================================

You can simulate a speedbar-like layout within ONE frame by doing the following:

 1. Customize ecb-layout-name to layout name ``left9'', ``left12'', ``left13'' or ``left14'' dependent to what you like.

 2. Optional: Ensure that ecb-compile-window-height is nil.

 3. Optional: Adjust the ecb-windows-width.

 4. Optional: Customize ecb-toggle-layout-sequence and toggle very fast between several layouts by ecb-toggle-layout. See the doc-strings!

 5. Optional: Customize ecb-show-sources-in-directories-buffer to not nil if the chosen layout (see 1. and 4.) contains a directories-tree-buffer.

 6. Save your changes.

But not only simulating speedbar is possible but also full integrating it into the ECB and the ECB-frame, see Integrating speedbar.

Integrating speedbar in the ECB-frame
=====================================

It is very easy to integrate speedbar into ECB. There are two different ways to do this:

 1. You can either use speedbar in the directories-, sources- or methods-window of ECB instead of the built-in directory-, sources- or methods-browser of ECB. This can be done via the option ecb-use-speedbar-instead-native-tree-buffer.

 2. Or you can integrate an extra speedbar-window into a layout independent of the existence of a directory-, sources- or methods-window. For this you can either use the built-in layout ``left-dir-plus-speedbar'' or you have to create your own layout interactively with the command ecb-create-new-layout. This way is not described in more details because there is nothing more to describe - just create your layout.

In general integrating speedbar into the ECB-frame makes sense for people...

  * ...who like the speedbar way of handling directories and source-files but also like the ECB-way of displaying the buffer-contents (like methods and variables in a source-file). This people should use the option ecb-use-speedbar-instead-native-tree-buffer and set it to dir.

  * ...who like the speedbar way of browsing things like directories, files, file-contents etc. but who dislike the extra speedbar-frame.

Note: It is not necessary to integrate speedbar if you only want parsing sources not supported by semantic. From version 1.94 on ECB supports native parsing and displaying of such sources (see Non-semantic sources)!

Regardless the group you belong, with the speedbar-integration feature of ECB you can combine both worlds, the speedbar- and the ECB-world:

 1. Choose a layout which either contains a directories- or a sources-window but not both of them (Only one of them is needed if you use speedbar because speedbar displays directories and sources in one window. But if you like wasting space then you can also use a layout with both windows...).

     Because speedbar has also display-modes for buffers and info-nodes and some other useful things (which can be changed by the speedbar-command speedbar-change-initial-expansion-list we recommend layouts like ``left15'' or ``leftright3'' for using with speedbar.

 2. Set the option ecb-use-speedbar-instead-native-tree-buffer to not nil. After this the chosen window of ECB will contain a full featured speedbar (the only difference to standard speedbar is not residing in an extra frame).

Note: If you belong to the first group of people (s.a.) a similar effect and usability is available by setting ecb-use-speedbar-instead-native-tree-buffer to nil and setting ecb-show-sources-in-directories-buffer to not nil, because this combination displays also directories and sources in one window.

So with the option ecb-use-speedbar-instead-native-tree-buffer you have the choice which way of displaying and handling ``things'' (directories, sources, methods...) you want (the speedbar- or the ECB-way).

During speedbar is running within ECB (i.e. ecb-use-speedbar-instead-native-tree-buffer is not nil) the speedbar-command speedbar is disabled and the speedbar-command speedbar-get-focus switches between the speedbar-window and the edit-window (The standard behavior is switching between the speedbar-frame and the attached frame, but this make obviously no sense during running speedbar with ECB.).

IMPORTANT: ECB can only integrate speedbar-versions >= 0.14beta1! If you use lower versions of speedbar ecb-use-speedbar-for-directories has no effect.

Optimize scrolling in the edit-window
=====================================

Emacs 20.X seems to slow down scrolling if there is a horizontal split in the frame and/or a lot of overlays in the buffer which is scrolled. This is independent of ECB! But because almost all layouts of ECB uses horizontal splits of the frame and because ECB is based on semantic which uses overlays intensively there can be poor scrolling performance in large buffers, especially with java-buffers in jde-mode.

This scrolling performance can be increased a lot if the options scroll-conservatively and scroll-step are set appropriately: The former one should have a value of 0 during ECB is active and the latter one a value of either 0 or > 1 (the exact value depends on the power of your machine).

As far as we know this is not a problem of Emacs 21.X or XEmacs. With these versions of Emacs there should be no scrolling problem even with scroll-step has value 1.

Working with large directories
==============================

If ecb-source-path contains directories with many files and subdirs, especially if these directories are mounted net-drives (``many'' means here something > 1000, dependent on the speed of the net-connection and the machine), actualizing the sources- and/or directories- buffer of ECB (if displayed in current layout!) can slow down dramatically. If this is a problem the contents of certain directories and also the contents of the sources-buffer can be cached which increases the speed a lot. See ecb-cache-directory-contents.

IMPORTANT: The full speed-advantage of this cache-mechanism is only available if ecb-show-sources-in-directories-buffer is nil, i.e. sources of a directory are displayed in the ECB-sources-window. The reason is that only with a sources window the tree-buffer contents for the sources can be cached (i.e. the buffer-content of the ECB-sources-window) whereas with sources displayed in the directories buffer only the disk-contents of a directory are cached - which increases speed too but not so much as with sources displayed in the extra window ECB-sources.

The cache of a directory can be only refreshed by a POWER-click (with mouse or keyboard) onto the related directory-node in the directories-buffer of ECB (see Using the mouse).

Optimal using of eshell in ECB
==============================

ECB offers a very smart integration of the ``eshell'' if you are using a compile window (see Temp- and compile-buffers) (Of course you can use eshell also if there is no compile-window. Then it is just displayed in the edit-window and there is no special integration.)

Here is a short summary of provided features:

  * Ability to jump to the eshell buffer within the compilation window by simply call eshell (bound to C-c . e). If the eshell isn't running it will be started.

  * Expands the compilation window when you run commands. So for example it allows you to view the eshell in minimized mode and then when you run ``ls'' the window automatically expands (but always depending of the output of the command you run).

  * Synchronizes the current directory of the eshell with the current buffer in the edit-window of ECB.

  * Provides smart window layout of the eshell buffer. This makes sure that the eshell is taking up the exact amount of space and that nothing is hidden.

Here comes a detailed explanation of these features and how to use it (all these features are only available if you use a durable compile-window, i.e. if ecb-compile-window-height is not nil):

You have not to learn a new command for the eshell-start - just call eshell (for convenience also bound to C-c . e) and the eshell will displayed in the compile-window of ECB (if eshell is not already alive then it will be started automatically).

ECB tries to display the contents of the eshell-buffer as best as possible, means ECB can autom. enlarge and shrink the compile-window so the contents of the eshell are fitting the window. See option ecb-eshell-enlarge-when-eshell and ecb-eshell-fit-window-to-command-output. Normally this is done autom. but you can also you the standard compile-window enlarging-command of ECB: ecb-toggle-compile-window-height.

ECB tries also to recenter the eshell-buffer as best as possible. Normally this is done autom but you can do it on demand with the command ecb-eshell-recenter.

If option ecb-eshell-synchronize is true then ECB always synchronizes the command prompt of eshell with the directory of current source-buffer of the edit-window.

With the option ecb-eshell-auto-activate you can start eshell autom. in the compile-window when ECB is started but of course if a compile-window exists.

Grepping directories with ECB
=============================

ECB offers in the popup-menus in the directories- and sources-tree-buffer commands for easy (recursive) grepping the current directory under point (directory-buffer) rsp. the current-directory (sources-buffer). In every case just the function of the options ecb-grep-function rsp. ecb-grep-find-function is called and the default-directory is tempor. set to the chosen directory so the grep will performed in this directory regardless of the default-directory of current buffer in the edit-window.

Other smart things beyond that are not done by ECB, see also ecb-grep-function!

So, how to exclude some subdirectories or files from the grep?

Basically this has to be done with the ``-prune'' option of the find-utility: If the standard-grep facility of Emacs is used then this is not easy but with the library igrep.el there is a convenient way to exclude things like CVS- or RCS-directories from the find-call: See the variable igrep-find-prune-clause of the library igrep.el.

Working best with ECB and JDEE
==============================

ECB is completely language independent, i.e. it works with any language supported by semantic (e.g. C, C++, Java, Elisp etc.).

But there are some special integrations for the great Java-Development-Environment JDEE:

  * Displaying contents of class under point

     With the command ecb-jde-display-class-at-point you can display the contents of the class which contains the definition of the ``thing'' at point (which can be a method, variable etc.).

  * Creating new source-files

     The popup-menus in the directories- and the sources-buffer offer a command ``Create Source'' which allows easy creating new java-sources by calling the command jde-gen-class-buffer.

Displaying the compile-window on demand
=======================================

If you like displaying all output of compile/grep/etc. an all temp-buffers like *Help*-buffers in an extra compile-window (see Temp- and compile-buffers) but you dislike wasting the space of this compile-window if you are just editing then you can get a compile-window ``on demand''. Just do the following:

 1. Customize ecb-compile-window-height to not nil and save it for future sessions. This gives you an extra compile-window at the bottom.

 2. Add the following to your .emacs:

          (add-hook 'ecb-activate-hook
                    (lambda ()
                       (ecb-toggle-compile-window -1)))

     This hides the extra compile-window direct after the start of ECB because there is no need for a compile-window at this moment.

This is all you have to do. Now if you run compile (or grep or other compile-modes) or display temp-buffers like *Help*-buffers then ECB autom. displays the compile-window at the bottom and display the output there.

If you have finished with using the compile- or temp-output (e.g. fixing errors) then you can throw away the compile-window just by ecb-toggle-compile-window - ECB will reactivate it autom. before next compilation or help-buffer-display.!

Parsing and displaying non-semantic sources
===========================================

ECB is mostly designed to display parsing information for files supported by semantic. But from version 1.94 on it also supports other parsing engines like imenu and etags, so also files not supported by semantic but by imenu/etags can be displayed in the Method-buffer of ECB. See Definition of semantic- and non-semantic-sources for a description of ``semantic-sources'' and ``non-semantic-sources''.

If support of non-semantic-sources is enabled then ECB will display the contents of all sources which can be displayed by speedbar too. This comes from the fact that ECB uses speedbar-logic to parse sources with imenu or etags.

In most cases imenu-parsing is preferable over etags-parsing because imenu operates on Emacs-buffers and needs no external tool and therefore parsing works also if current contents of a buffer are not saved to disk.

This section describes all important aspects about parsing and displaying file-contents of file-types not supported by semantic but by imenu and/or etags.

Enabling parsing and displaying of non-semantic-sources
-------------------------------------------------------

Enabling is simply done with the option ecb-process-non-semantic-files.

ECB offers an option ecb-non-semantic-parsing-function to specify on a major-mode basis which parsing-method should be used: imenu or etags. Normally there should be no need to change this option but read the documentation of this option (see ecb-non-semantic) for further details.

IMPORTANT:

  * If imenu-parsing should be used then the option speedbar-use-imenu-flag must be set to not nil!

  * If some non-semantic-sources are not parsed (i.e. there is an empty Methods-buffer) and you think that they should then maybe they are neither supported by imenu nor by etags or you have to check the options ecb-non-semantic-parsing-function and speedbar-dynamic-tags-function-list and - especially for etags - speedbar-fetch-etags-parse-list, speedbar-fetch-etags-arguments and speedbar-fetch-etags-command.

  * Even with support for semantic-, imenu- and etags-parsing there will remain some file-types rsp. major-modes which are not parse-able, neither by semantic, imenu nor etags. This is no problem because these files simply have an empty Methods-buffer. But nevertheless you will get a message ``Sorry, no support for a file of that extension'' which comes from the speedbar-library and can not switched off. Therefore if a major-mode is known as not parse-able by semantic, imenu or etags it can be added to the option ecb-non-semantic-exclude-modes and then it will be excluded from being tried to parsed and this (annoying) message will not occur.

Automatic rescanning/reparsing of non-semantic-sources
------------------------------------------------------

In contrast to semantic (see global-semantic-auto-parse-mode) there is no built-in mechanism for autom. reparsing non-semantic-sources and then updating the contents of the Methods-buffer.

For non-semantic-sources you have always at least to call ecb-rebuild-methods-buffer (bound to C-c . r) or saving the source-file (if ecb-auto-update-methods-after-save is true) to update the Method-buffer (Maybe future versions of ECB (> 1.94) will offer an autom. mechanism for this.).

Depending on the parsing-mechanism the following options have to be switched on so ECB can rebuild the methods-buffer for non-semantic-sources:

  * imenu:

     The imenu-option imenu-auto-rescan must be enabled and imenu-auto-rescan-maxout has to be set big enough to auto-parse big files too! But this results not directly in an autom. updated Method-buffer. This is first done after calling the command ecb-rebuild-methods-buffer or saving the source-file (if ecb-auto-update-methods-after-save is true).

  * etags:

     Only if ecb-auto-save-before-etags-methods-rebuild is switched on the command ecb-rebuild-methods-buffer rebuilds the method-buffer with current source-contents. See description of this option for an explanation.

Tip: If you want to program your own real. automatic rescan/reparse/rebuild mechanism for non-semantic-sources you can do:

Adding to after-change-functions a function F which either runs itself ecb-rebuild-methods-buffer-for-non-semantic or which adds only another function FF to an idle-timer and the function FF runs ecb-rebuild-methods-buffer-for-non-semantic. The latter approach has the advantage that the reparse/rebuild is not performed immediately after every change but first after Emacs is idle for a senseful interval (e.g. 4 seconds) after last change. Of course the function FF has to cancel its own idle-timer at the end, so the next idle-timer is first started again after the next change (i.e. by function F which is still contained in after-change-functions.

Customizing the display of the tokens
-------------------------------------

For non-semantic-sources ECB uses does no special organizing of tokens in groups and sub-tokens but it completely uses the token-hierarchy the imenu- and etags-parsers of speedbar return. So the displayed token hierarchy can only be customized with some options speedbar offers for this:

speedbar-tag-hierarchy-method, speedbar-tag-group-name-minimum-length, speedbar-tag-split-minimum-length and speedbar-tag-regroup-maximum-length. See the speedbar documentation for details about these options.

With the option ecb-method-non-semantic-face you can define the face used for displaying the tokens in the Method-buffer for non-semantic-sources.

ecb-non-semantic-methods-initial-expand can be useful too.

Using hide-show from the methods-buffer-menu
============================================

The popup-menu of the Methods-buffer offer two entries for either hiding or showing the block which is related to the selected token (that token for which the popup-menu was opened):

  * ``Jump to token and hide block'': Jumps to the token and calls hs-hide-block from the hideshow-library which is shipped with (X)Emacs. After that the block is hidden, i.e. only the header-line of that token (method, variable etc.) is visible, the rest is hidden behind the ``...''.

  * ``Jump to token and show block'': Jumps to the token and calls hs-show-block. This shows the related hidden block if the block was hidden via hs-hide-block or the menu-entry ``Jump to token and hide block'' (s.a.).

For this feature the library hideshow.el is used which should normally being included in the (X)Emacs-distribution. If this library is not loaded into Emacs, ECB does this automatically before the first call to one of these menu-entries.

IMPORTANT: If in some major-mode hiding and showing does not work as you expect it to work then you must probably add an entry for this major-mode to the hideshow-variable hs-special-modes-alist. See the documentation of this variable for further details. One example of such a major-mode is jde-mode of the Java Development Environment JDEE; just add an entry for it like the already contained entries for c++-mode or java-mode and hiding and showing will work for you with JDEE too.

Support of several Emacs-window-managers
========================================

There are several window-managers available which offer an easy interface to jump between different window-configurations within the same frame. A window configuration is the layout of windows and associated buffers within a frame. There is always at least one configuration, the current configuration. You can create new configurations and cycle through the layouts in either direction. Window configurations are often named or numbered, and you can jump to and delete named rsp. numbered configurations.

Without special support by ECB these window-managers would not work in combination with ECB!

ECB currently supports the following managers:

  * winring.el: Written by Barry A. Warsaw bwarsaw@python.org, available at http://www.python.org/emacs/

  * escreen.el: Written by Noah Friedman friedman@splode.com, available at http://www.splode.com/~friedman/software/emacs-lisp/

IMPORTANT: With one of these window-managers installed and active you can run applications like Gnus, VM or BBDB in the same frame as ECB! Just use different window-configurations (winring.el) or escreens (escreen.el) for ECB and the other applications. Especially with winring.el you can give every configuration a descriptive name like ``ECB'' or ``Gnus''; afterwards you can jump to a window-configuration by name!

The rest of this section describes how to enable the special ECB-support for these window-managers and how to use them.

Enabling of the support
-----------------------

Every support must be enabled explicitly:

  * winring: Call ecb-winman-winring-enable-support. This MUST be done BEFORE the first call to any winring-command, so also before calling winring-initialize!

  * escreen: Call ecb-winman-escreen-enable-support. This MUST be done BEFORE the first call to any escreen-command, so also before calling escreen-install!

If a window-manager-support should be enabled autom. after Emacs-start just put the following into your .emacs:

     (ecb-winman-winring-enable-support)
     (winring-initialize)

     ;; or - if you like escreen more

     (ecb-winman-escreen-enable-support)
     (escreen-install)

Usage of a window-manager in combination with ECB
-------------------------------------------------

After enabling the support of one of the supported window-managers just go on as described in the commentary or introduction of the respective library-file(s) of the window-manager. Here is a short description:

  * winring: First you have to define how to identify the ECB-window-configuration, i.e. the configuration with activated ECB. This done with the option ecb-winman-winring-name. There is always only one window-configurations with name ecb-winman-winring-name!

     Then run winring-initialize. If ECB is active then the resulting window-configuration is the ECB-window-configuration. Otherwise you can create the ECB-window-configuration when you first time call winring-new-configuration with name equal to ecb-winman-winring-name. In general you can run all commands of the winring-library. If you jump to the ECB-window-configuration then ECB will be autom. activated and if you leave the ECB-window-configuration then ECB will autom. deactivated.

  * escreen: First you have to define how to identify the ECB-escreen i.e. that escreen with activated ECB. This done with the option ecb-winman-escreen-number. There is always only one escreen with number ecb-winman-escreen-number!

     Then run escreen-install (deactivates ECB if currently running). After that you can call escreen-create-screen and escreen-goto-screen (And of course all other escreen-goto-* commands!). These commands autom. activate ECB if creating or selecting the escreen with number ecb-escreen-number (default = 1) and autom. deactivate ECB if leaving the ECB-escreen.

Disabling the support
---------------------

There is normally no need to do this but nevertheless it can be done by ecb-winman-escreen-disable-support rsp. ecb-winman-winring-disable-support.

Entry points for Elisp programmers
**********************************

This chapter describes how ECB can be used/programmed/driven by an Elisp-program. This contains:

Variables for Elisp-programs
============================

Variables an Elisp-program can use beyond those ones mentioned in The layout-engine:

  * ecb-source-path-functions

Look at the documentation of these variables to get a description.

Available hooks of ECB
======================

The following hooks are available:

  * ecb-activate-before-new-frame-created-hook

  * ecb-activate-before-layout-draw-hook

  * ecb-activate-hook

  * ecb-before-activate-hook

  * ecb-before-deactivate-hook

  * ecb-common-tree-buffer-after-create-hook

  * ecb-current-buffer-sync-hook

  * ecb-deactivate-hook

  * ecb-directories-buffer-after-create-hook

  * ecb-hide-ecb-windows-after-hook

  * ecb-hide-ecb-windows-before-hook

  * ecb-history-buffer-after-create-hook

  * ecb-methods-buffer-after-create-hook

  * ecb-redraw-layout-after-hook

  * ecb-redraw-layout-before-hook

  * ecb-show-ecb-windows-after-hook

  * ecb-show-ecb-windows-before-hook

  * ecb-sources-buffer-after-create-hook

Look at the documentation of these hooks to get a detailed description.

The library tree-buffer.el
==========================

The library tree-buffer.el is ECB independent and can be used for other applications too. But such an application is not allowed to use any of the variables of tree-buffer.el especially not the variable tree-buffers!

tree-buffers: Only for internal use. It contains all tree-buffers of current Emacs-instance, means all tree-buffers of all applications which uses currently tree-buffers. Every application must store its own collection of tree-buffers in an own variable! For example: ECB stores its tree-buffer set in ecb-tree-buffers!

An application may only use the methods tree-buffer.el provides but no internal variables!

How to deal with the adviced window-functions
=============================================

ECB offers for packages which work during activated ECB three macros for easy temporally (I.e. regardless of the settings in ecb-advice-window-functions!) using all original-functions, all adviced functions or only some adviced functions:

  - ecb-with-original-functions

  - ecb-with-adviced-functions

  - ecb-with-some-adviced-functions

For a detailed explanation of each macro read the documentation with describe-function!

How to program new layouts and new special windows
==================================================

There are two aspects concerning this topic:

 1. Programming a new layout which contains several special ECB-windows like directories, sources, methods, history or other special windows and arranging them in a new outline.

 2. Creating complete new special windows (e.g. a local-variable window for a graphical debugger like JDEbug of JDEE), adding them to a layout and synchronizing them with the edit-window.

The former one covers merely the layout-programming aspect which is explained in the first subsection of this chapter whereas the latter one covers all aspects of creating new special windows and what is necessary to synchronize it with the edit-window of ECB. This is explained in the second subsection which will refers to the first subsection.

How to program a new layout
---------------------------

If you just want creating a new layout with the standard ECB-windows like directories, sources, methods, history and speedbar it's is strongly recommended to define the new layout interactively with the command ecb-create-new-layout (see Creating a new ECB-layout).

If you want creating a new layout and if this layout should contain other special windows than the standard ECB-windows then it's still recommended to define this layout interactively with ecb-create-new-layout and using the option to give the created windows user-defined types. For every user defined type you have then just to program the necessary buffer-set function. For all the details see Creating a new ECB-layout.

But if you do not like the interactive way (because you are tough and brave) but you want programming the new layout with Elisp then use the macro ecb-layout-define (the following definition has stripped the prefix ``ecb-'' for better indexing this manual):

 -- Macro: layout-define name type &rest create-code
     Creates a new ECB-layout with name NAME. TYPE is the type of the new layout and is literal, i.e. not evaluated. It can be left, right, top or left-right. DOC is the docstring for the new layout-function ``ecb-layout-function-<name>''. CREATE-CODE is all the lisp code which is necessary to define the ECB-windows/buffers. This macro adds the layout with NAME and TYPEto the internal variable ecb-available-layouts.

     Preconditions for CREATE-CODE:

      1. Current frame is splitted at least in one edit-window and the ``column'' (for layout types left, right and left-right) rsp. ``row'' (for a top layout) for the special ECB-windows/buffers. The width of the ``column'' rsp. the height of the ``row'' is always defined with the option ecb-windows-width rsp. ecb-windows-height. Depending on the value of the option ecb-compile-window-height there is also a compile window at the bottom of the frame which is stored in ecb-compile-window.

      2. All windows are not dedicated.

      3. Neither the edit-window nor the compile-window (if there is one) are selected for types left, right and top. For type left-right the left column-window is selected

      4. All ECB-advices for the functions in ecb-advice-window-functions are disabled!

     Things CREATE-CODE has to do:

      1. Splitting the ECB-tree-windows-column(s)/row (s.a.) in all the ECB-windows the layout should contain (directories, sources, methods and history). The split must not be done with other functions than ecb-split-hor and ecb-split-ver! It is recommended not to to use a ``hard'' number of split-lines or -rows but using fractions between -0.9 and +0.9! Tip: It is recommended to spilt from right to left and from bottom to top or with other words: First create the right-most and bottom-most special windows!

      2. Making each special ECB-window a dedicated window. This can be done with one of the following functions:

            - ecb-set-directories-buffer

            - ecb-set-sources-buffer

            - ecb-set-methods-buffer

            - ecb-set-history-buffer

            - ecb-set-speedbar-buffer

          Each layout can only contain one of each tree-buffer-type!

          In addition to these functions there is a general macro ecb-with-dedicated-window. This macro performs any arbitrary code in current window and makes the window autom. dedicated at the end. This can be used by third party packages like JDEE to create arbitrary ECB-windows besides the standard tree-windows.

          To make a special ECB-window a dedicated window either one of the five functions above must be used or a function(!) which calls in turn the macro ecb-with-dedicated-window. See the documentation of this macro how to use it!

          Such a function is called a ``dedicated setter'' and must(!) use ecb-with-dedicated-window to make the window dedicated!

      3. Every(!) special ECB-window must be dedicated as described in 2.

      4. CREATE-CODE must work correctly regardless if there is already a compile-window (stored in ecb-compile-window) or not (ecb-compile-window is nil).

     Things CREATE-CODE can do or can use:

      1. The value of ecb-compile-window which contains the compile-window (if there is one). Using the values of ecb-compile-window-height, ecb-windows-width, ecb-windows-height.

     Things CREATE-CODE must NOT do:

      1. Splitting the edit-window

      2. Creating a compile-window

      3. Deleting the edit-window, the compile-window (if there is any) or the ECB-windows-column(s)/row (see Precondition 1.)

      4. Referring to the value of ecb-edit-window because this is always nil during CREATE-CODE.

     Postconditions for CREATE-CODE:

      1. The edit-window must be the selected window and must not be dedicated and not be splitted.

      2. Every window besides the edit-window \(and the compile-window) must be a dedicated window \(e.g. a ECB-tree-window).

Use this macro to program new layouts within your .emacs or any other file which is loaded into your Emacs. After loading the file(s) with all the new layout-definitions you can use it by customizing the option ecb-layout-name to the appropriate name or with the command ecb-change-layout.

With the function ecb-layout-undefine you can remove a layout from the list of available layouts:

 -- Function: layout-undefine name
     Unbind ecb-layout-function-<NAME>, ecb-delete-window-ecb-windows-<NAME>, ecb-delete-other-windows-ecb-windows-<NAME> and remove NAME from ecb-available-layouts.

Here is an example for a new layout programmed with ecb-layout-define:

     (ecb-layout-define "my-own-layout" left nil
       ;; The frame is already splitted side-by-side and point stays in the
       ;; left window (= the ECB-tree-window-column)

       ;; Here is the creation code for the new layout

       ;; 1. Defining the current window/buffer as ECB-methods buffer
       (ecb-set-methods-buffer)
       ;; 2. Splitting the ECB-tree-windows-column in two windows
       (ecb-split-ver 0.75 t)
       ;; 3. Go to the second window
       (other-window 1)
       ;; 4. Defining the current window/buffer as ECB-history buffer
       (ecb-set-history-buffer)
       ;; 5. Make the ECB-edit-window current (see Postcondition above)
       (select-window (next-window)))

This layout definition defines a layout with name ``my-own-layout'' which looks like:

     -------------------------------------------------------
     |              |                                      |
     |              |                                      |
     |              |                                      |
     |  Methods     |                                      |
     |              |                                      |
     |              |                                      |
     |              |               Edit                   |
     |              |                                      |
     |              |                                      |
     |--------------|                                      |
     |              |                                      |
     |  History     |                                      |
     |              |                                      |
     -------------------------------------------------------
     |                                                     |
     |                    Compilation                      |
     |                                                     |
     -------------------------------------------------------

All aspects of programming special windows
------------------------------------------

ECB offers a flexible programmable layout-engine for other packages to display their own contents and informations in special ECB-windows. An example could be a graphical debugger which offers a special window for displaying local variables and another special window for messages from the debugger-process (like JDEbug of JDEE (JDEE is
available at) http://jdee.sunsite.dk/ ).

This section explains all aspects of programming new special windows, adding them to a new layout and synchronizing them with edit-window of ECB. This can be done best with an easy example which nevertheless covers all necessary aspects to be a good example and skeleton for complex tools (like a graphical debugger) which want to use the layout-engine of ECB do display their own information.

Here comes the example:

The outline of the example layout:
..................................

     -------------------------------------------------------
     |Bufferinfo for <filename>:            |[prior]       |
     |Type: file                            |[next]        |
     |Size: 23456                           |              |
     |Modes: rw-rw-rw-                      |              |
     |-----------------------------------------------------|
     |                                                     |
     |                                                     |
     |                                                     |
     |                                                     |
     |                 edit-window                         |
     |                                                     |
     |                                                     |
     |                                                     |
     |                                                     |
     -------------------------------------------------------
     |                                                     |
     |                 compilation-window                  |
     |                                                     |
     -------------------------------------------------------

The description of the layout-contents
......................................

The top-left window always displays informations about the current buffer in the selected edit-window. This window demonstrates how autom. synchronizing a special window/buffer of a layout with current edit-window.

The top-right window contains an read-only ``action-buffer'' and offers two buttons which can be used with the middle mouse-button to scroll the edit-window. This is not very senseful but it demonstrates how to control the edit-window with actions performed in a special window/buffer of a layout.

(If you have not set a compilation-window in ecb-compile-window-height then the layout contains no durable compilation window and the other windows get a little more place).

The example code
................

Now let have us a look at the several parts of the Elisp-program needed to program this new example layout. ECB contains a library ecb-examples.el which contains the full working code of this example. To test this example and to play with it you can load this library into Emacs (with load-library for example) and then calling ecb-change-layout (bound to C-c . lc) and inserting ``example-layout1'' as layout-name. An alternative is calling ecb-examples-activate and ecb-examples-deactivate. For details see file ecb-examples.el.

The following steps only contain code-skeletons to demonstrate the principle. The full working code is available in ecb-examples.el.

The bufferinfo buffer of the example
....................................

The name of the bufferinfo buffer:

     (defconst ecb-examples-bufferinfo-buffer-name " *ECB buffer info*")

Two helper functions for displaying infos in a special buffer:

     (defun ecb-examples-print-file-attributes (buffer filename)
       (ecb-with-readonly-buffer buffer
         (erase-buffer)
         (insert (format "Bufferinfo for %s:\n\n" filename))
         ;; insert with the function `file-attributes' some
         ;; informations about FILENAME.
         ))

     (defun ecb-examples-print-non-filebuffer (buffer buffer-name)
       (ecb-with-readonly-buffer buffer
         (erase-buffer)
         ;; analogous to `ecb-examples-print-file-attributes'
         ))

The main synchronizing function added to ecb-current-buffer-sync-hook for autom. evaluation by ecb-current-buffer-sync which runs dependent on the values of ecb-window-sync and ecb-window-sync-delay. This function synchronizes the bufferinfo buffer with the current buffer of the edit-window if that buffer has changed.

     (defun ecb-examples-bufferinfo-sync ()
       (ecb-do-if-buffer-visible-in-ecb-frame
           'ecb-examples-bufferinfo-buffer-name

         ;; here we can be sure that the buffer with name
         ;; `ecb-examples-bufferinfo-buffer-name' is displayed in a
         ;; window of `ecb-frame'

         ;; The macro `ecb-do-if-buffer-visible-in-ecb-frame' locally
         ;; binds the variables visible-buffer and visible-window!! See
         ;; documentation of this macro!

         (let ((filename (buffer-file-name (current-buffer))))

           (if (and filename (file-readable-p filename))

               ;; real filebuffers
               ;; here we could add a smarter mechanism;
               ;; see ecb-examples.el
               (ecb-examples-print-file-attributes visible-buffer
                                                   filename)

             ;; non file buffers like help-buffers etc...
             (setq ecb-examples-bufferinfo-last-file nil)
             (ecb-examples-print-non-filebuffer visible-buffer
                                                (buffer-name
                                                  (current-buffer)))
             ))))

The function which makes the bufferinfo-buffer dedicated to a window.

     (defun ecb-examples-set-bufferinfo-buffer ()
       (ecb-with-dedicated-window
           ecb-examples-bufferinfo-buffer-name
           'ecb-examples-set-bufferinfo-buffer
         (switch-to-buffer (get-buffer-create
                            ecb-examples-bufferinfo-buffer-name))
         (setq buffer-read-only t)))

This is all what we need for the special bufferinfo buffer. We have demonstrated already three of the important functions/macros of the layout-engine API of ECB: ecb-with-readonly-buffer, ecb-do-if-buffer-visible-in-ecb-frame and ecb-with-dedicated-window (see The layout-engine API. Especially the second macro is strongly recommended for programming good synchronizing functions which do not waste CPU!

The action buffer of the example
................................

The name of the action-buffer:

     (defconst ecb-examples-action-buffer-name " *ECB action buffer*")

Two helper functions for creating a readonly action-buffer with a special local key-map for the middle-mouse-button and two buttons [prior] and [next]:

     (defun ecb-examples-insert-text-in-action-buffer (text)
       (let ((p (point)))
         (insert text)
         (put-text-property p (+ p (length text)) 'mouse-face
                                                  'highlight)))

     (defun ecb-examples-action-buffer-create ()
       (save-excursion
         (if (get-buffer ecb-examples-action-buffer-name)
             (get-buffer ecb-examples-action-buffer-name)

           (set-buffer (get-buffer-create
                         ecb-examples-action-buffer-name))

           ;; we setup a local key-map and bind middle-mouse-button
           ;; see ecb-examples.el for the full code

           ;; insert the action buttons [prior] and [next] and
           ;; make it read-only

           (ecb-with-readonly-buffer (current-buffer)
             (erase-buffer)
             (ecb-examples-insert-text-in-action-buffer "[prior]")
             ;; analogous for the [next] button
             )

           (current-buffer))))

The function which performs the actions in the action-buffer if clicked with the middle-mouse button onto a button [next] or [prior].

     (defun ecb-examples-action-buffer-clicked (e)
       (interactive "e")
       (mouse-set-point e)
       (let ((line (buffer-substring (ecb-line-beginning-pos)
                                     (ecb-line-end-pos))))
         (cond ((string-match "prior" line)
                (ecb-select-edit-window)
                (call-interactively 'scroll-down))
               ((string-match "next" line)
                ;; analogous for [next]
                ))))

The function which makes the action-buffer dedicated to a window.

     (defun ecb-examples-set-action-buffer ()
       (let ((buf-name (buffer-name (ecb-examples-action-buffer-create))))
         (ecb-with-dedicated-window buf-name 'ecb-examples-set-action-buffer
           (switch-to-buffer (buffer-name
                              (ecb-examples-action-buffer-create))))))

We do not need more code for the action buffer. All of the code is standard emacs-lisp which would also needed if used without ECB.

Adding the bufferinfo- and action-buffer to a new layout
........................................................

Now we add the bufferinfo- and the action-buffer to a new layout of type top with name ``example-layout1'':

     (ecb-layout-define "example-layout1" top

       ;; dedicating the bufferinfo window to the bufferinfo-buffer
       (ecb-examples-set-bufferinfo-buffer)

       ;; creating the action-window
       (ecb-split-hor 0.75)

       ;; dedicate the action window to the action-buffer
       (ecb-examples-set-action-buffer)

       ;; select the edit-window
       (select-window (next-window)))

This all what we need to define the new layout. See Programming a new layout for more details of the pure layout-programming task.

Synchronizing the bufferinfo-buffer automatically
.................................................

The last thing we have to do is to synchronize the bufferinfo-buffer with current edit-window. We do this by adding ecb-examples-bufferinfo-sync to the hook ecb-current-buffer-sync-hook' (The file ecb-examples.el shows a smarter mechanism for (de)activating the new layout and the synchronization but this works also very well).

     (add-hook 'ecb-current-buffer-sync-hook 'ecb-examples-bufferinfo-sync)

Activating and deactivating new layouts
.......................................

Because a set of new special windows integrated in a new layout is often just the GUI of a complete tool (like a graphical debugger) we demonstrate here the complete activation and deactivation of such a tool or at least of the tool-GUI. We decide that the GUI of our example ``tool'' needs a compile-window with height 5 lines and the height of the special windows ``row'' on top should be exactly 6 lines (normally width and height of the special windows should be a fraction of the frame, but here we use 6 lines (You can change the code in the file ecb-examples.el to use a frame-fraction of 0.2 instead of 6 hard lines, just try it!)

Here comes the (de)activation code.

The code for saving and restoring the state before activation (the full code is available in ecb-examples.el:

     (defun ecb-examples-preactivation-state(action)
       (cond ((equal action 'save)
              ;; code for saving the state
              )
             ((equal action 'restore)
             ;; code for restoring the state
             )))

The following function activates the GUI of our example tool:

     (defun ecb-examples-activate ()
       (interactive)

       ;; activating the synchronization of the bufferinfo-window
       (add-hook 'ecb-current-buffer-sync-hook
                 'ecb-examples-bufferinfo-sync)

       ;; saving the state
       (ecb-examples-preactivation-state 'save)

       ;; switch to our preferred layout
       (setq ecb-windows-height 6)
       (setq ecb-compile-window-height 5)
       (ecb-layout-switch "example-layout1"))

This function deactivates the GUI of our example-tool and restores the state as before activation:

     (defun ecb-examples-deactivate ()
       (interactive)

       (remove-hook 'ecb-current-buffer-sync-hook
                    'ecb-examples-bufferinfo-sync)
       (ecb-examples-preactivation-state 'restore)
       (ecb-layout-switch ecb-layout-name))

Now we have all code for the new layout and the new layout-buffers. The example is ready for use; just load ecb-examples.el (s.a.).

The wide range of possible layout-outlines
------------------------------------------

In the two previous sections Programming a new layout and Programming special windows we have explained in detail how to program new layouts and how to program new special windows/buffers and adding them to a new layout.

The intention of this section is to be a summary what are the real restrictions for a new layout-outline programmed with ecb-layout-define. This is necessary because until now we just programmed ``obvious'' layouts, means layout which are in principle very similar to the standard ones which means one big edit-window and some special windows ``around'' this edit-window. This section will show you that a layout can have also very different outlines.

OK, here are the real restrictions and conditions for a layout programmed with ecb-layout-define:

 1. It must have exactly one edit-window regardless of its size.

 2. All other windows created within the CREATE-CODE body of ecb-layout-define (see Programming a new layout) must be dedicated to their buffers.

 3. All the dedicated windows must (exclusive!) either reside on the left, right, top or left-and-right side of the edit-window. This will be defined with the TYPE-argument of ecb-layout-define (see Programming a new layout).

You see, there are only three restrictions/conditions. These and only these must be fulfilled at layout-programming.

Demonstrating what this really means and how flexible the layout-engine of ECB really is, can be done best with some ``pathological'' layout-outlines. All the following are correct layouts (working code is added below each layout):

The following is a top layout with three vertical layered special windows.

     ------------------------------------------------------------------
     |                                                                |
     |                 Upper special window                           |
     |                                                                |
     |----------------------------------------------------------------|
     |                                                                |
     |                 Middle special window                          |
     |                                                                |
     |----------------------------------------------------------------|
     |                                                                |
     |                 Lower special window                           |
     |                                                                |
     |================================================================|
     |                                                                |
     |                         Edit-window(s)                         |
     |                 (can be splitted in two windows)               |
     ------------------------------------------------------------------
     |                                                                |
     |                 Compilation-window (optional)                  |
     |                                                                |
     ------------------------------------------------------------------

Here is the code for that top layout (all buffers are dummy-buffers):

     ;; The "dedicated setter" functions:

     (defun ecb-set-usw-buffer ()
       (ecb-with-dedicated-window
         "Upper special window"
         'ecb-set-usw-buffer
           (switch-to-buffer (get-buffer-create "Upper special window"))))

     (defun ecb-set-msw-buffer ()
       (ecb-with-dedicated-window
         "Middle special window"
         'ecb-set-msw-buffer
           (switch-to-buffer (get-buffer-create "Middle special window"))))

     (defun ecb-set-lsw-buffer ()
       (ecb-with-dedicated-window
         "Lower special window"
         'ecb-set-lsw-buffer
           (switch-to-buffer (get-buffer-create "Lower special window"))))

     ;; The layout itself:

     (ecb-layout-define "example-layout3" top
       nil

       ;; here we have an edit-window and above one top window which we can
       ;; now split in several other windows. Dependent on the value of
       ;; `ecb-compile-window-height' we have also a compile-window at the
       ;; bottom.

       (ecb-set-usw-buffer)
       (ecb-split-ver 0.33)
       (ecb-set-msw-buffer)
       (ecb-split-ver 0.5)
       (ecb-set-lsw-buffer)

       ;; select the edit-window.
       (select-window (next-window)))

The following is a left-right layout which has six special windows in the left-''column'' and one big special window in the right-''column''. For left-right layouts the left-''column'' and the right-''column'' have always the same width.

     ------------------------------------------------------------------
     |             |       |                   |                      |
     | Left1       | Left5 |                   |                      |
     |             |       |                   |                      |
     |-------------|       |                   |                      |
     |      |      |       |                   |                      |
     |      |      |       |                   |                      |
     |      |      |       |                   |                      |
     | Left2| Left3|-------|  Edit-window(s)   |   Right1             |
     |      |      |       | (can be splitted  |                      |
     |      |      |       |  in two windows)  |                      |
     |      |      |       |                   |                      |
     |-------------|       |                   |                      |
     |             |       |                   |                      |
     | Left4       | Left6 |                   |                      |
     |             |       |                   |                      |
     ------------------------------------------------------------------
     |                                                                |
     |                 Compilation-window (optional)                  |
     |                                                                |
     ------------------------------------------------------------------

Here is the code for that left-right layout, again with dummy-buffers (depending to your screen-resolution you will need a quite big value for ecb-windows-width, e.g. 0.4):

Here is one of the ``dedicated setter'' functions (The ``dedicated setter functions'' for all these ecb-windows/buffers are not explicitly described - they look all like ecb-set-left1-buffer - of course with different buffer-names!):

     (defun ecb-set-left1-buffer ()
       (ecb-with-dedicated-window
         "Left1"
         'ecb-set-left1-buffer
           (switch-to-buffer (get-buffer-create "Left1"))))

Here is the layout-definition itself:

     (ecb-layout-define "example-layout2" left-right
       nil

       ;; here we have an edit-window and left and right two windows each
       ;; with width `ecb-windows-width'. Dependent to the value of
       ;; `ecb-compile-window-height' we have also a compile-window at the
       ;; bottom.

       (ecb-set-left1-buffer)
       (ecb-split-hor 0.66 t)
       (ecb-split-ver 0.75)
       (ecb-set-left4-buffer)
       (select-window (previous-window (selected-window) 0))
       (ecb-split-ver 0.25 nil t)
       (ecb-set-left2-buffer)
       (ecb-split-hor 0.5)
       (ecb-set-left3-buffer)
       (select-window (next-window (next-window)))
       (ecb-set-left5-buffer)
       (ecb-split-ver 0.5)
       (ecb-set-left6-buffer)
       (select-window (next-window (next-window)))
       (ecb-set-right1-buffer))

       ;; select the edit-window
       (select-window (previous-window (selected-window) 0)))

Especially the last example should demonstrate that even very complicated layouts are easy to program with ecb-layout-define. If such layouts are senseful is another topic ;-)

The complete layout-engine API of ECB
-------------------------------------

This section lists all functions, macros, variables and user-options the layout-engine API of ECB offers foreign packages. Call describe-function rsp. describe-variable to get a detailed description.

Functions for programming with layouts and special ecb-windows:

  - ecb-available-layouts-member-p

  - ecb-canonical-ecb-windows-list

  - ecb-compile-window-live-p

  - ecb-do-if-buffer-visible-in-ecb-frame

  - ecb-edit-window-live-p

  - ecb-get-current-visible-ecb-buffers

  - ecb-layout-define

  - ecb-layout-switch

  - ecb-layout-undefine

  - ecb-point-in-compile-window

  - ecb-point-in-ecb-window

  - ecb-point-in-edit-window

  - ecb-select-edit-window

  - ecb-split-hor

  - ecb-split-ver

  - ecb-with-dedicated-window

Utility functions/macros:

  - ecb-enlarge-window

  - ecb-fix-filename

  - ecb-window-live-p

  - ecb-with-readonly-buffer

Some other maybe useful functions/macros:

  - ecb-with-adviced-functions

  - ecb-with-original-functions

  - ecb-with-some-adviced-functions

Some useful READONLY variables:

  - ecb-compile-window

  - ecb-edit-window

  - ecb-last-edit-window-with-point

  - ecb-last-source-buffer

User-options and hooks related to the layout-engine API:

  - ecb-current-buffer-sync-hook

  - ecb-hide-ecb-windows-after-hook

  - ecb-hide-ecb-windows-before-hook

  - ecb-redraw-layout-after-hook

  - ecb-redraw-layout-before-hook

  - ecb-show-ecb-windows-after-hook

  - ecb-show-ecb-windows-before-hook

  - ecb-windows-height

  - ecb-windows-width

  - ecb-compile-window-height

Known conflicts and bugs of ECB
*******************************

This chapter describes all already known conflicts with other packages and also the known (and currently unfixed) bugs of ECB. If possible then a practicable solution or workaround is described.

Known conflicts with other packages
===================================

Here is a list of known conflicts of ECB with other packages and helpful solutions/hints/workarounds:

Package avoid.el
----------------

With GNU Emacs 20.X ECB must deactivate mouse-avoidance-mode if the option ecb-show-node-info-in-minibuffer activates for at least one ECB tree-buffer 'if-too-long or 'always. This is done automatically but only as long ECB is activated.

Package BBDB
------------

With ECB-version < 1.96 it is not recommended to use BBDB and ECB simultaneously in one frame because each of them has its own window-management and probably there will be conflicts. Use different frames for ECB and BBDB!

But beginning with ECB 1.96 you can use one of the window-managers escreen.el or winring.el (see Window-managers and ECB). With such a window-manager ECB and BBDB should work very well together - even in the same frame!

Package calculator.el
---------------------

If the edit-window is already splitted then calling calculator uses the whole ``other'' edit-window for the calculator. With an unsplitted edit-window the calculator window has it´s normal size of about 2 lines. Therefore it´s recommended to set calculator-electric-mode during ECB activation to not nil so calculator uses always the echo-area instead of creating a new small window!

Package calendar.el
-------------------

With activated ECB calendar does not shrink it´s window to the small size but splits the window equally. But if you add this to your .emacs it works:

     (add-hook 'initial-calendar-window-hook
               (function (lambda ()
                           (when (and ecb-minor-mode
                                      (ecb-point-in-edit-window))
                             ;; if no horizontal split then nothing
                             ;; special to do
                             (or (= (frame-width) (window-width))
                                 (shrink-window (- (window-height) 9))))
                          )))

Package cygwin-mount.el
-----------------------

There can be a conflict between ECB and cygwin-mount.el if the following conditions are true:

  - You are working with cygwin-mount.el (sounds clear :-)

  - You have set cygwin-mount-build-mount-table-asynch to not nil

  - ECB is automatically started after starting Emacs (e.g. with ecb-auto-activate or calling ecb-activate in window-setup-hook)

  - Your Emacs-setup contains a call of cygwin-mount-activate.

Under these circumstances Emacs 21.X sometimes eats up the whole CPU (at least with Windows XP) and the cygwin-mount-table is never build.

But there is an easy work-around: Call cygwin-mount-activate first *AFTER* ECB is activated. This can be done with the hook ecb-activate-hook:

     (add-hook 'ecb-activate-hook
               (function (lambda ()
                           (require 'cygwin-mount)
                           (setq cygwin-mount-build-mount-table-asynch t)
                           (cygwin-mount-activate))))

Package escreen.el
------------------

Beginning with version 1.96 ECB supports the window-manager escreen.el. See Window-managers and ECB.

Package follow-mouse.el
-----------------------

The following is only relevant for Emacs 20.X!

ECB works very well with follow-mouse if follow-mouse is turned on BEFORE ECB is activated (e.g. within the ecb-activate-hook). But if you activate follow-mouse first after ECB is already activated, then the follow-mouse stuff prevents the complete node-name to be displayed in the echo-area if mouse moves over it. Because ECB has a much more intelligent mouse tracking mechanism than follow-mouse the follow-mouse stuff profit from ECB and works even better and saver as without activated ECB!

Package Gnus (Newsreader)
-------------------------

With ECB-version < 1.96 it is not recommended to use Gnus and ECB simultaneously in one frame because each of them has its own window-management and probably there will be conflicts. Use different frames for ECB and Gnus!

But beginning with ECB 1.96 you can use one of the window-managers escreen.el or winring.el (see Window-managers and ECB). With such a window-manager ECB and Gnus should work very well together - even in the same frame!

Package JDEE (Java Development Environment)
-------------------------------------------

JDEE has a lot of ``dialogs'' where the user can select among several choices. An example is importing classes via the command jde-import-find-and-import. These dialogs are strongly designed to work in an environment where a new temporary window is created, the contents of the dialog are displayed in the new window, the user select his choice and hits [OK]. After that the new window is deleted and the selection is performed (for example the chosen import statement are inserted in the source-buffer.

ECB can be work very well with this dialogs but only if no durable compilation-window is used, i.e. if the option ecb-compile-window-height is nil. See Temp- and compile-buffers.

If ecb-compile-window-height is not nil then these JDEE-dialogs will not work correct!

Package scroll-all.el (scroll-all-mode)
---------------------------------------

ECB advices scroll-all-mode so it is working correct during running ECB. This means if point stays in an edit-window and the edit-window is splitted then both edit-windows are scrolled by scroll-all-mode and no other window! If point stays in any other window just this selected window is scrolled. This is the only senseful behavior of scroll-all-mode with ECB.

Package tmm.el (Text mode menubar)
----------------------------------

In general this library does not work perfectly with ECB. But if the option ecb-other-window-jump-behavior is not set to all then it should work acceptable. Beginning with version 1.95.2 ECB ensures autom. that tmm-menubar works - regardless of the value of ecb-other-window-jump-behavior.

Package VC (Version Control)
----------------------------

The variable vc-delete-logbuf-window must be set to nil during active ECB. This can be done with the hooks mentioned in Elisp programming.

Package winner.el (winner-mode)
-------------------------------

winner-mode is autom. disabled as long as ECB is running. ECB has its own window-management which is completely incompatible with winner-mode! But winner-mode makes also not really sense with ECB.

Package winring.el
------------------

Beginning with version 1.96 ECB supports the window-manager winring.el. See Window-managers and ECB.

Known bugs
==========

This section describes all currently known bugs of ECB. The maintainers of ECB try to fix these bugs as soon as possible.

Following the source-file link in a help-buffer
-----------------------------------------------

The following bug occurs only in ECB-versions < 1.96 and is fixed since ECB 1.96!!

This bug only occurs if a compile-window is used and visible!

If you call functions like describe-function which displays a help-buffer in the compile-window, then you will often get an output like this in the compile-window:

     ecb-activate is an interactive compiled Lisp function in `ecb'.
     (ecb-activate)

     Activates the ECB...

The link to `ecb' is normally a click-able link, means if you click with the middle-mouse button onto it the file is opened (in our example ecb.el would be opened.

If you click onto it when the help-buffer is already the current buffer (i.e. the compile-window is already selected before the click!) then all is working fine (i.e. the file is opened in the edit-window), but if you click onto the link without selecting the compile-window before (i.e. the edit-window is the current selected window) then the file is opened in the compile-window which is probably not what you want. Not a big problem but annoying.

The only available workaround is, first selecting the compile-window and then clicking onto the link!

Extra history-entries for JDEE source-buffers
---------------------------------------------

ECB on occasions creates an extra edit buffer for entries in the history window. For example, let say there are three entries in the history window:

     Test1
     Test2
     Test3

In the edit window Test1 file is edited. When clicked on Test2 entry in history, on occasion instead of switching to the existing buffer for Test2, a new edit buffer is opened for Test2 file. At this point, there are four entries in the history as follows:

     Test2
     Test2<2>
     Test1
     Test3

Frequently asked questions
**************************

This is the Emacs Code Browser FAQ.

QUESTION

ANSWER

What is the first step i should do if i have problems with ECB?

Read carefully the related sections of the online-help of ECB.

What should i do, if a have a problem which can not be solved even
after reading the online-help?

Send a problem-report to the ECB-mailing-list with the command
ecb-submit-problem-report.
See Submitting problem report.

What should i do, if another package seems not to work correct with
ECB?

Take a look into Conflicts. If your package is not listed there
then submit a problem-report.

Can ECB parse and display source-contents not supported by semantic?

Yes, in all version >= 1.94. ECB can now parse and display all
source-contents supported by semantic, imenu or etags - same as
speedbar. See Non-semantic sources.

Why are the lines in the ECB-, temp- and compilation-buffers not
wrapped but truncated?

Check the variable truncate-partial-width-windows and set it to
nil.

Why doesn't ECB work correct with VC?

The variable vc-delete-logbuf-window must be set to nil during
active ECB. This can be done with the hooks of ECB.

Does ECB support C++ as well as Java?

This depends strongly on the used semantic-version, but all
semantic-versions >= semantic-1.4.3 support C++ really well.

Does ECB support Perl?

This depends completely on semantic. If there is a semantic-BNF for
Perl then semantic can parse Perl and then in turn ECB supports Perl.
Check semantic if Perl is supported or write your own Perl-BNF for
semantic.

Does ECB support language XYZ?

See question ``Does ECB support Perl?'' and replace ``Perl'' with
``XYZ'' in the answer.

How to add new languages to ECB?

Add the language XYZ to semantic (perform all necessary steps described in
the semantic-manual) and ECB will automatically support language XYZ!
There is nothing to do in ECB itself!

Why does ECB not recognize my source-files for C++?

Your C++-files have probably an extension which is not mapped to
c++-mode in auto-mode-alist and/or your own Emacs-setup has
``destroyed'' the correct value of the hook-variable
c++-mode-hook.
See Setting up Emacs.

Why doesn't ECB display the node name in the echo area if mouse moves
over it?

There can be several reasons: First the value of the option
ecb-show-node-name-in-minibuffer must be either always or
if-too-long. If this is OK, then maybe you have turned on
follow-mouse AFTER activating ECB; follow-mouse must be turned on
BEFORE ECB is activated, e.g. in the ecb-activate-hook! But with
Emacs 21.X and XEmacs there are no problems with this feature, just
activate it.

What is the reason for poor scrolling performance with GNU Emacs 20.X
in the edit-windows and what can i do?

Set scroll-conservatively to 0 and scroll-step to a
value > 1. For the exact reason look at
Optimize scrolling.

Is it possible to make the history of ECB persistent?

You can use the library ``desktop.el'' which works very well with ECB.
Then all files of your recent Emacs-session will be opened
automatically after next Emacs-start and will be added automatically
to the ECB-history after ECB-start.

Is there an ``Intellisense''-mechanism like with other IDEs?

For Java the JDEE ()
http://jdee.sunsite.dk/
 has this feature and for all other languages
semantic offer something similar, see
http://cedet.sourceforge.net/intellisense.shtml

Can i use ECB in combination with Gnus within one frame?

You can, but for ECB-versions < 1.96 it is not recommended because
each of them has it's own window-management and probably there will be
conflicts, so use different frames for ECB and Gnus! But beginning
with ECB 1.96 you can use either escreen.el or winring.el as
``window-manager'' which allows you in consequence to use ECB and
applications like Gnus in one frame!
See Window-managers and ECB.

Can i speed up displaying the contents of big-size directories?

Yes, see the option ecb-cache-directory-contents. Read the
section
Large directories.

Is it possible to create/use other layouts than the built-in ones?

Yes. Creating a new ECB-layout and
The layout-engine are the relevant sections. The former one
describes how to create interactively new layouts where the latter
one is for Elisp-programmers.

Can i use speedbar as directory-browser within ECB?

Yes, see Integrating speedbar.

Can i exclude subdirectories from the recursive grep in the directories buffer?

Yes, see Grepping directories.

How can i prevent contaminating each directory with a file semantic-cache?

Set semanticdb-default-save-directory to a directory.

Why ECB displays large portions of current source-file with dark background?

This comes from semantic;
see Setting up Emacs.

Why ECB underlines some parts of current source-file?

This comes from semantic;
see Setting up Emacs.

Can i add my own commands to the popup-menus of tree-buffers?

Yes, see Using the mouse.

Can ECB display the compile-window ``on demand''?

Yes, see Tips and tricks.

Which buffers are treated as compilation-buffers by ECB?

See the docstring of the function ecb-compilation-buffer-p.

How can i change the modeline of an ECB-tree-buffer?

You can change it with the options ecb-mode-line-prefixes,
ecb-mode-line-data and
ecb-mode-line-display-window-number.

How can i change the keybindings of ECB?

You can do this with option ecb-key-map (see ecb-general).

What can i do if hiding/showing from the methods-buffer does not work?

Either the current major-modes is not supported by hideshow or
you have to add an entry to hs-special-modes-alist
(see Hide-show).

Can i maximize one of the ECB-windows for better overlook?

Yes, see Maximizing the ECB windows.

Can i hide the ECB-windows for getting more editing-space?

Yes, see Hiding the ECB windows.

Can i define the actions ECB performs after visiting a token?

Yes, see Visiting tokens.

Buffers are not displayed correctly in the compile-window?

See Problems with the compile window.

Can ECB work together with window-managers like escreen.el?

Yes, see Window-managers and ECB.

Can ECB display the window-number in the modeline of the special windows?

Yes, see option ecb-mode-line-display-window-number.

Command Index
*************

This index contains all user commands of ECB.

Please note: The commands in this index are listed without the prefix ``ecb-'' (e.g. the command ecb-activate is listed with name ``activate'').

Option Index
************

This index contains all customizable options of ECB.

Please note: All options in this index are listed without the prefix ``ecb-'' (e.g. the option ecb-layout-name is listed with name ``layout-name'').