Re: making something autoexecute before normal execution
- To: mathgroup at smc.vnet.net
- Subject: [mg116716] Re: making something autoexecute before normal execution
- From: John Fultz <jfultz at wolfram.com>
- Date: Fri, 25 Feb 2011 06:33:38 -0500 (EST)
On Thu, 24 Feb 2011 06:23:14 -0500 (EST), Josh Burkart wrote: > hello, > > i'm interested in making an autosave package (since i'm always losing my > work when mathematica crashes! argh). my idea was to force the kernel to > execute an autosave type function, which would be no problem to code, > every time the user basically presses ctrl+return to send stuff to the > kernel to execute. > > i know there is, for example, the $NewSymbol system function which, if > set by the user, is always run whenever a new symbol is encountered. is > there something similar for whenever the kernel executes anything? > obviously it would have to be only when a user actually hits ctrl+return > or the like, not at every level of the execution stack! > > any help appreciated! > thanks, > josh b. There is an option in the front end (in the Option Inspector) called NotebookAutoSave which, if set to True on a notebook, will do exactly what you're asking for. It has the somewhat silly behavior of causing beeps every time you do evaluations in a never-before-saved notebook, so you probably wouldn't want to set it globally, but it's certainly easy enough to set it on any given notebook. Sincerely, John Fultz jfultz at wolfram.com User Interface Group Wolfram Research, Inc.