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

MathGroup Archive 2009

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

Search the Archive

Re: Wolfram Workbench source editor and corrupted file

  • To: mathgroup at smc.vnet.net
  • Subject: [mg97141] Re: Wolfram Workbench source editor and corrupted file
  • From: David Bailey <dave at removedbailey.co.uk>
  • Date: Fri, 6 Mar 2009 04:25:36 -0500 (EST)
  • References: <goo8dt$t3s$1@smc.vnet.net>

Kelly, Mark C wrote:
> Hello, I have a simple question.
> 
> I have an important Mathematica Notebook (.nb) file which became corrupted. 
> The end of it is missing (incomplete), and I cannot seem to salvage the 
> contents yet. 
> 
> I read that I could use the Source Editor in Wolfram-Workbench to 
> examine the corrupted file, and make usable the "complete" parts which
> are still there. 
> 
> However, it is not apparent how to "see" (view/edit) the NoteBook file
> in Workbench. I have imported it, but I cannot see it...I just see a
> 4-line long bit.  
> 
> But using a text editor I see that there are really thousands of lines.
> 
> My question is:  how can I view and edit the nb file, so as to "fix" it
> to make parts of it usable again? 
> 
> Maybe vim or Notepad+ or the like are preferable to the WW SourceEditor? 
> 
> 
> Thank you for any info or assistance,
> 
> /Mark
> 
> 
> -------------------
> Mark C Kelly, PhD
> Scientist, Ris=F8/DTU
> 
Indeed - I would use a simple text editor - whichever you are most 
familiar with - ideally one that can do bracket matching!

A notebook is a text file containing a Mathematica structure, itself 
containing a list of cells and a collection of options. This is followed 
by some cache information which may be discarded, as it will be 
recreated by Mathematica.

First, don't work on the corrupted file itself - use a copy, because it 
is easy to mess it up further!

Clean up the cell structure, and since your file is truncated, you 
should add the options from a similar notebook. This is easy in 
principle, but if you make a syntax error, Mathematica will not help much!

Once you have a file that will load, save it back to recreate the cache 
information.

David Bailey
http://www.dbaileyconsultancy.co.uk


  • Prev by Date: Re: Huge memory consumption of GIF.exe
  • Next by Date: Re: Re: GraphComplement doesn't work in 7.0
  • Previous by thread: Re: Wolfram Workbench source editor and corrupted file
  • Next by thread: Re: Wolfram Workbench source editor and corrupted file