Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you cope with emacs halting on receiving big input?

Tags:

emacs

clojure

I am developing project in clojure using emacs cider under windows. And sometimes I have a problem that after accidently forgotten println function or on printing contents of big file Emacs stops responding (cursor and all key combinations doesn't work) and retire into oneself for processing that information to show it in repl. The only way to continue I know is to close program and open project files from scratch. And it is so simple to get in this trap.

Are there any other better solutions or configuration restrictions?

like image 285
Vladimir Protsenko Avatar asked Dec 15 '14 07:12

Vladimir Protsenko


1 Answers

Though this suggestion will not solve your problem completely, it can help you a little.

First, set *print-length* to some value to limit the number of items of each collection to be printed.

(set! *print-length* 10)

And use cider-connect instead of cider-jack-in. You should run lein repl in a separate console window, then run cider-connect to connect to the repl. Then you can evaluate some expressions in the console window.

It would be good if there's an option to limit the contents to be printed by number of characters, however, I couldn't find it.

like image 177
ntalbs Avatar answered Oct 17 '22 04:10

ntalbs