I'm looking for a way to reference certain cells when opening a saved notebook. That is, assume I ran some commands in a notebook, got some output, saved the notebook, then reopened it in a new kernel and wanted point to information in specific cells.
As an example let's say that I save the following notebook contents
In:= f[x_]:=g[x,h[x]] In:= f Out= g[3,h] In:= r[x_]:=f[x]+g[x] In:= r Out= g[3,h]+g
which I then save. Upon reopening this notebook in a new kernel, all the information of the cells will be there in the respective cells and groupings, but (as far as I can discern from the documentation) with no easy method for referencing. If I wanted the
g[3,h] cell data before I closed the original kernel I could just use
Out. Is there a method to achieve this relative ease of cell referencing when reopening the notebook in a new kernel?
The reason I'm looking for this sort of functionality is I want to be able to detect when the output cells differ from their saved values when re-evaluating the notebook in a new kernel. I do this to ensure that custom functions from other notebooks/packages aren't exhibiting anomalous behavior when changes are made, basically checking the newest output matches the last known "good" output.
DumpSavethan on the
Globalcontext, please share. $\endgroup$
DumpSave, could you just save
Outinstead of the entire