unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: display-buffer-alist actions
Date: Thu, 25 Feb 2021 11:51:35 -0500	[thread overview]
Message-ID: <jwvwnuwf60i.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: 87a6rsf6nz.fsf@ucl.ac.uk

> 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	other threads:[~2021-02-25 16:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-24 17:44 display-buffer-alist actions Eric S Fraga
2021-02-24 19:52 ` Joost Kremers
2021-02-24 20:08   ` Joost Kremers
2021-02-24 21:08     ` TRS-80
2021-02-24 20:57   ` Michael Heerdegen
2021-02-25 16:25   ` Eric S Fraga
2021-02-25 20:40     ` Garjola Dindi
2021-02-24 21:15 ` Stefan Monnier
2021-02-25 16:34   ` Eric S Fraga
2021-02-25 16:51     ` Stefan Monnier [this message]
2021-02-26  9:43       ` Eric S Fraga
2021-02-25  0:00 ` [External] : " Drew Adams
2021-02-25  4:28   ` Michael Heerdegen
2021-02-25  7:00     ` Drew Adams
2021-02-25 14:26       ` Stefan Monnier
2021-02-25 16:22         ` Drew Adams
2021-02-25 16:36     ` Eric S Fraga
2021-02-25 16:27   ` Eric S Fraga

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvwnuwf60i.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).