General synchronization aspects - ECB - the Emacs Code Browser
Description: ECB - the Emacs Code Browser

Next: Synchronization of basic ECB-windows, Previous: ECB-window synchronizing, Up: ECB-window synchronizing

#### 6.12.1 General synchronization aspects

For each separate ECB-window-synchronization (remember: One common for the basic ECB-windows, one for each add-on ECB-window) ECB offers the following option-triple (demonstrated for the basic ECB-windows):

- `ecb-basic-buffer-sync`:

  Enables or disables the synchronization in general.

  If active then the synchronization for the related ECB-window-buffers/windows takes place whenever a buffer changes in an edit window or if another edit-window with another buffer will be selected, 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 does NOT belong to this list.

  But in every case the synchronization only takes place if the major-mode of the current-buffer in the current selected 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 a synchronization will never 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.

- `ecb-basic-buffer-sync-delay`:

  This option takes only effect if the synchronization is switched on via `ecb-basic-buffer-sync` and determines when ECB synchronizes.

  This option sets the time in seconds (fractions allowed) Emacs must be idle before the related ECB-window(s) are synchronized. 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.

  Per default ECB always synchronizes on idle-basis and it is strongly recommened not to change this (ie. not setting the delay-option to nil) because this can be very performance consuming (e.g. at least the check if a synchronization must be performed is done after every key- or mouse-button press!

  Some fraction of a second is probably always the best choice, because it does not cost cpu-power and nonetheless the synchronization takes place quite immediately. So in most cases there is no need to bother with this option, just use the default value.

- `ecb-basic-buffer-sync-hook`:

  For each separate synchronization a hook variable is offered where you can hook in with some elisp code if you need some tasks performed afterwards the synchronization has been finished.

  In most cases no hook will be needed.

Analogous to the shown options for the basic ECB-windows each add-on ECB-window has its own separate triple of these options, named congruent to the name of the buffer-name of the add-on ECB-window (e.g. for the analyse ECB-window with the buffer-name hold in `ecb-analyse-buffer-name` these three options are named `ecb-analyse-buffer-sync`, `ecb-analyse-buffer-sync-delay` and `ecb-analyse-buffer-sync-hook`. For some specialities see Add-on synchronization.

Please note: With the command `ecb-window-sync` you can do a manual synchronization if the automatic one is switched off or if you just want to do this! See the documantation of this command.