Node:ecb-layout, Next:, Previous:ecb-history, Up:Customizable options



Group ecb-layout

This group contains the following options:

activate-before-new-frame-created-hook User Option
Normal hook run before the new ECB-frame is created if ecb-new-ecb-frame is not nil (otherwise this hook is not evaluated).

advice-window-functions User Option
Use the intelligent windows functions of ECB instead of the standard Emacs functions. 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
  • 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 conveniantly 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 adviceable 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.

compile-window-enlarge-by-select User Option
The compile-window is auto. enlarged after selecting it. If not nil then selecting the ecb-compile-window auto. enlarges it and deselecting (means selecting another window after point was in ecb-compile-window) auto. shrinks it. Enlarging and shrinking the ecb-compile-window is done with ecb-toggle-enlarged-compilation-window. See also the documentation of this function!

compile-window-height User Option
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 heigth 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 splits temporally the edit window vertically if the edit window is not splitted already or uses the "other" edit window temporally for comilation output if the edit window is already splitted. This is the recommended value for this option!

Beware: If you set a durable compilation window then ECB can not guarantee always behaving like a standard Emacs concerning displaying temp-buffers and compilation-buffers. It should work in most cases but maybe not in all. Just try it out.

See also the option ecb-compile-window-temporally-enlarge and also the function ecb-toggle-enlarged-compilation-window!

See Temp- and compile-buffers.

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

compile-window-temporally-enlarge User Option
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-compilation: After finishing the compilation-output and during jumping to the errors ECB let temporally enlarge all compilation-buffers in ecb-compile-window (e.g. compile- and grep-buffers) to compilation-window-height. But be aware this setting is currently not meaningful for temporary buffers like help-buffers because these buffers currently enlarge always to temp-buffer-max-height.
  • after-selection: Selecting the ecb-compile-window auto. enlarges it and deselecting (means leaving ecb-compile-window) auto. shrinks it. Enlarging and shrinking the ecb-compile-window is done with ecb-toggle-enlarged-compilation-window. See also the documentation of this function! This is possible for all buffers in ecb-compile-window not only for compilation-buffers!
  • both: The combination of 'after-compilation and 'after-selection.
  • nil: ECB tries to fix always the height of the ecb-compile-window at the value of ecb-compile-window-height. But for all temporary buffers (e.g. help-buffers) this is currently not possible.

To restore the ECB-layout after such a buffer-enlarge just call ecb-toggle-enlarged-compilation-window or ecb-redraw-layout.

enlarged-compilation-window-max-height User Option
The max height of the compilation window after enlarging it by ecb-toggle-enlarged-compilation-window. The following values are allowed:
  • best: Minimum is the value of ecb-compile-window-height and max. the half of the frame-height of the ECB-frame, best depending on the values of compilation-window-height (before ECB was started!) and the number of lines of current buffer in ecb-compile-window. If compilation-window-height is set before ECB was started then ECB never enlarges the ecb-compile-window over the value of compilation-window-height! Changing compilation-window-height during activated ECB takes first effect after restarting ECB!
  • 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).

fix-window-size User Option
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: The description of window-size-fixed in the elisp-info-manual is more detailled than the description offered by C-h v!

Note2: 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.

hide-ecb-windows-after-hook User Option
Hooks run direct after the ECB windows have been hidden either by ecb-toggle-ecb-windows or ecb-hide-ecb-windows.

hide-ecb-windows-before-hook User Option
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.

layout-always-operate-in-edit-window User Option
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 and other-window-for-scrolling this makes no sense, therefore you can not enable this for both of them.

Per default this is enabled for delete-window, delete-other-windows, switch-to-buffer and switch-to-buffer-other-window.

layout-name User Option
Select a window layout of ECB. Value is any arbitary 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

layout-switch-to-compilation-window User Option
Switch-to-buffer...-functions switch to ecb-compile-window. If the buffer argument of switch-to-buffer or switch-to-buffer-other-window is an compilation buffer as defined with ecb-compilation-buffer-p we will select the ecb-compile-window first. This is useful if you always want your compilation buffers within the compilation window and now within the edit window.

Note the difference between ecb-layout-always-operate-in-edit-window and this option: If a switch-to-buffer...-function is contained in the former one, then we always jump first into the edit-window regardless of the destination buffer. If also contained in this option then ECB checks the destination buffer and then selects the ecb-compile-window if it is a compilation-buffer in the meaning of ecb-compilation-buffer-p!

Per default this is only enabled for switch-to-buffer. We provide the option for switch-to-buffer-other-window too but the assumption is that when a user asks for a buffer in another window it should always be presented in another window.

layout-window-sizes User Option
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!

new-ecb-frame User Option
Create a new frame at activation time of ECB.

other-window-jump-behavior User Option
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.

redraw-layout-after-hook User Option
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.

redraw-layout-before-hook User Option
Hooks run direct before the ECB-layout will be redrawn by either ecb-redraw-layout.

redraw-layout-quickly User Option
If non-nil, we will attempt to redraw the layout quickly. Please read also carefully the documentation of ecb-redraw-layout.

select-edit-window-on-redraw User Option
Select the first edit window on ecb-redraw-layout.

show-ecb-windows-after-hook User Option
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!

show-ecb-windows-before-hook User Option
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!

split-edit-window User Option
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.

toggle-layout-sequence User Option
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!

windows-height User Option
The height of the ECB windows in lines when they are placed above or below the edit window. If the number is less than 1.0 the width is a fraction of the frame height.

windows-width User Option
The width of the ECB windows in columns when they are placed to the left or right of the edit window. If the number is less than 1.0 the width is a fraction of the frame width.