Next: Temporary Displays, Up: Displaying Buffers [Contents][Index]
display-buffer
worksThe display-buffer
command (as well as commands that call it
internally) chooses a window to display by following the steps given
below. See Choosing a Window for Display in The Emacs Lisp Reference Manual, for details about how to alter this
sequence of steps.
same-window-buffer-names
, or adding a matching regular
expression to the list same-window-regexps
. By default, these
variables are nil
, so this step is skipped.
pop-up-frames
(see below) to t
.
pop-up-frames
to a non-nil
value. The special value
graphic-only
means to do this only on graphical displays.
The split can be either vertical or horizontal, depending on the
variables split-height-threshold
and
split-width-threshold
. These variables should have integer
values. If split-height-threshold
is smaller than the chosen
window’s height, the split puts the new window below. Otherwise, if
split-width-threshold
is smaller than the window’s width, the
split puts the new window on the right. If neither condition holds,
Emacs tries to split so that the new window is below—but only if the
window was not split before (to avoid excessive splitting).
pop-up-frames
is non-nil
the window may be also on another
frame.
A more advanced and flexible way to customize the behavior of
display-buffer
is by using the option display-buffer-alist
mentioned in the next section.
Next: Temporary Displays, Up: Displaying Buffers [Contents][Index]