I usually have emacs open in 4 sections
code | slime |
---|---|
code | terminal |
When I am setting up, and i open slime with M-x Slime
, it opens up in one of the other buffers.
Question -- How do I control which buffer slime opens in?
I usually have emacs open in 4 sections
code | slime |
---|---|
code | terminal |
When I am setting up, and i open slime with M-x Slime
, it opens up in one of the other buffers.
Question -- How do I control which buffer slime opens in?
slime-start
(in slime.el
) calls pop-to-buffer
. One idea would be to change that to switch-to-buffer
, and another idea would be to customize the display-buffer-alist
: https://www.gnu.org/software/emacs/manual/html_node/elisp/The-Zen-of-Buffer-Display.html
switch-to-buffer
will target the current / selected window. See also set-window-buffer
as a way to control which window is targeted. display-buffer
with the appropriate targeting function and alist settings can also be used to target a specific window.
How did I ascertain which slime function calls pop-to-buffer
?
STEP #1: Install slime
and set the load-path
correctly.
STEP #2: (require 'slime)
STEP #3: M-x find-function RET slime RET
STEP #4: Move the cursor to slime-start*
and repeat the process: M-x find-function RET slime-start* RET
. By placing the cursor on the desired function, the default for find-function
will be the function at point.
STEP #5: Move the cursor to slime-start
(note the lack of the asterisk *
) and repeat the process once again: M-x find-function RET slime-start RET
.
STEP #6: We see that the last line of slime-start
is (pop-to-buffer (process-buffer proc))
.
If the O.P. chooses to modify slime.el
directly, then check to see whether there is a corresponding byte-compiled file with the name slime.elc
. If so, then re-byte-compile the modified Lisp file with M-x byte-compile-file
. Then, restart Emacs or evaluate the modified function so that the current instance becomes aware of the modification.