[Top][All Lists]

[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: Mon, 29 Aug 2011 11:34:39 +0200
User-agent: Thunderbird (Windows/20090302)

>           (functions (append (car display-buffer-overriding-action)
>                              (car user-action)
>                              (car action)
>                              (car display-buffer-default-action)))
>           (alist (append (cdr display-buffer-overriding-action)
>                          (cdr user-action)
>                          (cdr action)
>                          (cdr display-buffer-default-action))))
>       (run-with-args-until-success functions buffer alist)))

Elaborating once more on this subject: Let O, U, A and D respectively
denote the functions in the cars of display-buffer-overriding-action,
user-action, action, and display-buffer-default-action and OL, UL, AL,
DL the alists in the corresponding cdrs.  Now my original proposal was
to run until success

(O . (OL UL AL DL))
(U . (UL AL DL))
(A . (AL DL))
(D . (DL))

that is, try the overriding function with all alists, if that fails try
the user function with all alists but the overriding one and so on.
People raised concerns about misinterpreting the alist concept and Chong
proposed to do something like

(O . (OL))
(U . (UL))
(A . (AL))
(D . (DL))

instead.  I raised concerns about applications not bothering to specify
anything in OL and AL and so he later changed this to something like

(O . (OL DL))
(U . (UL DL))
(A . (AL DL))
(D . (DL))

IIUC.  Stefan's proposal, as can be seen from the code above, now is to

(O . (OL UL AL DL))
(U . (OL UL AL DL))
(A . (OL UL AL DL))
(D . (OL UL AL DL))

which IMHO isn't TRT since, for example, the entries in OL might not
make sense in the context of the functions in U, A and D.

So which is the solution I should use?


reply via email to

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