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

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

Re: display-buffer-alist actions


From: Stefan Monnier
Subject: Re: display-buffer-alist actions
Date: Thu, 25 Feb 2021 11:51:35 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> Ah, interesting.  I took the more simple approach (for me):

That's a fine solution as well.

>     (if (> (frame-width) 100)
>         (display-buffer-in-side-window buffer '((window-width . 0.28)
>                                                 (side . left)
>                                                 (slot . 0)))
>       (display-buffer-in-side-window buffer '((window-height . 0.25)
>                                               (side . bottom)
>                                               (slot . 0)))))

AKA:

    (display-buffer-in-side-window buffer
                                   (if (> (frame-width) 100)
                                       '((window-width . 0.28)
                                         (side . left)
                                         (slot . 0))
                                     '((window-height . 0.25)
                                       (side . bottom)
                                       (slot . 0))))
or even

    (display-buffer-in-side-window buffer
                                   `(,@(if (> (frame-width) 100)
                                           '((window-width . 0.28)
                                             (side . left))
                                         '((window-height . 0.25)
                                           (side . bottom)))
                                     (slot . 0)))

-- Stefan




reply via email to

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