GNU bug report logs - #52467
29.0.50; Use pop-to-buffer for shell

Previous Next

Package: emacs;

Reported by: sds <at> gnu.org

Date: Mon, 13 Dec 2021 16:18:02 UTC

Severity: normal

Tags: wontfix

Merged with 52468

Found in version 29.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #49 received at 52467 <at> debbugs.gnu.org (full text, mbox):

From: <jakanakaevangeli <at> chiru.no>
To: sds <at> gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Theodor Thornhill <theo <at> thornhill.no>, Stefan Kangas <stefan <at> marxist.se>,
 52467 <at> debbugs.gnu.org, Dmitry Gutov <dgutov <at> yandex.ru>
Subject: Re: bug#52467: 29.0.50; Use pop-to-buffer for shell
Date: Mon, 27 Dec 2021 10:32:13 +0100
Sam Steingold <sds <at> gnu.org> writes:

> 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.

It is user configurable through 'display-buffer-alist, see my other
reply to this thread. To prevent creation of duplicate windows showing
the same shell buffer, do

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

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)))

The same can be done for eshell, terminal and most other buffers
displayed with 'display-buffer-same-window'.

> 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.

I'm personally against adding such an user option.

If it were added for M-x shell, eshell and term, the same reasoning
could be used to add it for M-x run-scheme, dired, dunnet and all the
other places using 'pop-to-buffer-same-window'. This would add up to a
lot of variables for little benefit since we can already customize
window pop-up behaviour of all these commands with
'display-buffer-alist'.

> Thank you.




This bug report was last modified 3 years and 228 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.