2

I have been using the Emacs "shell" command for many years. It starts a shell in the current buffer. This seems to be the case up through Emacs 24.

I am now running Emacs 25 (on Linux) and I'm finding that the shell command works differently. It starts (or goes to) the shell in a different buffer, splitting the current window if necessary. Sometimes the shell goes to the current buffer, sometimes to the other buffer (if I'm displaying two buffers).

What gives? How can I have the shell command work the way it used to?

1
  • You should probably ask this question on the emacs site.
    – meuh
    Commented Jan 28, 2019 at 16:30

1 Answer 1

1

Yes, this was a change in Emacs 25. The solution is given in the NEWS file; add to your .emacs file:

;; display shell in the current window
(add-to-list 'display-buffer-alist
             '("^\\*shell\\*$" . (display-buffer-same-window)))
2
  • Happy to have helped. Please consider hitting the check mark to accept the answer.
    – varro
    Commented Jan 28, 2019 at 20:42
  • NEWS (view-emacs-news) is on C-h n.
    – Drew
    Commented Jan 31, 2019 at 23:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .