Bob <[email protected]> writes:
[...]
When I type meta-x shell, I get a split screen with a shell in the
new buffer.
In 24, the shell started in the current buffer. I don't like the
"new" behavior because it screws up my buffers. I have the screen
split in a few different ways and have all the content I want where I
want it.
I guess you may find it convenient to save your desired window
configuration to a register with C-x r w and restore it when
needed with C-x r j (jump-to-register.)
I don't want the shell buffer to wind up anywhere except where I
enter meta-x shell.
Can somebody please explain how to restore the original (previous)
behavior?
First of all, I believe you've meant "window" in the above, not
"buffer." Then, the behavior you observe is implemented by a call
to pop-to-buffer from M-x shell, which has an ACTION argument:
pop-to-buffer is an interactive compiled Lisp function in 'window.el'.
...
This uses 'display-buffer' as a subroutine. The optional ACTION
argument is passed to 'display-buffer' as its ACTION argument.
See 'display-buffer' for more information.
Looking up display-buffer's documentation reveals
display-buffer-same-window, which seems to implement the
behavior you're looking for:
If ACTION is non-nil, it should have the form (FUNCTION . ALIST),
where FUNCTION is either a function or a list of functions, and
ALIST is an arbitrary association list (alist).
...
Available action functions include:
'display-buffer-same-window'
...
Now, the same documentation refers to the display-buffer-alist
variable, which can be set as follows for the desired result:
(setq display-buffer-alist
'(("^\\*shell\\*$" display-buffer-same-window)))
--
FSF associate member #7257
http://am-1.org/~ivan/
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)