Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • 5
    $\begingroup$ Thanks, that seems be close enough for most purposes (although it would be nice to store cached data as well). To be sure I don't miss anything out, I've tried DumpState["test.mx",Evaluate[$ContextPath]] and even things like %2 work 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). $\endgroup$ Commented Jan 18, 2012 at 8:58
  • $\begingroup$ @celtschk Glad I could help! Thanks for the accept. $\endgroup$ Commented Jan 18, 2012 at 9:45
  • $\begingroup$ Correct me if I'm wrong, but this method can not reinitiate the state of the random generator to have the exact same state it was when one DumpSave-d. For that, you have to explicitly specify random=whatever;SeedRandom[random] at the start of your code. $\endgroup$ Commented Jan 18, 2012 at 9:49
  • $\begingroup$ @Istvan I think you are right, and this is one of the things which will be lost, unless you dig deep enough into the system and save also the context where this state is stored. This will be, however, a fragile and point solution. $\endgroup$ Commented Jan 18, 2012 at 9:57
  • $\begingroup$ @IstvánZachar: I've just tried it out, and you are right. Too bad that it's obviously not stored in System` . $\endgroup$ Commented Jan 18, 2012 at 10:38