Previous: ECB Methods-window, Up: Basic ECB-windows

4.1.6 The ECB History-window

ECB offers a ECB-windows for displaying a history of currently open or recently closed source-buffers, regardless of the directory the related file belongs to.

Contrary to the ECB-sources-window the ECB-History-window can be flat but needn't. Another difference to the ECB-sources window is that the History displays not filenames but buffer-names for buffers which are either directly related to a file or which are indirect-buffers with a base-buffer which is related to a file. For a description of the indirect-buffer concept see the Emacs manual (see command clone-indirect-buffer or make-indirect-buffer for XEmacs).

Please note: The History of ECB is not meant to be a full replacement for the Buffers-menu of (X)Emacs! It only displays buffers which are related to a file (either directly or via indirect-buffer). All non-file-related buffers (e.g. *Help*, *grep* etc.) will never be displayed in the ECB-History-window! Usage of the ECB-History-window Activating/Displaying the ECB-History-window

Either use one of the predefined layouts which contain the ECB-History-window (see Changing the ECB-layout) (e.g. via C-c . l c) or create a new ecb-layout via the command ecb-create-new-layout and add a buffer of type “history” into this new layout (see Creating a new ECB-layout). Dead buffers in the history

You can customize if ECB should remove the related buffername-node from the history-window after killing a buffer. This is done with the option ecb-kill-buffer-clears-history. See the documentation of this option for the possible choices. If you decide that ECB should not remove the related buffername-node then this is named a “dead” buffer in the history-window. It is displayed with a special face (see ecb-history-dead-buffer-face), default is a kind of grey.

You can use such a dead-buffer-node in the history as all other buffername-nodes: ECB will reopen the related file in a buffer and perform the action you have choosen (see above section “Usage of the ECB-History-window”). Indirect buffers in the history

You can work with indirect buffers as well with direct buffers. See the (X)Emacs manual for an introduction for indirect buffers (e.g. see the command clone-indirect-buffer for GNU Emacs).

Indirect buffers are displayed with the face ecb-history-indirect-buffer-face, default is an italic outline.

There is an option ecb-history-stick-indirect-buffers-to-basebuffer which allows to customize how ECB displays indirect buffers in the history-window:

If this option is nil then indirect-buffers are treated as non-indirect-buffers and sorted into the history-buffer-sequence according to the setting of ecb-history-sort-method. Then the history contains something like this:

   <base-buffer BB>
   <indirect-buffer 1 of BB>
   <indirect-buffer 2 of BB>
   <indirect-buffer 3 of BB>

If not nil then indirect-buffers are always sticked to their base-buffer, ie. the base-buffer is displayed as expandable node with all its indirect-buffers as children-nodes, so the history contains something like:

   [-] <base-buffer BB>
    |  <indirect-buffer 1 of BB>
    |  <indirect-buffer 2 of BB>
    `- <indirect-buffer 3 of BB>

Here the buffer with name “<base-buffer BB>” has three indirect-buffers which are display as childrens of their base-buffer. Bucketizing the history

ECB can display the history-contents “flat” or it can display buckets to bucketize the contens according to certain criterias. This is done with the option ecb-history-make-buckets. It allows bucketizing according to the directory, the file-extension, the major-mode or a list of regular expression - see the documentation of this option for details.

Here is an example for a history-window bucketized according to the major-mode of the related buffers:

   [-] [c++-mode]
    |  headerfile-1.h
    |  headerfile-2.h
   [-] [emacs-lisp-mode]
    |  elisp-buffer-1.el
    |  elisp-buffer-1.el
    `- elisp-buffer-1.el
   [-] [makefile-mode]
    `- Makefile
   [-] [java-mode]

Please note: If ecb-history-make-buckets is nil then this is interpreted as an empty list of regular-expressions and the history is display with exactly one bucket. Use the value 'never if you want the? contents of the history-window to be displayed “flat”!

You can change the bucketizing type on the fly via the popup-menu of the history-window. Customizing the ECB-History-window

See ecb-history for a list of all options currently available for customizing this ECB-windows to your needs.