all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eric S Fraga <e.fraga@ucl.ac.uk>
To: help-gnu-emacs@gnu.org
Subject: Re: display-buffer-alist actions
Date: Thu, 25 Feb 2021 16:34:08 +0000	[thread overview]
Message-ID: <87a6rsf6nz.fsf@ucl.ac.uk> (raw)
In-Reply-To: jwvpn0pjhwi.fsf-monnier+emacs@gnu.org

On Wednesday, 24 Feb 2021 at 16:15, Stefan Monnier wrote:
> So the middle entry is only used when `my-current-monitor-is-tall`
> returns non-nil.

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

#+begin_src emacs-lisp
  (defun esf/display-buffer-in-side-window (buffer alist)
    ;; (message "here we are with alist=%s" alist)
    ;; (message "frame width=%d height=%d" (frame-width) (frame-height))
    (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)))))
  (setq display-buffer-alist
        '(("^\\*Async Shell Command*" . (display-buffer-no-window))
          ("\\*[Hh]elp\\*" . (esf/display-buffer-in-side-window))))
#+end_src 

(elided for clarity)

Thank you all that pointed me in the right direction!
-- 
Eric S Fraga via Emacs 28.0.50 & org 9.4.4 on Debian bullseye/sid




  reply	other threads:[~2021-02-25 16:34 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 [this message]
2021-02-25 16:51     ` Stefan Monnier
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

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

  git send-email \
    --in-reply-to=87a6rsf6nz.fsf@ucl.ac.uk \
    --to=e.fraga@ucl.ac.uk \
    --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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.