MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: making something autoexecute before normal execution

  • To: mathgroup at
  • Subject: [mg116825] Re: making something autoexecute before normal execution
  • From: David Bailey <dave at>
  • Date: Tue, 1 Mar 2011 05:24:24 -0500 (EST)
  • References: <ik84g4$n6q$>

On 25/02/2011 11:40, John Fultz wrote:
> 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
> User Interface Group
> Wolfram Research, Inc.
Of course, ideally the FrontEnd would never crash, so autosave would 
never be necessary. I don't use autosave myself, because it is possible 
to make a catastrophic mistake - such as deleting all cells - that is 
then autosaved over the file (I assume it works that way, I have never 
used it).

However, I find that there are a lot of circumstances in which 
Mathematica seems frozen - too frozen to quit the kernel via the menu - 
where it is possible to recover the FrontEnd by killing the kernel 
process some other way. I have an icon to do this using the Windows 
taskkill.exe program. Very occasionally this simply crashes the 
FrontEnd, but I would say it is 95% successful.

David Bailey

  • Prev by Date: Re: Vector Runge-Kutta ODE solver with compilation?
  • Next by Date: Finding a good surface fitting function
  • Previous by thread: Re: Vector Runge-Kutta ODE solver with compilation?
  • Next by thread: Re: making something autoexecute before normal execution