From 5d5f627f4d788ad12aaa3a3e6765681deef01803 Mon Sep 17 00:00:00 2001 From: Jonas Bernoulli Date: Thu, 1 Aug 2024 17:09:01 +0200 Subject: [PATCH] borg--build-interactive: Use display-buffer Do this so that users can customize the behavior to their liking. Previously the buffer was displayed in the selected window, now it is usually displayed in another window, possibly created by splitting an existing window. As a result the likelihood decreases that the whole output is visible, but we keep this change in behavior because it matches the behavior of similar functionality in Emacs. Do however take care to select the window used to display the buffer, so that it can still be quickly dismissed by merely pressing "q". Users who want the old behavior back, can do so using something like: (setq display-buffer-alist (cons '("\\*Borg Build\\*" (display-buffer-same-window)) display-buffer-alist)) Closes #160. --- borg.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/borg.el b/borg.el index 47d224b..f9e92f0 100644 --- a/borg.el +++ b/borg.el @@ -655,7 +655,7 @@ and optional NATIVE are both non-nil, then also compile natively." (insert (format "(%s) Building %s\n\n" (format-time-string "%H:%M:%S") clone)))) - (pop-to-buffer-same-window buffer) + (display-buffer buffer '(nil (post-command-select-window . t))) (make-process :name (format "emacs ... --eval (borg-build %S)" clone) :buffer buffer