Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: Why does mathematica randomly rewrite notebooks?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg54907] Re: Why does mathematica randomly rewrite notebooks?
  • From: David Bailey <dave at Remove_Thisdbailey.co.uk>
  • Date: Sun, 6 Mar 2005 00:55:57 -0500 (EST)
  • References: <d09cbf$cvv$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

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 tao.org.uk)	       http://www.josef-k.net/
> FreeBSD (cvs meister, admin and hacker)     http://www.uk.FreeBSD.org/
> Physics Particle Theory (student)   http://www.pact.cpes.sussex.ac.uk/
I am not sure if this will fix your problem, but there is a global 
option ShowShortBoxForm, which I always set to False. In that state, 
notebooks are written with normal RowBox notation rather than using the 
backslash notation for everything. If you are going to read the 
notebooks with anything other than Mathematica (which you are) this is a 
great help.

I don't suppose notebooks were really designed with revision control in 
mind. I don't know if anyone has explored the idea at all, but I think 
there are a lot of issues here. For example, if you are going to run 
difference comparisons between different versions of a notebook, that is 
going to be really hard to read! Perhaps there is a project for someone 
here!

David Bailey
dbaileyconsultancy.co.uk


  • Prev by Date: Re: Re: Why does mathematica randomly rewrite notebooks?
  • Next by Date: Re: Rearranging a data array containing calendrical as well as data entries.
  • Previous by thread: Re: Re: Re: Why does mathematica randomly rewrite notebooks?
  • Next by thread: Re: Re: Why does mathematica randomly rewrite notebooks?