bug#81613: [PATCH] Make vc-dir use display-buffer instead of pop-to-buffer
Protesilaos <[email protected]>
| Newsgroups | gmane.emacs.bugs |
|---|---|
| Message-ID | <[email protected]> |
> Date: Thu, 13 Aug 2026 15:33:27 +0100
>
> Protesilaos [13/Aug 1:57pm +03] wrote:
>> Dear maintainers,
>>
>> I was trying to control the placement of "*vc-dir*" buffers via the
>> 'display-buffer-alist' but I could not get the expected results. Then
>> I looked at the source code to find that 'M-x vc-dir' relies on
>> 'pop-to-buffer'. The attached patch includes the small change we need
>> to get 'vc-dir' to conform with 'display-buffer-alist'.
>
> pop-to-buffer normally respects display-buffer-alist, though?
I cannot make it work. These are two simplified approaches I tried with
'emacs -Q', followed by 'M-x vc-dir' in a Git directory:
;; Does not produce a new tab
(setq display-buffer-alist
'((derived-mode . vc-dir-mode)
(display-buffer-reuse-mode-window display-buffer-in-tab)
(mode . vc-dir-mode)))
;; Does not appear below the selected window
(setq display-buffer-alist
'((derived-mode . vc-dir-mode)
(display-buffer-reuse-mode-window
display-buffer-below-selected)
(mode . vc-dir-mode)))