bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#52467: 29.0.50; Use pop-to-buffer for shell


From: jakanakaevangeli
Subject: bug#52467: 29.0.50; Use pop-to-buffer for shell
Date: Tue, 14 Dec 2021 16:59:09 +0100

Steingold <sds@gnu.org> writes:

> Hi
> I would like to request reverting of the patch
>
> 70b64e0d040e9c57f1a489c9ebee553264033119 "Use pop-to-buffer-same-window for 
> shell"
>
> When I already have a window with shell, this patch creates a second
> such window.

Maybe you could try customizing display-buffer-alist. To prevent
creation of duplicate windows showing the same shell buffer, do

  (add-to-list 'display-buffer-alist
               '("\\`\\*shell\\*\\'" display-buffer-reuse-window))

> It seems much more reasonable to use pop-to-buffer in eshell rather than
> break shell's behavior.

For old behaviour of popping up a new shell window, do

  (add-to-list 'display-buffer-alist
               '("\\`\\*shell\\*\\'"
                 (display-buffer-reuse-window display-buffer-pop-up-window)))

> If you insist on your desired behavior, please add a user variable
> `shell-pop-to-buffer-action` that you would set to
> `display-buffer--same-window-action`.

display-buffer-alist is flexible enough to customize this behaviour, no
need for a new user option in my opinion.

Best regards.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]