Skip to content

Commit

Permalink
borg--build-interactive: Use display-buffer
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tarsius committed Aug 1, 2024
1 parent 5c2b630 commit 5d5f627
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion borg.el
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5d5f627

Please sign in to comment.