Prevent SLIME to switch to replication buffer

I never use REPL, and I find it annoying that it appears every time I connect to a swank instance. How can I prevent SLIME from switching to the replication buffer?

I tried to find where he does this in the slime code, but it is very large when you do not know what to look for.

thank

+4
source share
2 answers

Here is how I did it in lispy :

(defun lispy--eval-lisp (str)
  "Eval STR as Common Lisp code."
  (require 'slime-repl)
  (unless (slime-current-connection)
    (let ((wnd (current-window-configuration)))
      (slime)
      (while (not (and (slime-current-connection)
                       (get-buffer-window (slime-output-buffer))))
        (sit-for 0.2))
      (set-window-configuration wnd)))
  (let (deactivate-mark)
    (cadr (slime-eval `(swank:eval-and-grab-output ,str)))))
+4
source

Here is my solution thanks to @ abo-abo answer.

(defun my-slime-connect () (interactive)
   (let ((wnd (current-window-configuration)))
 (call-interactively 'slime-connect)
 (sit-for 0.2) ;; Not sure if necessary, haven't tested without it.
 (set-window-configuration wnd)))
+1
source

Source: https://habr.com/ru/post/1568198/


All Articles