I was thinking along the lines of SLIME, where your evaluated code is preserved by the editor. Sorry for being unclear. Been a long time since I used a raw REPL.
I'm a fellow emacs user, I use SLIME-like functionality practically every day. My "sketchbooks" are my ~/workspace folder and my github account. I have some older "sketchbooks" in the form of tarballs of my ~/workspace folders from old machines.
I thought that basically everyone who wrote software had similar collections of little projects, finished and un-finished, until about a year ago when it came up in discussion with a few other devs who didn't.