[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Help with display-buffer-alist
From: |
Eric S Fraga |
Subject: |
Re: Help with display-buffer-alist |
Date: |
Fri, 15 Apr 2022 12:47:31 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
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