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:

https://www.reddit.com/r/Common_Lisp/comments/xa7imh/seeking_reverse_of_slimeswitchtooutputbuffer/?utm_source=share&utm_medium=web2x&context=3

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?

  • dzecniv@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    11 months ago

    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.