Liking cljdoc? Tell your friends :D

cider.nrepl.middleware.out

Change out, err, System/out and System/err to print on sessions in addition to process out.

Automatically changes the root binding of all output channels to print to any active sessions. An active session is one that has sent at least one "eval" op.

We use an eval message, instead of the clone op, because there's no guarantee that the channel that sent the clone message will properly handle output replies.

Change *out*, *err*, System/out and System/err to print on sessions
in addition to process out.

Automatically changes the root binding of all output channels to
print to any active sessions. An active session is one that has sent
at least one "eval" op.

We use an eval message, instead of the clone op, because there's no
guarantee that the channel that sent the clone message will properly
handle output replies.
raw docstring

forking-printerclj

(forking-printer messages type)

Returns a PrintWriter suitable for binding as out or err. All operations are forwarded to all output bindings in the sessions of messages, in addition to the server's usual PrintWriter (saved in original-output).

type is either :out or :err.

Returns a PrintWriter suitable for binding as *out* or *err*. All
operations are forwarded to all output bindings in the sessions of
`messages`, in addition to the server's usual PrintWriter (saved in
`original-output`).

`type` is either :out or :err.
sourceraw docstring

handle-outclj

(handle-out handler msg)
source

original-outputclj

(original-output k)

Store the values of the original output streams so we can refer to them.

Store the values of the original output streams so we can refer to them.
sourceraw docstring

(print-stream printer)

Returns a PrintStream suitable for binding as java.lang.System/out or java.lang.System/err. All operations are forwarded to all output bindings in the sessions of messages, in addition to the server's usual PrintWriter (saved in original-output).

printer is the printer var, either #'clojure.core/out or #'clojure.core/err.

Returns a PrintStream suitable for binding as java.lang.System/out or
java.lang.System/err. All operations are forwarded to all output
bindings in the sessions of messages, in addition to the server's
usual PrintWriter (saved in `original-output`).

`printer` is the printer var, either #'clojure.core/*out* or
#'clojure.core/*err*.
sourceraw docstring

subscribe-sessionclj

(subscribe-session {:keys [session] :as msg})

Add msg to tracked-sessions-map.

Add msg to `tracked-sessions-map`.
sourceraw docstring

tracked-sessions-mapclj

Map from session ids to eval *msg*s. Only the most recent message from each session is stored.

Map from session ids to eval `*msg*`s.
Only the most recent message from each session is stored.
sourceraw docstring

tracked-sessions-map-watchclj

(tracked-sessions-map-watch _ _ _ new-state)
source

unsubscribe-sessionclj

(unsubscribe-session session)

Remove session from tracked-sessions-map.

Remove session from `tracked-sessions-map`.
sourceraw docstring

with-out-bindingcljmacro

(with-out-binding [v msg-seq type] & body)

Run body with v bound to the output stream of each msg in msg-seq. type is either :out or :err.

Run body with v bound to the output stream of each msg in msg-seq.
type is either :out or :err.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close