Next: Choosing Window Options, Previous: Buffer Display Action Functions, Up: Displaying Buffers
An action alist is an association list mapping predefined
symbols recognized by action functions to values these functions are
supposed to interpret accordingly. In each call,
display-buffer constructs a new, possibly empty action alist
and passes that entire list on to any action function it calls.
By design, action functions are free in their interpretation of
action alist entries. In fact, some entries like
allow-no-window or previous-window have a meaning only
for one or a few action functions, and are ignored by the rest. Other
entries, like inhibit-same-window or window-parameters,
are supposed to be respected by most action functions, including those
provided by application programs and external packages.
In the previous subsection we have described in detail how
individual action functions interpret the action alist entries they
care about. Here we give a reference list of all known action alist
entries according to their symbols, together with their values and
action functions (see Buffer Display Action Functions) that
recognize them. Throughout this list, the terms “buffer” will refer
to the buffer display-buffer is supposed to display, and
“value” refers to the entry's value.
inhibit-same-windownil, this signals that the selected window
must not be used for displaying the buffer. All action functions that
(re-)use an existing window should respect this entry.
previous-windowdisplay-buffer-in-previous-window will give
preference to such a window provided it is still live and not
dedicated to another buffer.
modedisplay-buffer-reuse-mode-window may reuse a window whenever
the value specified by this entry matches the major mode of that
window's buffer. Other action functions ignore such entries.
frame-predicatenil if that frame is a candidate for displaying
the buffer. This entry is used by
display-buffer-use-some-frame.
reusable-framesnil means consider only windows on the selected frame.
(Actually, the last frame used that is not a minibuffer-only frame.)
t means consider windows on all frames.
visible means consider windows on all visible frames.
Note that the meaning of nil differs slightly from that of the
all-frames argument to next-window (see Cyclic Window Ordering).
A major client of this is display-buffer-reuse-window, but all
other action functions that try to reuse a window are affected as
well. display-buffer-in-previous-window consults it when
searching for a window that previosuly displayed the buffer on another
frame.
inhibit-switch-framenil value prevents another frame from being raised or
selected, if the window chosen by display-buffer is displayed
there. Primarily affected by this are
display-buffer-use-some-frame and
display-buffer-reuse-window.
display-buffer-pop-up-frame should be affected as well, but
there is no guarantee that the window manager will comply.
window-parameterswindow-heightnil means to leave the height of the chosen window alone.
shrink-window-if-larger-than-buffer and
fit-window-to-buffer, see Resizing Windows.
By convention, the height of the chosen window is adjusted only if the window is part of a vertical combination (see Windows and Frames) to avoid changing the height of other, unrelated windows. Also, this entry should be processed only under certain conditions which are specified right below this list.
window-widthwindow-height entry described
before, but used to adjust the chosen window's width instead. The
value can be one of the following:
nil means to leave the width of the chosen window alone.
By convention, the width of the chosen window is adjusted only if the window is part of a horizontal combination (see Windows and Frames) to avoid changing the width of other, unrelated windows. Also, this entry should be processed under only certain conditions which are specified right below this list.
preserve-sizenil such an entry tells Emacs to preserve the size of
the window chosen (see Preserving Window Sizes). The value should
be either (t . nil) to preserve the width of the window,
(nil . t) to preserve its height or (t . t) to
preserve both, its width and its height. This entry should be
processed only under certain conditions which are specified right
after this list.
pop-up-frame-parametersdisplay-buffer-pop-up-frame is its one and
only addressee.
parent-framedisplay-buffer-in-child-frame.
child-frame-parametersdisplay-buffer-in-child-frame.
sidedisplay-buffer-in-side-window to indicate the side of the frame
where a new side window shall be placed (see Displaying Buffers in Side Windows). It is also used by
display-buffer-in-atom-window to indicate the side of an
existing window where the new window shall be located (see Atomic Windows).
slotnil, the value specifies the slot of the side window
supposed to display the buffer. This entry is used only by
display-buffer-in-side-window.
windowdisplay-buffer. This entry is currently used by
display-buffer-in-atom-window to indicate the window on whose
side the new window shall be created.
allow-no-windownil, display-buffer does not
necessarily have to display the buffer and the caller is prepared to
accept that. This entry is not intended for user customizations,
since there is no guarantee that an arbitrary caller of
display-buffer will be able to handle the case that no window
will display the buffer. display-buffer-no-window is the only
action function that cares about this entry.
By convention, the entries window-height, window-width
and preserve-size are applied after the chosen window's buffer
has been set up and if and only if that window never showed another
buffer before. More precisely, the latter means that the window must
have been either created by the current display-buffer call or
the window was created earlier by display-buffer to show the
buffer and never was used to show another buffer until it was reused
by the current invocation of display-buffer.