emacs-devel
[Top][All Lists]
Advanced

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

Re: display-buffer-alist simplifications


From: martin rudalics
Subject: Re: display-buffer-alist simplifications
Date: Sat, 23 Jul 2011 20:40:11 +0200
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

> No.  Each specifier must not affect the behavior of the other specifiers
> in the list.  As soon as one specifier triggers, the following
> specifiers must be ignored.  That is, the specifier list should be an OR
> list, not some complicated combination of AND and OR.
>
> If you wanted the first specifier to never reuse the selected window
> even if it shows the buffer, the alist should be something like
>
>  (setq
>   display-buffer-alist
>   '(".*"
>     (reuse-window :buffer same :window other)
>     (reuse-window :window other)
>
> One more thing.  Put the even-sizes option into the specifier, not in
> its own entry, like this:
>
>  (setq
>   display-buffer-alist
>   '(".*"
>     (reuse-window :buffer same :even-sizes t)
>     (reuse-window :window other :even-sizes t)))

So you mean to choose the third proposal

(3) Disallow lookup for further occurrences of the same specifier.
    This implies that we'd have to write

(setq
 display-buffer-alist
 '(".*"
   (reuse-window :buffer same :even-sizes t)
   (reuse-window :window other :even-sizes t)))

from my earlier list ;-)

This has the disadvantage that Lisp users would have to set the value of
every specifier like even-sizes unless it's nil.  In practice, this
means that you have to repeat the values of min-height and min-width for
pop-up-windows and the value of pop-up-frame-alist for each and every
entry that wants to use them.  This can be done but it's tedious and
contradicts Emacs 23 practice where things like `pop-up-frame-alist' and
`special-display-frame-alist' are specified once only.

The major problem with this approach, however, is an inconsistency when
handling specifiers passed by the application.  Currently, these
specifiers are merged into the user's specifiers.  Suppose I write

(setq
 display-buffer-alist
 '((((regexp . ".*"))
    (reuse-window nil same)
    (reuse-window-even-sizes . t))))

(display-buffer "*scratch*" '((reuse-window other)))

then the `display-buffer' call does even window sizes because it's
specified in `display-buffer-alist'.  What would you propose here?

A similar issue occurs when merging in specifiers corresponding to Emacs
23 options.  Currently, the reuse-window-even-sizes specifier is set for
all buffers from the value of `even-window-heights' which is t by
default.  This produces a normalized specifier which is respected
whenever a window is reused but not written into `display-buffer-alist'.
How should I proceed here?

martin



reply via email to

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