I had a long running shell session in an emacs and the emacs crashed.  I was running some complex bash scripts that had failed, but I was going to look at it today.  But today the emacs crashed before I did.  I'd like to guard against this in the future by having the contents of my shells saved automatically into a file in ~/.emacs.d/, perhaps.

I've googled and looked through the comint source and I don't see this feature.

Any ideas on this?  I'm willing to do some work to add it, if it's not too hard.

Kevin