From: Eric S Fraga <e.fraga@ucl.ac.uk>
To: help-gnu-emacs@gnu.org
Subject: Re: Help with display-buffer-alist
Date: Fri, 15 Apr 2022 12:47:31 +0100 [thread overview]
Message-ID: <874k2uh8ks.fsf@ucl.ac.uk> (raw)
In-Reply-To: 20220415111531.ktoqlbfuusufjjdv@Ergus
On Friday, 15 Apr 2022 at 13:15, Ergus wrote:
> Hi:
>
> I am trying to mimic somehow the swiper behavior with occur. The first
> step for that is to put the occur window always at bottom which was
> pretty simple with this:
Maybe my code which displays a variety of popups either to the far left
or at the bottom will help:
#+begin_src emacs-lisp
(defun esf/display-buffer-in-side-window (buffer alist)
(let ((fw (/ 80.0 (frame-width))))
(display-buffer-in-side-window buffer
(if (> (frame-width) 120)
(list (cons 'window-width fw)
'(side . left)
'(slot . 0))
'((window-height . 0.25)
(side . bottom)
(slot . 0))))))
(setq display-buffer-alist
'(("^\\*Async Shell Command*" . (display-buffer-no-window))
("^magit-[a-z]+: " . (esf/display-buffer-in-side-window))
("\\*\\(Backtrace\\|Compile-Log\\|Dictionary\\|DICT .*\\|Directory\\|grep\\|[Hh]elp.*\\|Messages\\|Occur\\|org-roam\\|tex-shell\\|vc-\\(diff\\|change-log\\)\\|Shortdoc\\|Warnings\\|wclock\\|WoMan .*\\)\\*"
(esf/display-buffer-in-side-window))))
#+end_src
--
Eric S Fraga with org 9.5.2 in Emacs 29.0.50 on Debian 11.3
next prev parent reply other threads:[~2022-04-15 11:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220415111531.ktoqlbfuusufjjdv.ref@Ergus>
2022-04-15 11:15 ` Help with display-buffer-alist Ergus
2022-04-15 11:47 ` Eric S Fraga [this message]
2022-04-15 14:33 ` Philip Kaludercic
2022-04-21 6:36 ` Juri Linkov
2022-04-21 7:26 ` Philip Kaludercic
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=874k2uh8ks.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.