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

From: Sam Steingold <[email-masked]>
Date: Sun, 26 Dec 2021 12:00:40 -0500

> * Lars Ingebrigtsen <[email-masked]> [2021-12-26 12:35:49 +0100]:
>
> Dmitry Gutov <[email-masked]> writes:
>
>> The downside of using it, though, is that the current window is
>> unlikely to be used even if the buffer is not displayed anywhere else
>> (the algorithm chooses something like LRU window). Maybe we should
>> choose a mode of operation where it does use the current window,
>> unless the buffer is displayed somewhere else.
>>
>> Something like
>>
>>     (pop-to-buffer buffer
>>                    '((display-buffer-reuse-window
>>                       display-buffer-same-window)
>>                      (inhibit-same-window . nil)))
>
> I think that's more unpredictable.  What happens currently is very regular.

I think predictability if not the only or even main concern.

The current behavior is _not_ user-customizable, which is a major
problem for me. I hardly ever want the same buffer displayed _twice_,
especially the *shell* buffer.

Whatever default behavior you want (and for me it's definitely
reuse-window) should be implemented using a new user variable
`shell-display-buffer-action' that would be used by `shell',
`project-shell', `eshell', &c.

This is not a major change, so I propose that we close this bug by
adding `shell-display-buffer-action' (I can do that), and continue the
discussion of the best default on emacs-devel.

Thank you.
-- 
Sam Steingold (http://sds.podval.org/) on Pop 21.10 (impish) X 11.0.12013000
http://childpsy.net http://calmchildstories.com http://steingoldpsychology.com
https://camera.org https://iris.org.il https://www.memritv.org
MS Windows vs IBM OS/2: Why marketing matters more than technology...