I want a notebook to automatically save after any cell is evaluated. I found that I should use the command
SetOptions[XXX, NotebookAutoSave -> True]
to do that, where XXX
should be referring to the current notebook. Unfortunately, I have been searching the web for half an hour now and was not able to find the command which refers to "this notebook". I tried $FrontEndSession
, $FrontEnd
and even $Notebooks
and nothing helped. Therefore, my question is:
What refers to "this notebook" within the SetOptions
command?
EvaluationNotebook[ ]
? $\endgroup$SetOptions[EvaluationNotebook[], NotebookAutoSave -> True]
, write a new cell afterwards and exectue it, the file stays unsaved. $\endgroup$nb = EvaluationNotebook[]; SetOptions[EvaluationNotebook[], NotebookAutoSave -> True]; Options[nb, NotebookAutoSave]
ReturnsTrue
$\endgroup$NotebookAutoSave is a notebook option which specifies whether the notebook should automatically be saved after each piece of output generated by evaluation in it.
$\endgroup$