Previous: , Up: Windows   [Contents][Index]


8.21 Avoided Windows

“Avoided” windows are kept unobscured by other windows wherever possible. It is involved in window placement (see Window Placement) and maximization (see Maximizing Windows). Most placement modes will attempt to place a new window avoiding overlap with them. Windows can be maximized avoiding overlap to avoided windows.

In this context, windows are categorized into three: windows with avoid property, those with ignored property (see Ignored Windows), and the others.

It is possible to avoid overlap only with avoided windows, and also is possible not to avoid overlap only with ignored windows.

Remember that the window with avoid property is avoided by other windows. Thus property name avoid should have been named “avoided”. On the other hand, related functions and variables are named correctly, and no special care is necessary.

Variable: dont-avoid-ignored

When non-nil (the default), ignored windows aren’t avoided.

Variable: avoid-by-default

When non-nil, any windows are avoided. Defaults to nil.

Function: window-avoided-p window

Returns t if window is avoided by other windows. It is determined in the following order:

  1. A window with avoid property is always avoided.
  2. A window with ignored property is always not avoided unless dont-avoid-ignored is non-nil.
  3. Otherwise, avoid-by-default determines if it should be avoided.
Function: avoided-windows #!optional window

Returns a list of all windows that are avoided. If window is defined, then it is excluded from the returned list.