Is there a way to clear the OCaml REPL buffer in Tuareg mode for Emacs? I’m going to use the REPL for teaching, and being able to clear the REPL buffer and show a single thing on the screen would be very helpful.
if you want to erase the buffer while keeping in memory the previous let bindings, you could bind this to your choice of key
(let ((inhibit-read-only t)) (erase-buffer))
EDIT: this is better
comint-clear-buffer
It turns out comint-clear-buffer is by default bound to C-c M-o.
Thank you!
that’s good to know 