aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Rudalics2016-03-25 08:30:23 +0100
committerMartin Rudalics2016-03-25 08:30:23 +0100
commita1cd84cffcca020e8cff88c7a5633e8d5a2d417e (patch)
treefc063da2551ebe4f104af9293c2727fa38ea2e10
parent5ec105648b4695ef3fa159cad2fedcd31e62337a (diff)
downloademacs-a1cd84cffcca020e8cff88c7a5633e8d5a2d417e.tar.gz
emacs-a1cd84cffcca020e8cff88c7a5633e8d5a2d417e.zip
Describe temporary displays in Emacs manual
* doc/emacs/emacs.texi (Temporary Displays): New subsubsection. * doc/emacs/windows.texi (Window Choice): Minor fixes. (Temporary Displays): New subsubsection describing display of temporary buffers and `temp-buffer-resize-mode'.
-rw-r--r--doc/emacs/emacs.texi1
-rw-r--r--doc/emacs/windows.texi64
2 files changed, 62 insertions, 3 deletions
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index dc99d493241..c23c96f0745 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -519,6 +519,7 @@ Multiple Windows
519* Pop Up Window:: Finding a file or buffer in another window. 519* Pop Up Window:: Finding a file or buffer in another window.
520* Change Window:: Deleting windows and changing their sizes. 520* Change Window:: Deleting windows and changing their sizes.
521* Displaying Buffers:: How Emacs picks a window for displaying a buffer. 521* Displaying Buffers:: How Emacs picks a window for displaying a buffer.
522* Temporary Displays:: Displaying non-editable buffers.
522* Window Convenience:: Convenience functions for window handling. 523* Window Convenience:: Convenience functions for window handling.
523 524
524Displaying a Buffer in a Window 525Displaying a Buffer in a Window
diff --git a/doc/emacs/windows.texi b/doc/emacs/windows.texi
index f99234b5c1b..e40162031f3 100644
--- a/doc/emacs/windows.texi
+++ b/doc/emacs/windows.texi
@@ -374,6 +374,7 @@ Several of these commands are bound in the @kbd{C-x 5} prefix key.
374 374
375@menu 375@menu
376* Window Choice:: How @code{display-buffer} works. 376* Window Choice:: How @code{display-buffer} works.
377* Temporary Displays:: Displaying non-editable buffers.
377@end menu 378@end menu
378 379
379@node Window Choice 380@node Window Choice
@@ -411,15 +412,15 @@ By default, this step is skipped. To enable it, change the variable
411@code{graphic-only} means to do this only on graphical displays. 412@code{graphic-only} means to do this only on graphical displays.
412 413
413@item 414@item
414Otherwise, try to create a new window by splitting the selected 415Otherwise, try to create a new window by splitting a window on the
415window, and display the buffer in that new window. 416selected frame, and display the buffer in that new window.
416 417
417@vindex split-height-threshold 418@vindex split-height-threshold
418@vindex split-width-threshold 419@vindex split-width-threshold
419The split can be either vertical or horizontal, depending on the 420The split can be either vertical or horizontal, depending on the
420variables @code{split-height-threshold} and 421variables @code{split-height-threshold} and
421@code{split-width-threshold}. These variables should have integer 422@code{split-width-threshold}. These variables should have integer
422values. If @code{split-height-threshold} is smaller than the selected 423values. If @code{split-height-threshold} is smaller than the chosen
423window's height, the split puts the new window below. Otherwise, if 424window's height, the split puts the new window below. Otherwise, if
424@code{split-width-threshold} is smaller than the window's width, the 425@code{split-width-threshold} is smaller than the window's width, the
425split puts the new window on the right. If neither condition holds, 426split puts the new window on the right. If neither condition holds,
@@ -427,6 +428,12 @@ Emacs tries to split so that the new window is below---but only if the
427window was not split before (to avoid excessive splitting). 428window was not split before (to avoid excessive splitting).
428 429
429@item 430@item
431Otherwise, display the buffer in a window previously showing it.
432Normally, only windows on the selected frame are considered, but if
433@code{pop-up-frames} is non-@code{nil} the window may be also on another
434frame.
435
436@item
430Otherwise, display the buffer in an existing window on the selected 437Otherwise, display the buffer in an existing window on the selected
431frame. 438frame.
432 439
@@ -435,6 +442,57 @@ If all the above methods fail for whatever reason, create a new frame
435and display the buffer there. 442and display the buffer there.
436@end itemize 443@end itemize
437 444
445A more advanced and flexible way to customize the behavior of
446@code{display-buffer} is by using the option @code{display-buffer-alist}
447mentioned in the next section.
448
449
450@node Temporary Displays
451@subsection Displaying non-editable buffers.
452
453Some buffers are shown in windows for perusal rather than for editing.
454Help commands (@pxref{Help}) typically use a buffer called @file{*Help*}
455for that purpose, minibuffer completion (@pxref{Completion}) uses a
456buffer called @file{*Completions*} instead. Such buffers are usually
457displayed only for a short period of time.
458
459 Normally, Emacs chooses the window for such temporary displays via
460@code{display-buffer} as described above. The @file{*Completions*}
461buffer, on the other hand, is preferably displayed in a window at the
462bottom of the selected frame, regardless of the number of windows
463already shown on that frame.
464
465 If you prefer Emacs to display a temporary buffer in a different
466fashion, the recommended approach is to customize the variable
467@code{display-buffer-alist} (@pxref{Choosing Window,,Choosing a Window
468for Display, elisp, The Emacs Lisp Reference Manual}). For example, to
469display @file{*Completions*} by splitting a window as described in the
470previous section, use the following form in your initialization file
471(@pxref{Init File}):
472
473@example
474@group
475(customize-set-variable
476 'display-buffer-alist
477 '(("\\*Completions\\*" display-buffer-pop-up-window)))
478@end group
479@end example
480
481 The @file{*Completions*} buffer is also special in the sense that
482Emacs usually tries to make its window just as large as to display all
483of its contents. To resize windows showing other temporary displays
484like, for example, the @file{*Help*} buffer accordingly, you have to
485explicitly invoke the minor mode (@pxref{Minor Modes})
486@code{temp-buffer-resize-mode} (@pxref{Temporary Displays,,Temporary
487Displays, elisp, The Emacs Lisp Reference Manual}).
488
489 The maximum size of windows resized by @code{temp-buffer-resize-mode}
490can be controlled by customizing the options
491@code{temp-buffer-max-height} and @code{temp-buffer-max-width}
492(@pxref{Temporary Displays,,Temporary Displays, elisp, The Emacs Lisp
493Reference Manual}) and cannot exceed the size of the containing frame.
494
495
438@node Window Convenience 496@node Window Convenience
439@section Convenience Features for Window Handling 497@section Convenience Features for Window Handling
440 498