File: cider-eval.el.html

This file contains CIDER's interactive evaluation (compilation) functionality.

Although Clojure doesn't really have the concept of evaluation (only compilation), we're using everywhere in the code the term evaluation for brevity (and to be in line with the naming employed by other similar modes).

This files also contains all the logic related to displaying errors and evaluation warnings.

Pretty much all of the commands here are meant to be used mostly from cider-mode(var)/cider-mode(fun), but some of them might make sense in other contexts as well.

Defined variables (21)

cider--clojure-1.10-errorRegexp matching error messages triggered in compilation / read / print phases.
cider--clojure-warningRegexp matching various non-error messages, e.g. reflection warnings.
cider-auto-inspect-after-evalControls whether to auto-update the inspector buffer after eval.
cider-auto-jump-to-errorControl the cursor jump behavior in compilation error buffer.
cider-auto-select-error-bufferControls whether to auto-select the error popup buffer.
cider-auto-track-ns-form-changesControls whether to auto-evaluate a source buffer’s ns form when changed.
cider-clojure-compilation-error-phasesError phases which will not cause the ‘*cider-error*’ buffer to pop up.
cider-clojure-compilation-regexpA few example values that will match:
cider-comment-continued-prefixThe prefix to use on the second and subsequent lines of commented output.
cider-comment-postfixThe postfix to be appended after the final line of commented output.
cider-comment-prefixThe prefix to insert before the first line of commented output.
cider-compilation-regexpSpecifications for matching errors and warnings in Clojure stacktraces.
cider-eval-registerThe text register assigned to the most recent evaluation result.
cider-file-loaded-hookList of functions to call when a load file has completed.
cider-inline-error-message-functionA function that will shorten a given error message,
cider-interactive-eval-output-destinationThe destination for stdout and stderr produced from interactive evaluation.
cider-interactive-eval-overrideFunction to call instead of ‘cider-interactive-eval’.
cider-previous-eval-contextThe previous evaluation context if any.
cider-save-file-on-loadControls whether to prompt to save the file when loading a buffer.
cider-show-error-bufferControl the popup behavior of cider stacktraces.
cider-to-nrepl-filename-functionFunction to translate Emacs filenames to nREPL namestrings.

Defined functions (79)

cider--analyze-last-stacktrace(CALLBACK)
cider--clear-compilation-highlights()
cider--display-error-unobtrusively(BUFFER ERR)
cider--emit-interactive-eval-output(OUTPUT REPL-EMIT-FUNCTION)
cider--eval-in-context(BOUNDS &optional GUESS)
cider--eval-last-sexp-to-repl(SWITCH-TO-REPL REQUEST-MAP)
cider--file-string(FILE)
cider--find-last-error-location(ERROR-INFO)
cider--goto-expression-start()
cider--guess-eval-context()
cider--handle-err-eval-response(RESPONSE)
cider--handle-stacktrace-response(CAUSES EX-PHASE SOURCE-BUFFER)
cider--insert-closing-delimiters(CODE)
cider--make-fringe-overlays-for-region(BEG END)
cider--matching-delimiter(DELIMITER)
cider--prep-interactive-eval(FORM CONNECTION)
cider--prompt-and-insert-inline-dbg()
cider--quit-error-window()
cider--render-stacktrace-causes(CAUSES &optional ERROR-TYPES IS-COMPILATION REPL)
cider--shorten-error-message(ERR)
cider--show-error-buffer-p()
cider-clear-compilation-highlights(&optional ARG)
cider-clojure-compilation-error-phases()
cider-default-err-eval-handler()
cider-default-err-eval-print-handler()
cider-default-err-handler(&optional BUFFER)
cider-default-err-op-handler(BUFFER)
cider-emit-interactive-eval-err-output(OUTPUT)
cider-emit-interactive-eval-output(OUTPUT)
cider-emit-into-color-buffer(BUFFER VALUE)
cider-eval-all-files(ARG1 ARG2)
cider-eval-buffer(&optional ARG1 ARG2 ARG3)
cider-eval-defun-at-point(&optional DEBUG-IT)
cider-eval-defun-to-comment(&optional INSERT-BEFORE)
cider-eval-defun-up-to-point(&optional OUTPUT-TO-CURRENT-BUFFER)
cider-eval-dwim(&optional DEBUG-IT)
cider-eval-file(ARG1 &optional ARG2)
cider-eval-last-sexp(&optional OUTPUT-TO-CURRENT-BUFFER)
cider-eval-last-sexp-and-replace()
cider-eval-last-sexp-in-context(GUESS)
cider-eval-last-sexp-to-repl(&optional PREFIX)
cider-eval-list-at-point(&optional OUTPUT-TO-CURRENT-BUFFER)
cider-eval-ns-form(&optional UNDEF-ALL)
cider-eval-pprint-with-multiline-comment-handler(BUFFER LOCATION COMMENT-PREFIX CONTINUED-PREFIX COMMENT-POSTFIX)
cider-eval-print-handler(&optional BUFFER)
cider-eval-print-last-sexp(&optional PRETTY-PRINT)
cider-eval-print-with-comment-handler(BUFFER LOCATION COMMENT-PREFIX)
cider-eval-region(START END)
cider-eval-sexp-at-point(&optional OUTPUT-TO-CURRENT-BUFFER)
cider-eval-sexp-at-point-in-context(GUESS)
cider-eval-sexp-up-to-point(&optional OUTPUT-TO-CURRENT-BUFFER)
cider-extract-error-info(REGEXP MESSAGE)
cider-find-property(PROPERTY &optional BACKWARD)
cider-handle-compilation-errors(MESSAGE EVAL-BUFFER &optional NO-JUMP)
cider-insert-eval-handler(&optional BUFFER BOUNDS SOURCE-BUFFER ON-SUCCESS-CALLBACK)
cider-interactive-eval(FORM &optional CALLBACK BOUNDS ADDITIONAL-PARAMS)
cider-interactive-eval-handler(&optional BUFFER PLACE)
cider-jump-to-compilation-error(&optional ARG RESET)
cider-kill-last-result()
cider-load-all-files(DIRECTORY UNDEF-ALL)
cider-load-all-project-ns()
cider-load-buffer(&optional BUFFER CALLBACK UNDEF-ALL)
cider-load-file(FILENAME &optional UNDEF-ALL)
cider-load-file-handler(&optional BUFFER DONE-HANDLER)
cider-maybe-insert-multiline-comment(RESULT COMMENT-PREFIX CONTINUED-PREFIX COMMENT-POSTFIX)
cider-new-error-buffer(&optional MODE ERROR-TYPES DONT-SHOW)
cider-popup-eval-handler(&optional BUFFER BOUNDS SOURCE-BUFFER)
cider-pprint-eval-defun-at-point(&optional OUTPUT-TO-CURRENT-BUFFER)
cider-pprint-eval-defun-to-comment(&optional INSERT-BEFORE)
cider-pprint-eval-last-sexp(&optional OUTPUT-TO-CURRENT-BUFFER)
cider-pprint-eval-last-sexp-to-comment(&optional INSERT-BEFORE)
cider-pprint-eval-last-sexp-to-repl(&optional PREFIX)
cider-pprint-form-to-comment(FORM-FN INSERT-BEFORE)
cider-read-and-eval(&optional VALUE)
cider-read-and-eval-defun-at-point()
cider-tap-last-sexp(&optional OUTPUT-TO-CURRENT-BUFFER)
cider-tap-sexp-at-point(&optional OUTPUT-TO-CURRENT-BUFFER)
cider-undef()
cider-undef-all(&optional NS)

Defined faces (2)

cider-error-highlight-faceFace used to highlight compilation errors in Clojure buffers.
cider-warning-highlight-faceFace used to highlight compilation warnings in Clojure buffers.