unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Philip Kaludercic <philipk@posteo.net>
To: help-gnu-emacs@gnu.org
Subject: Sensible values for `display-buffer-base-action'
Date: Tue, 07 Jun 2022 08:24:47 +0000	[thread overview]
Message-ID: <87bkv498z4.fsf@posteo.net> (raw)


Hi,

I am wondering if anyone has a clever `display-buffer-base-action' (or
`display-buffer-alist') customisation they could share?  Even after
years of using Emacs, I often have no idea where a buffer might be
displayed?  I have tried things like

    (setq display-buffer-alist
          '(("\\`\\*.*\\*\\'"		;display *...* buffers in a new window
            (display-buffer-reuse-window
             display-buffer-pop-up-window)))
          display-buffer-base-action	;otherwise use the same
          '((display-buffer-reuse-window
             display-buffer-reuse-mode-window
             display-buffer-same-window
             display-buffer-pop-up-frame)))

but as earmuffs are usually used to display buffers without files, this
breaks systems like Gnus.

One recent annoyance I had was that if I have a window layout like this
(in combination with agda2-mode):

-------------------------------------------------
| 1                    | 2                      |
|                      |                        |
|                      |                        |
|                      |                        |
|                      |                        |
|                      |                        |
|                      |                        |
|                      |                        |
|                      |                        |
-------------------------------------------------
| 3                                             |
|                                               |
-------------------------------------------------

a new popup buffer (display-buffer-pop-up-window) is displayed by
splitting window 3 (which is just a 2-5 lines high) and displaying it
just below window 2.

It seems to me that there must be a better way, but I cannot formalise
any set of rules on how buffers should be displayed, when you have more
than two windows opened.

Any tips?



             reply	other threads:[~2022-06-07  8:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-07  8:24 Philip Kaludercic [this message]
2022-06-07  8:41 ` Sensible values for `display-buffer-base-action' Emanuel Berg
2022-06-07  9:26   ` Philip Kaludercic
2022-06-07  9:45     ` Emanuel Berg
2022-06-07 10:27       ` Philip Kaludercic
2022-06-07 13:21         ` Emanuel Berg

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=87bkv498z4.fsf@posteo.net \
    --to=philipk@posteo.net \
    --cc=help-gnu-emacs@gnu.org \
    /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.
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).