In previous emacs, "M-x shell" new a shell buffer in current windows.
but recently, I update my emacs to GNU Emacs 26.0.50.2. "M-x shell" new a shell buffer in the other windows. I search google and could not find answer. does anybody know how to prevent this behavior.
The reason is that
shelluses(pop-to-buffer buffer)instead of(switch-to-buffer buffer). I don't know how to advise the function, so I can't give you an appropriate answer. However if you only wantshellto work the way you want you can simply add the whole function in your config.Maybe somebody else can replace the function with an advice. I would be interested in that solution.