Fork me on GitHub

<annoyed> emacs printing is so slow. pretty printing, printing long lines. i now can’t in practice use the dad-blasted[0] debugger because[1] its printing things internally. standing offer: 1% of my net worth to the person or persons who fix this, and yes i am serious and yes this is a legal contract </annoyed> [0] curse words bowdlerized [1] not actually an explanation, because i actually don’t know what the bug is. for years i could use the debugger, now i can’t.


@mfm Typical advice for slow printing is to clear the repl buffer cider-repl-clear-buffer and then evaluate. Is this the sayid debugger, or the cider-debug-defn-at-point debugger?


<annoyed, not at you> yeah i do cider-repl-clear-buffer after almost every evaluation because i have to </annoyed> i use cider-debug-defn-at-point


It sounds like you have some uncomfortably sized data, or have found a bug/limitation in CIDER/Emacs. I think they were talking about this issue in the #cider or #emacs channel last week. Good luck, it sounds a tricky one to solve.


<annoyed, not at you> it’s 10 megabytes of xml. peanuts. i can C-g to quit printing but not pathological font-locking (AFAICT). what the heck. for years i’ve sought a “`really-keyboard-quit`” for when C-g fails, and been told “C-g should work. if it doesn’t, it’s a bug.” there’s just no way that’s true. </annoyed>


thank you for listening. i like the philosophy “don’t wish it were easier, wish you were better,” but i’m still sensitive about the fact that my text editor can’t print arbitrarily-sized things fast. and sidenote: it got way better in nrepl 6. it’s emacs’s (not spacemacs’s, not nrepl’s or cider’s) fault.


I recall that font-locking can really slow down the output of very large data. I am also using a recent snapshot of Emacs, 27.0.50 which seems to be a bit faster but unsure if it will help in your case. Very stable though.


Is there a way to make Emacs only print to a REPL in a shell?


Can you elaborate? Are you running lein repl in eshell and connecting to it from Emacs via cider-connect ?


No, cider-jack-in


And would be interested in running shell in iTerm to work around the slow printing issue


The only way I know is to run the REPL in the terminal and call functions with large output in there. You can either cider-connect or just use Emacs as an editor and reload the namespace in the terminal repl to pick up changes.