Re: git + Mathematica = corrupt notebooks
- To: mathgroup at smc.vnet.net
- Subject: [mg81601] Re: git + Mathematica = corrupt notebooks
- From: ragfield <ragfield at gmail.com>
- Date: Sat, 29 Sep 2007 02:23:59 -0400 (EDT)
- References: <fdi6v9$rss$1@smc.vnet.net>
On Sep 28, 1:28 am, Andy Neitzke <neit... at ias.edu> wrote: > I'm using Mathematica 6.0.1 on Linux together with the version control > system "git". If I > > 1) open some notebook foo.nb, > > and then > > 2) use git to checkout a different revision of the repository, causing the > disk file foo.nb to be modified, > > rather than warning me that foo.nb has been changed on disk, Mathematica > appears to keep working as if nothing had happened. This is fine with me, > although I believe it is not the intended behavior. The real problem is that > after doing 2), when I try to save the notebook, the interface behaves as if > it has been saved (e.g. the * in the titlebar indicating a modified file > disappears) but does not modify the disk file foo.nb. Moreover, if I try to > save under a different name foo2.nb, then a new file foo2.nb is created, but > that file contains a corrupt notebook. > > I would be very curious to know whether anyone else has encountered this > problem and/or knows a workaround. It appears Mathematica has become confused by the fact that a different app swapped the file out from underneath it. You might have luck setting PrivateNotebookOptions->{"SafeFileSave"->"TempFile"} in the Option Inspector. -Rob