If I save a notebook, I only save what I see. That is, if I close Mathematica and reopen the notebook later, all previous calculations are lost, except for those things I've output. Now I know that you can save single definitions (and their dependencies) with Save, however is there a way to save the whole kernel state (preferably including internally cached data, e.g. from FullSimplify) so that when I reload both notebook and kernel state, I can continue to work exactly where I left off?
If there's no ready solution for it:
From what I understand, the explicit definitions are stored in UpValues, DownValues and OwnValues; also Options and Attributes affect evaluation, and therefore would have to be saved. However, those all expect an argument specifying a symbol to give information about. Is there any way to get a complete set of them? And would saving those actually suffice, or is there something else needed, too? Also, is there some way to explicitly get at internal cached information (it doesn't need to be in an understandable format, just being able to save and reload it would be sufficient)?
DumpState["test.mx",Evaluate[$ContextPath]]and even things like%2work correctly (the only problem is that the "Out[i]" labels are not saved with the notebook so that it's not obvious which number belongs to a given cell). – celtschk Jan 18 '12 at 08:58ifI'm wrong, but this method can not reinitiate the state of the random generator to have the exact same state it was when oneDumpSave-d. For that, you have to explicitly specifyrandom=whatever;SeedRandom[random]at the start of your code. – István Zachar Jan 18 '12 at 09:49System`. – celtschk Jan 18 '12 at 10:38