Subject: Re: bug#53189: 29.0.50; Avoid window split in project-shell

From: martin rudalics <[email-masked]>
Date: Tue, 11 Jan 2022 18:07:58 +0100

> In order to avoid splitting the current window when I open a shell-mode buffer with `project-shell' I have this in my init.el:
 >
 > (setq-default display-buffer-alist '((".+shell*"
 >                                        (display-buffer-same-window)
 >                                        (reusable-frames . nil))))
 >
 > The first time I use `C-x p s` I am getting the behaviour I want. But if I do this:
 >
 > - `C-x p s`
 > - `C-x b RET`
 > - `C-x p s`
 >
 > The current window is split and the shell-mode buffer appears on the
 > side.
 >
 > How can I avoid the window splitting?

This should be Bug#52878.  Can you try with

diff --git a/lisp/window.el b/lisp/window.el
index 3f61d53128..068d76c87f 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -7474,9 +7474,10 @@ display-buffer-base-action
    :version "24.1"
    :group 'windows)

-(defcustom display-comint-buffer-action 'display-buffer-same-window
+(defcustom display-comint-buffer-action
+  '(display-buffer-same-window . ((inhibit-same-window . nil)))
    "The action to display a comint buffer."
-  :type display-buffer--action-function-custom-type
+  :type display-buffer--action-custom-type
    :risky t
    :version "29.1"
    :group 'windows

Which also means that your customization is no more necessary.

martin