Window-managers and ECB - ECB - the Emacs Code Browser
Description: ECB - the Emacs Code Browser

Next: Virtual folders in History, Previous: Hide-show, Up: Common use-cases

### 10.15 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/winring
- escreen.el: Written by Noah Friedman friedman@splode.com, available at http://www.splode.com/~friedman/software/emacs-lisp/#ui

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!

When you go back to the ECB-window-configuration (winring.el) or the ECB-escreen (escreen.el) with any of the special window-manager-commands then the state of ECB will be restored exactly as you have left it when going to another window-configuration rsp. escreen. This includes the whole splitting state of the edit-area and the visibilty of the ecb-windows and of the compile-window!

The rest of this section describes how to enable the special ECB-support for these window-managers and how to use them.

#### 10.15.1 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)

#### 10.15.2 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`1. 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.

#### 10.15.3 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`.

#### Footnotes

[1] And of course all other `escreen-goto-*` commands!