Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

Re: Clearing all variables and definitions: i.e. "resetting" mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg128326] Re: Clearing all variables and definitions: i.e. "resetting" mathematica
  • From: dr DanW <dmaxwarren at gmail.com>
  • Date: Sun, 7 Oct 2012 01:31:14 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net
  • References: <k466qu$a8e$1@smc.vnet.net>

CleanSlate[] marks the state of memory on its first invocation.  Subsequent calls to CleanSlate[] reset the memory to that state.  This is why it should be the first thing run in your session.  I have it at the top of every notebook so Cntl-A Shift Enter gives me a clean run of the notebook.

There are caveats to using CleanSlate in your init.m file in version 6+ since the Paclet manager gets loaded after init.m.  Put the line:

DeclarePackage["Utilities`CleanSlate`",{"CleanSlate"}];

in your init.m, and put the line

CleanSlate[Verbose->False];

at the top of your notebooks.  DeclarePackage tees up the package to be loaded but it is not actually loaded until CleanSlate is evaluated in your notebook, which occurs after Paclet manager is installed.  This way, Paclet manager does not get wiped out by CleanSlate and you do not have ugly kernel crashes when opening Doc Center.  I lost a lot of work because of this until I figured out this fix.

Daniel




  • Prev by Date: Re: Assuming and Integrate
  • Next by Date: Re: Trouble Loading Packages...
  • Previous by thread: Re: Clearing all variables and definitions: i.e. "resetting" mathematica
  • Next by thread: Re: Clearing all variables and definitions: i.e. "resetting" mathematica