Skip to content

Commit cb47d71

Browse files
committed
Merge pull request #1376 from clojure-emacs/out
Subscribe to server out upon connection
2 parents 82e44f3 + 120b999 commit cb47d71

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cider.el

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,11 @@ In case `default-directory' is non-local we assume the command is available."
481481
(catch Throwable _ \"not installed\"))"
482482
(cider--check-middleware-compatibility-callback (current-buffer))))
483483

484+
(defun cider--subscribe-repl-to-server-out ()
485+
"Subscribe to the server's *out*."
486+
(cider-nrepl-send-request '("op" "out-subscribe")
487+
(cider-interactive-eval-handler (current-buffer))))
488+
484489
(defun cider--connected-handler ()
485490
"Handle cider initialization after nREPL connection has been established.
486491
This function is appended to `nrepl-connected-hook' in the client process
@@ -492,6 +497,7 @@ buffer."
492497
(cider--check-required-nrepl-ops)
493498
(cider--check-middleware-compatibility)
494499
(cider--debug-init-connection)
500+
(cider--subscribe-repl-to-server-out)
495501
(when cider-auto-mode
496502
(cider-enable-on-existing-clojure-buffers))
497503
(run-hooks 'cider-connected-hook))

0 commit comments

Comments
 (0)