help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Sensible values for `display-buffer-base-action'


From: Philip Kaludercic
Subject: Sensible values for `display-buffer-base-action'
Date: Tue, 07 Jun 2022 08:24:47 +0000

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 via email to

[Prev in Thread] Current Thread [Next in Thread]