1

Abstract

The goal is to use this to create an autoSave[evals_:5]:=Module[{}, save after set number of evaluations or edits have occured...]. I asked a similar question before as Can Mathematica be set to remind user to save after a set number of unsaved edits have occurred or after a set amount of time has passed? but only received a halfway satisfactory answer. This is no knock on those generous members who tried to answer this as the official documentation does not demonstrate such an obvious utility or it is well hidden if it does. However I did find an excellent short and sweet answer for an autoSave[...] based on seconds passed here (look for last answer entitled "From Mathematica Engineers:" Is there a notebook autosave frequency configuration? which I edited for flexibility:

autoSave[minutes_ : 10] := 
  Dynamic[Refresh[NotebookSave[]; DateString[], 
    UpdateInterval -> minutes 60]];
autoSave[]

Goal

The goal of finding counts of evaluations in a cell or number of edits is to use that to make autoSave[minutes_:10, evals_:3] more flexible by saving notebook based on minutes passed or number of evaluations since last save whichever comes first.

I hope I did not impart too many details leaving participants confused. The target solution only needs to count number of evaluations or edits since last save. I can do the rest but given to help participants target a solution compatible for such use.

Jules Manson
  • 2,457
  • 11
  • 19

0 Answers0