Next: , Up: Windows   [Index]


G.3.1 Concepts of Windows

WINDOW

A window is an area of the screen that is used to display a buffer. Windows are represented by a special Lisp object type.

LIVE WINDOW

A live window is one that is actually displaying a buffer in a frame.

INTERNAL WINDOW

Not a live window.

VALID WINDOW

A valid window is one that is either live or internal. A valid window can be deleted. Then it is no longer valid, but the Lisp object representing it might be still referenced from other Lisp objects. A deleted window may be made valid again by restoring a saved window configuration.

FRAME

Windows are grouped into frames. Each frame contains at least one window; the user can subdivide it into multiple, non-overlapping windows to view several buffers at once. When a window is created, resized, or deleted, the change in window space is taken from or given to the adjacent windows, so that the total area of the frame is unchanged.

SELECTED WINDOW

In each frame, at any time, exactly one Emacs window is designated as selected within the frame.

WINDOW TREE

The windows in each frame are organized into a window tree.

LEAF NODES

The leaf nodes of each window tree are live windows—the ones actually displaying buffers.

INTERNAL NODES

The internal nodes of the window tree are internal windows, which are not live.

Function: selected-window

This function returns the selected window (which is always a live window).

Function: windowp object

Returns t if object is a window, otherwise returns nil.

Function: window-live-p object

Returns t if object is a live window and nil otherwise.

Function: window-valid-p object

You can distinguish valid windows from deleted windows with window-valid-p.

This function returns t if object is a live window, or an internal window in a window tree. Otherwise, it returns nil, including for the case where object is a deleted window.


Next: Displaying a Buffer in a Window, Up: Windows   [Index]