unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 23093@debbugs.gnu.org, nljlistbox2@gmail.com
Subject: bug#23093: 25.0.92; Change for the worse: minibuffer completion window splits below rather that right
Date: Wed, 23 Mar 2016 19:53:49 +0100	[thread overview]
Message-ID: <56F2E63D.9070509@gmx.at> (raw)
In-Reply-To: <83twjx2pc7.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 199 bytes --]

 > "Displaying Buffers" sounds like a good place.  Maybe add a new
 > subsection there, which talks specifically about temporary pop-up
 > buffers.

Please have a look at the attached patch.

martin

[-- Attachment #2: windows.texi.diff --]
[-- Type: text/plain, Size: 4921 bytes --]

diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index dc99d49..c23c96f 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -519,6 +519,7 @@ Top
 * Pop Up Window::       Finding a file or buffer in another window.
 * Change Window::       Deleting windows and changing their sizes.
 * Displaying Buffers::  How Emacs picks a window for displaying a buffer.
+* Temporary Displays::  Displaying non-editable buffers.
 * Window Convenience::  Convenience functions for window handling.

 Displaying a Buffer in a Window
diff --git a/doc/emacs/windows.texi b/doc/emacs/windows.texi
index f99234b..0bec3d3 100644
--- a/doc/emacs/windows.texi
+++ b/doc/emacs/windows.texi
@@ -374,6 +374,7 @@ Displaying Buffers

 @menu
 * Window Choice::   How @code{display-buffer} works.
+* Temporary Displays::   Displaying non-editable buffers.
 @end menu

 @node Window Choice
@@ -411,15 +412,15 @@ Window Choice
 @code{graphic-only} means to do this only on graphical displays.

 @item
-Otherwise, try to create a new window by splitting the selected
-window, and display the buffer in that new window.
+Otherwise, try to create a new window by splitting a window on the
+selected frame, and display the buffer in that new window.

 @vindex split-height-threshold
 @vindex split-width-threshold
 The split can be either vertical or horizontal, depending on the
 variables @code{split-height-threshold} and
 @code{split-width-threshold}.  These variables should have integer
-values.  If @code{split-height-threshold} is smaller than the selected
+values.  If @code{split-height-threshold} is smaller than the chosen
 window's height, the split puts the new window below.  Otherwise, if
 @code{split-width-threshold} is smaller than the window's width, the
 split puts the new window on the right.  If neither condition holds,
@@ -427,6 +428,12 @@ Window Choice
 window was not split before (to avoid excessive splitting).

 @item
+Otherwise, display the buffer in a window previously showing it.
+Normally, only windows on the selected frame are considered, but if
+@code{pop-up-frames} is non-@code{nil} the window may be also on another
+frame.
+
+@item
 Otherwise, display the buffer in an existing window on the selected
 frame.

@@ -435,6 +442,58 @@ Window Choice
 and display the buffer there.
 @end itemize

+A more advanced and flexible way to customize the behavior of
+@code{display-buffer} is by using the option @code{display-buffer-alist}
+mentioned in the next section.
+
+
+@node Temporary Displays
+@subsection Displaying non-editable buffers.
+
+Some buffers are shown in windows for perusal rather than for editing.
+Help commands (@pxref{Help}) typically use a buffer called @file{*Help*}
+for that purpose, minibuffer completion (@pxref{Completion}) uses a
+buffer called @file{*Completions*} instead.  Such buffers are usually
+displayed for a short period of time.
+
+   Normally, Emacs chooses the window for temporary displays via
+@code{display-buffer} as described above.  The @file{*Completions*}
+buffer, on the other hand, is preferably displayed in a window at the
+bottom of the selected frame, regardless of the number of windows
+already shown on that frame.
+
+   If you prefer Emacs to display a temporary buffer in a different
+fashion, the recommended approach is to customize the variable
+@code{display-buffer-alist} (@pxref{Choosing Window,,Choosing a Window
+for Display, elisp, The Emacs Lisp Reference Manual}).  For example, to
+display @file{*Completions*} by splitting a window as described in the
+previous section, use the following form in your initialization file
+(@pxref{Init File}):
+
+@example
+@group
+(customize-set-variable
+ 'display-buffer-alist
+ '(("\\*Completions\\*" display-buffer-pop-up-window)))
+@end group
+@end example
+
+   The @file{*Completions*} buffer is also special in the sense that
+Emacs usually tries to make its window just as large to display all of
+its contents.  Once sized this way, the size of that window can only
+shrink.  If you want to make sure that the window is always large enough
+to show the entire contents of the buffer invoke the minor mode
+(@pxref{Minor Modes}) @code{temp-buffer-resize-mode} (@pxref{Temporary
+Displays,,Temporary Displays, elisp, The Emacs Lisp Reference Manual}).
+
+   When @code{temp-buffer-resize-mode} is enabled, it will try to fit
+all temporary displays including, for example, the @file{*Help*} buffer.
+The maximum size of such windows can be controlled by customizing the
+options @code{temp-buffer-max-height} and @code{temp-buffer-max-width}
+(@pxref{Temporary Displays,,Temporary Displays, elisp, The Emacs Lisp
+Reference Manual}) and cannot exceed the size of the containing frame.
+
+
 @node Window Convenience
 @section Convenience Features for Window Handling



  reply	other threads:[~2016-03-23 18:53 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-22 17:37 bug#23093: 25.0.92; Change for the worse: minibuffer completion window splits below rather that right N. Jackson
2016-03-22 18:47 ` martin rudalics
2016-03-22 19:02   ` Eli Zaretskii
2016-03-23  8:09     ` martin rudalics
2016-03-23 15:20       ` Eli Zaretskii
2016-03-23 18:53         ` martin rudalics [this message]
2016-03-23 19:43           ` Eli Zaretskii
2016-03-23 20:17           ` N. Jackson
2016-03-24  7:42             ` martin rudalics
2016-03-25  7:42             ` martin rudalics
2016-03-25  8:05               ` Eli Zaretskii
2016-03-25  8:37                 ` martin rudalics
2016-03-25 10:39                   ` Eli Zaretskii
2020-08-24 18:21                     ` Lars Ingebrigtsen
2016-03-22 19:45   ` N. Jackson
2016-03-23  8:09     ` martin rudalics
2016-03-23 21:35       ` Juri Linkov
2016-03-24  7:43         ` martin rudalics
2016-03-24 22:16           ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56F2E63D.9070509@gmx.at \
    --to=rudalics@gmx.at \
    --cc=23093@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=nljlistbox2@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).