MathGroup Archive 2008

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

Search the Archive

Re: Did I trash Mathematica installation? -- CleanSlate caveat

  • To: mathgroup at smc.vnet.net
  • Subject: [mg94547] Re: Did I trash Mathematica installation? -- CleanSlate caveat
  • From: dr DanW <dmaxwarren at gmail.com>
  • Date: Tue, 16 Dec 2008 02:33:01 -0500 (EST)
  • References: <gi5jj0$pmp$1@smc.vnet.net>

On Dec 15, 6:46 am, Bill Rowe <readn... at sbcglobal.net> wrote:
> On 12/14/08 at 7:39 AM, Anthony.J.Mannu... at jpl.nasa.gov (amannuc1)
> wrote:
>
> >In exploring ways to clear variables in all unprotected contexts, I
> >executed this command: ClearAll["*`*"]
>
> I assume your goal here was to re-set things to be as they were
> when you first started your session without actually quitting
> and restarting Mathematica. If so, the package CleanSlate that
> can be found at
>
> <http://library.wolfram.com/infocenter/MathSource/4718/>
>
> is very useful for this purpose.

The CleanSlate package is still part of the standard distribution of
Mathematica, so you don't need to obtain it from MathSource.
CleanSlate is in the /AddOns/ExtraPackages/Utilities folder.

However, you need to use CleanSlate with care in version 6 and 7.
CleanSlate can wipe out the Paclet information, which can cause bad
things like a front end crash when you open the Help system.  Loosing
several hours of work because you opened a help file can be somewhat
annoying.

The best solution I have found is to put the following line in your
init.m file:

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

Once you start a new kernel, Execute the expression:

CleanSlate[]

I just put this line at the top of every notebook I have.  CleanSlate
[] basically resets the state of the memory back to the point of its
first execution, so you want it to be the first thing you execute upon
kernel startup.  If your first execution happens to be before the
front end and kernel has loaded the Paclets (as it would if you just
had Needs["Utilities`CleanSlate`"] in your init.m) than you get the
crashes I described before.

I still get the occasional front end crash, but I don't think I can
blame them on CleanSlate[].

I have requested a Paclet-safe version of CleanSlate from the Wolfram
developers, but have not heard back.

Daniel





  • Prev by Date: Re: contexts and functions
  • Next by Date: Re: Evaluate ?
  • Previous by thread: Re: Mathematica 7 weirdness
  • Next by thread: Re: Did I trash Mathematica installation? -- CleanSlate caveat