emacs-devel
[Top][All Lists]
Advanced

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

Re: display-buffer-alist simplifications


From: Chong Yidong
Subject: Re: display-buffer-alist simplifications
Date: Mon, 01 Aug 2011 12:16:01 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

martin rudalics <address@hidden> writes:

> Let's consider the following example setup:
>
> (setq
>  display-buffer-alist
>  '((((regexp . ".*")) (pop-up-window (largest) (lru)))
>    (((regexp . "^\\*Help\\*$")) (pop-up-window-set-height . 
> fit-window-to-buffer))
>    (((regexp . "^\\*.+\\*$")) (pop-up-window-set-height . 20))
>    (((regexp . ".*")) (pop-up-window-min-height . 15))))
>
> This currently means that a user wants to
>
> (1) Pop up a window for any buffer either below the largest or least
>     recently used window.  The minimum height is 15 lines; if Emacs
>     can't make a window that large, don't bother popping up a window.
>
> (2) For "*...*" buffers try setting the window height to 20 lines.  If
>     this is not possible, leave the height alone.
>
> (3) For *Help* buffers try fitting the window to the height of the
>     buffer.
>
> So the minimum height of the popped up window is inherited for all
> "*...*" buffers.

It is a very bad idea for `display-buffer-alist' to behave like this.
While allowing "flexible" behaviors like the above (which I suspect will
not scale well), it deviates from the typical behavior of alists, where
only the first matching entry in the alist takes effect.  In the above
example, if the first entry matches all buffers, all subsequent entries
in `display-buffer-alist' should have no effect.

Please change display-buffer-alist so that only the first matching entry
is applied.



reply via email to

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