Skip to content

Commit

Permalink
Merge pull request #1376 from clojure-emacs/out
Browse files Browse the repository at this point in the history
Subscribe to server out upon connection
  • Loading branch information
bbatsov committed Oct 19, 2015
2 parents 82e44f3 + 120b999 commit cb47d71
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cider.el
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,11 @@ In case `default-directory' is non-local we assume the command is available."
(catch Throwable _ \"not installed\"))"
(cider--check-middleware-compatibility-callback (current-buffer))))

(defun cider--subscribe-repl-to-server-out ()
"Subscribe to the server's *out*."
(cider-nrepl-send-request '("op" "out-subscribe")
(cider-interactive-eval-handler (current-buffer))))

(defun cider--connected-handler ()
"Handle cider initialization after nREPL connection has been established.
This function is appended to `nrepl-connected-hook' in the client process
Expand All @@ -492,6 +497,7 @@ buffer."
(cider--check-required-nrepl-ops)
(cider--check-middleware-compatibility)
(cider--debug-init-connection)
(cider--subscribe-repl-to-server-out)
(when cider-auto-mode
(cider-enable-on-existing-clojure-buffers))
(run-hooks 'cider-connected-hook))
Expand Down

0 comments on commit cb47d71

Please sign in to comment.