Hi. Assume that I want to send some information to the CIDER REPL before every evaluation. More concretely, I want to extend CIDER so that it will send to the REPL process the whole contents of the currently edited buffer (as a String), just before any piece of code is evaluated. • Is it a bad idea for some reason? • Is there a hook for doing something before every evaluation? (couldn't find one)
Oh, I need to create an up-to-date html page that shows the code of the whole namespace, every time we the user evaluates anything (working on the next version of the Notespace tool).
I don't think there's a hook for this, but there's some functionality that auto-evals the ns
form before eval, that you can potentially copy/extend for your purposes.
See https://docs.cider.mx/cider/1.1/usage/code_evaluation.html#basic-evaluation
That sounds like you’re typing into the repl buffer instead of typing into the file buffer which is usually recommended
Thanks @jumar! I'm typing into the file, but want the REPL to know about the exact file contents.
Thanks @bozhidar! I'll look.