summaryrefslogtreecommitdiff
path: root/devdocs/elisp/displaying-buffers.html
blob: b0d161f7ab98b6614a7159261cb1400046aede40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
 <h3 class="section">Displaying a Buffer in a Suitable Window</h3>   <p>This section describes lower-level functions Emacs uses to find or create a window for displaying a specified buffer. The common workhorse of these functions is <code>display-buffer</code> which eventually handles all incoming requests for buffer display (see <a href="choosing-window">Choosing Window</a>). </p> <p><code>display-buffer</code> delegates the task of finding a suitable window to so-called action functions (see <a href="buffer-display-action-functions">Buffer Display Action Functions</a>). First, <code>display-buffer</code> compiles a so-called action alist—a special association list that action functions can use to fine-tune their behavior. Then it passes that alist on to each action function it calls (see <a href="buffer-display-action-alists">Buffer Display Action Alists</a>). </p> <p>The behavior of <code>display-buffer</code> is highly customizable. To understand how customizations are used in practice, you may wish to study examples illustrating the order of precedence which <code>display-buffer</code> uses to call action functions (see <a href="precedence-of-action-functions">Precedence of Action Functions</a>). To avoid conflicts between Lisp programs calling <code>display-buffer</code> and user customizations of its behavior, it may make sense to follow a number of guidelines which are sketched in the final part of this section (see <a href="the-zen-of-buffer-display">The Zen of Buffer Display</a>). </p> <table class="menu" border="0" cellspacing="0"> <tr>
<td align="left" valign="top">• <a href="choosing-window" accesskey="1">Choosing Window</a>
</td>
<td> </td>
<td align="left" valign="top">How to choose a window for displaying a buffer. </td>
</tr> <tr>
<td align="left" valign="top">• <a href="buffer-display-action-functions" accesskey="2">Buffer Display Action Functions</a>
</td>
<td> </td>
<td align="left" valign="top">Support functions for buffer display. </td>
</tr> <tr>
<td align="left" valign="top">• <a href="buffer-display-action-alists" accesskey="3">Buffer Display Action Alists</a>
</td>
<td> </td>
<td align="left" valign="top">Alists for fine-tuning buffer display. </td>
</tr> <tr>
<td align="left" valign="top">• <a href="choosing-window-options" accesskey="4">Choosing Window Options</a>
</td>
<td> </td>
<td align="left" valign="top">Extra options affecting how buffers are displayed. </td>
</tr> <tr>
<td align="left" valign="top">• <a href="precedence-of-action-functions" accesskey="5">Precedence of Action Functions</a>
</td>
<td> </td>
<td align="left" valign="top">Examples to explain the precedence of action functions. </td>
</tr> <tr>
<td align="left" valign="top">• <a href="the-zen-of-buffer-display" accesskey="6">The Zen of Buffer Display</a>
</td>
<td> </td>
<td align="left" valign="top">How to avoid that buffers get lost in between windows. </td>
</tr> </table><div class="_attribution">
  <p class="_attribution-p">
    Copyright &copy; 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br>
    <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Displaying-Buffers.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Displaying-Buffers.html</a>
  </p>
</div>