From 416f2435db4a2ae01ca3eb7fc24e27e5d3b5e49b Mon Sep 17 00:00:00 2001 From: Gerard Vermeulen Date: Sun, 5 May 2024 08:52:02 +0200 Subject: [PATCH] Tweak setting `display-buffer-alist' --- README.org | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/README.org b/README.org index 5e7325b..44f2487 100644 --- a/README.org +++ b/README.org @@ -622,6 +622,10 @@ verse and quote blocks are fontified using the `org-verse' and Mickey Peterson's post [[https://www.masteringemacs.org/article/demystifying-emacs-window-manager][Demystifying Emacs's Window Manager]] invites to improve window placement. Listing [[lst:1st-window-management]], [[lst:2nd-window-management]] and [[lst:3rd-window-management]] implement a selection of his recommendations. +See: +1. [[info:elisp#The Zen of Buffer Display][The Zen of Buffer Display (info)]] +2. [[https://e17i.github.io/articles-emacs-display-1/][Configuring the Emacs display system]] +for technical information. #+caption[Window management functions and key bindings]: #+caption: Window management functions and key bindings. @@ -670,24 +674,23 @@ and [[lst:3rd-window-management]] implement a selection of his recommendations. #+caption[Window management variables]: #+caption: Window management variables. #+name: lst:3rd-window-management -#+begin_src emacs-lisp -n +#+begin_src emacs-lisp -n :results none (with-eval-after-load 'emacs ;; https://www.masteringemacs.org/article/demystifying-emacs-window-manager + ;; GAV: `display-buffer-alist' fails to set the *Warnings* buffer position. + (setopt switch-to-buffer-obey-display-actions t) (add-to-list 'display-buffer-alist - `(,(rx (or "*Apropos*" - "*Dictionary*" - "*Help*" - "*info")) + `(,(rx (or "*Apropos*" "*Dictionary*" "*Help*" "*info")) (display-buffer-reuse-window display-buffer-pop-up-window) (inhibit-same-window . nil))) (add-to-list 'display-buffer-alist - `(,(rx (or "*Occur*" - "*grep*" - "*xref*")) + `(,(rx (or "*Occur*" "*grep*" "*xref*")) display-buffer-reuse-window (inhibit-same-window . nil))) + ;; Handling the *Warnings* buffer like the *compilation* buffer also fails. + ;; BUG#70773: Eli tells `(setq delayed-warnings-hook nil)' is better. (add-to-list 'display-buffer-alist - '("\\*compilation\\*" + `(,(rx (or "*compilation*")) display-buffer-no-window (allow-no-window . t)))) #+end_src