Fork me on GitHub
#cider
<
2017-05-22
>
oskarkv15:05:50

I'm trying to bind (clojure.tools.namespace.repl/refresh) to a keyboard shortcut. I managed with cider-interactive-eval, but the problem is that the "minibuffer" or whatever it's called that comes up isn't big enough to display the complete output if there was an error. Can I make the output go to the repl instead?

oskarkv15:05:01

Some output goes to the repl, but a stacktrace comes up in the minibuffer and it's not big enough.

dpsutton15:05:47

in cider-interaction.el there's a function cider-refresh that should do what you want

dpsutton15:05:21

and it's got its own refresh-response-hanlder to do exactly what you want

dpsutton15:05:44

and you can hook up pre and post functions to run, and some other options

dpsutton15:05:17

"Reload modified and unloaded namespaces on the classpath.

With a single prefix argument, or if MODE is `refresh-all', reload all
namespaces on the classpath unconditionally.

With a double prefix argument, or if MODE is `clear', clear the state of
the namespace tracker before reloading.  This is useful for recovering from
some classes of error (for example, those caused by circular dependencies)
that a normal reload would not otherwise recover from.  The trade-off of
clearing is that stale code from any deleted files may not be completely
unloaded.

With a negative prefix argument, or if MODE is `inhibit-fns', prevent any
refresh functions (defined in `cider-refresh-before-fn' and
`cider-refresh-after-fn') from being invoked."