File: nrepl-client.el.html

Provides an Emacs Lisp client to connect to Clojure nREPL servers.

A connection is an abstract idea of the communication between Emacs (client) and nREPL server. On the Emacs side connections are represented by two running processes. The two processes are the server process and client process (the connection to the server). Each of these is represented by its own process buffer, filter and sentinel.

The nREPL communication process can be broadly represented as follows:

   1) The server process is started as an Emacs subprocess (e.g. via
      nrepl-start-server-process). Note that if a connection was
      established directly there won't be a server process.

   2) The server's process filter (nrepl-server-filter) detects the
      connection port from the first plain text response from the server and
      starts a communication process (socket connection) as another Emacs
      subprocess. This is the nREPL client process (nrepl-client-filter).
      All requests and responses handling happens through this client
      connection.

   3) Requests are sent by nrepl-send-request and
      nrepl-send-sync-request. A request is simply a list containing a
      requested operation name and the parameters required by the
      operation. Each request has an associated callback that is called once
      the response for the request has arrived. Besides the above functions
      there are specialized request senders for each type of common
      operations. Examples are nrepl-request:eval, nrepl-request:clone,
      nrepl-sync-request:describe.

   4) Responses from the server are decoded in nrepl-client-filter and are
      physically represented by alists whose structure depends on the type of
      the response. After having been decoded, the data from the response is
      passed over to the callback that was registered by the original
      request.

Please see the comments in dedicated sections of this file for more detailed description.

Defined variables (41)

nrepl--completed-requests-order
nrepl-aux
nrepl-client-disconnected-handler-function
nrepl-client-name
nrepl-client-version
nrepl-close-connection-handler-function
nrepl-completed-requests-max-size
nrepl-connect-params
nrepl-connected-hook
nrepl-disconnected-hook
nrepl-err-handler
nrepl-err-handler-function
nrepl-extra-eval-params-function
nrepl-force-ssh-for-remote-hosts
nrepl-format-buffer-name-function
nrepl-hide-special-buffers
nrepl-listening-inet-address-regexp
nrepl-log--special-keys
nrepl-log-messages
nrepl-message-buffer-max-size
nrepl-message-buffer-reduce-denominator
nrepl-message-colors
nrepl-message-faces
nrepl-messages-mode-abbrev-table
nrepl-messages-mode-hook
nrepl-messages-mode-map
nrepl-messages-mode-syntax-table
nrepl-namespace-handler-function
nrepl-need-input-handler-function
nrepl-ongoing-sync-request
nrepl-ops
nrepl-orphaned-output-function
nrepl-repl-buffer-name-template
nrepl-request-counter
nrepl-response-handler-functions
nrepl-session
nrepl-ssh-tunnel-timeout
nrepl-sync-request-timeout
nrepl-tooling-session
nrepl-use-ssh-fallback-for-remote-hosts
nrepl-versions

Defined functions (79)

nrepl--available-local-port
nrepl--clear-client-sessions
nrepl--clojure-only-error
nrepl--connection-eval-params
nrepl--container-published-port
nrepl--direct-connect
nrepl--dispatch-response
nrepl--eval-request
nrepl--init-capabilities
nrepl--init-client-sessions
nrepl--kill-process
nrepl--make-hidden-name
nrepl--mark-id-completed
nrepl--maybe-kill-server-buffer
nrepl--normalize-port
nrepl--port-alive-p
nrepl--port-from-file
nrepl--port-open-p
nrepl--port-string-to-number
nrepl--process-plist-put
nrepl--ssh-file-name-matches-host-p
nrepl--ssh-tunnel-args
nrepl--ssh-tunnel-connect
nrepl--ssh-tunnel-filter
nrepl--tramp-container-method
nrepl--unix-connect
nrepl-aux-info
nrepl-clear-messages
nrepl-client-filter
nrepl-client-sentinel
nrepl-connect
nrepl-decorate-msg
nrepl-error-buffer
nrepl-extract-ports
nrepl-kill-server-buffer
nrepl-local-host-p
nrepl-log--expand-button-mouse
nrepl-log--message-face
nrepl-log--pp-listlike
nrepl-log-error
nrepl-log-expand-all-buttons
nrepl-log-expand-button
nrepl-log-insert-button
nrepl-log-message
nrepl-log-pp-object
nrepl-make-buffer-name
nrepl-make-eval-handler
nrepl-make-response-handler
nrepl-messages-buffer
nrepl-messages-buffer-name
nrepl-messages-mode
nrepl-middleware
nrepl-next-request-id
nrepl-notify
nrepl-op-supported-p
nrepl-repl-buffer-name
nrepl-request:eval
nrepl-request:interrupt
nrepl-request:stdin
nrepl-send-eval-request
nrepl-send-request
nrepl-send-sync-request
nrepl-server-buffer-name
nrepl-server-filter
nrepl-server-p
nrepl-server-sentinel
nrepl-sessions
nrepl-show-messages
nrepl-start-client-process
nrepl-start-server-process
nrepl-sync-request
nrepl-sync-request:clone
nrepl-sync-request:close
nrepl-sync-request:describe
nrepl-sync-request:eval
nrepl-sync-request:ls-middleware
nrepl-sync-request:ls-sessions
nrepl-toggle-message-logging
nrepl-tunnel-buffer-name

Defined faces (0)