MathGroup Archive 2005

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

Search the Archive

Re: Why does mathematica randomly rewrite notebooks?

  • To: mathgroup at
  • Subject: [mg54879] Re: [mg54838] Why does mathematica randomly rewrite notebooks?
  • From: jmt <jmt at>
  • Date: Sat, 5 Mar 2005 01:34:24 -0500 (EST)
  • References: <>
  • Reply-to: jmt at
  • Sender: owner-wri-mathgroup at

A few remarks :

1 - CVS is line oriented, and lines MUST be less than 80 characters long, 
while Mathematica notebooks make no assumptions on line length. This might 
explain the changes you have noticed.

2 - Mathematica uses a cache, handling this cache in a versioning system can 
be viewed as non-sense. The company "Analog Insydes" discusses this point and 
provides a set of utilities for handling notebooks with CVS :
I have used these utilities up to version 5.0 without trouble of any kind.

3 - When notebooks contain some information that can be modified by the 
versioning system, the FrontEnd will report a warning. If this warning can 
oftenly be ignored, users might nevertheless have some doubt about the 
versioning strategy, and there is no way to avoid this with CVS.

4 - After using CVS for some years, I switched to subversion. This system is 
much more adequate for revision control than CVS is, especially for files 
like mathematica notebooks. I do not modify the notebooks before storing them 
in the repository (meaning I do NOT strip the cache off, even if this can be 
viewed as a loss of disk resource), because disk space is no longer a problem 
and because Mathematica projects seldom span over hundreds of files. If I 
have no experience in migrating a project from CVS to subversion, all new 
projects are now handled by subversion.


On 2005 03 04 11:07, Josef Karthauser wrote:
  > I'm trying to manage mathematica notebooks in a revision control system
  > and it is really bugging me that mathematica writes notebooks with
  > trivial changes seemingly randomly.  Does anyone know why?
  > Here's an example:
  > @@ -860,7 +862,7 @@
  >      \(Tuu[i, j] Xd[j] // ToFlavor[natbasis]\), "\n",
  >      \(\(\(% /.
  >        x : Xd[_] \[RuleDelayed] \(TransformIndexFlavor[
  > -            natbasis,
  > {\[Lambda]form}]\)[x]\)\(\n\)\(\[IndentingNewLine]\) +           
  > natbasis, {\[Lambda]form}]\)[x]\)\(\[IndentingNewLine]\)\(\n\) \)
  > (*\[IndentingNewLine]\(% // SumExpansion[natbasis /@ {i, j}]\) //
  > SumExpansion[\[Lambda]form[k]]\[IndentingNewLine]%%\[IndentingNewLine]*)
  > \), "\
  > The line starting with '-' shows what was there, and the line starting
  > with '+' shows that change that mathematica made at the last save.
  > Notice the at the order of the \n and the IndentingNewLine have been
  > reversed.  This appears to happen at random.
  > WRI, is there anything I can do to prevent this, or is it a bug/feature?
  > Joe
  > --
  > Josef Karthauser (joe at
  > FreeBSD (cvs meister, admin and hacker)
  > Physics Particle Theory (student)

Puissance d'un coton-tige : deux ouates ...

  • Prev by Date: Re: Why does mathematica randomly rewrite notebooks?
  • Next by Date: Re: Re: Re: Re: Bug in Import?
  • Previous by thread: Re: Why does mathematica randomly rewrite notebooks?
  • Next by thread: Re: Re: Why does mathematica randomly rewrite notebooks?