I may have found a solution to my desire for C-c C-z
in the slime repl (default slime-nop
) to return you to the buffer that sent you to the repl via slime-switch-to-output-buffer
(also C-c C-z
), with regard to a post/request I made a year ago:
Basically calling a function which does
(switch-to-buffer (slime-recently-visited-buffer 'lisp-mode))
works, or at least does something interesting by approximation.
I’m not much of an emacs coder though and I’m at a loss though as to how to bind my new function calling the above switch-to-buffer
to C-c C-z
only in the slime repl buffer. Any tips?
Bind a key in the
slime-repl-mode-map
. Try this:(defun my/slime-switch-to-recent-lisp-buffer () (interactive) (switch-to-buffer (slime-recently-visited-buffer 'lisp-mode))) (define-key slime-repl-mode-map (kbd "C-c C-z") 'my/slime-switch-to-recent-lisp-buffer)
thanks for the heads up, I’ll def try it. So far I bound C-c C-z to 'other-window… simple.
In case a SLY user is reading this. Sly brings
sly-switch-to-most-recent
, you might have to bind it toC-c C-z
yourself insly-mrepl-mode-map
.