Keeping sage worksheets in sync across computers

I have been using Sage through the notebook interface. I usually keep my other working documents in sync using Dropbox. What do you think is an efficient way of working on notebooks from different computers? Currently I export and import .sws files. I thought of perhaps changing the DATA path to a folder on Dropbox, but I don't know enough about the internals of Sage to see if this would be a horrible idea.

I hate to own up to just how little I understand about IT, but I have tried to follow your instructions on adding a line to the .profile file; only "locate" in BASH cannot find any file with that name on my drive. I know I'm being dumb, sorry, but how do I find it and edit it please?

thank you, and sorry for my continuing ineptitude ... the only 2 things I can find anywhere on my computer with .bash in them are these: /Users/<myname>/.bash_history and /usr/share/emacs/22.1/etc/emacs.bash
which presumably are not what we want ...

Comments

Try creating some new worksheets and/or users on the original machine. If it syncs properly and you get the exact same worksheets on the other machine, then you are good.
I still think that using Dropbox for syncing might backfire some day.

As I've noted, you should use the environment variable `DOT_SAGENB` to point to the notebook directory (e.g., put `export DOT_SAGENB=/Users/.../Dropbox/Sage` in your .profile file if you're using bash).

One way would be to keep $HOME/.sage/sage_notebook.sagenb in sync. But not through dropbox. Dropbox doesn't care about symbolic links, whereas that sagenb directory is full of symbolic links. You could instead use something like unison.

Comments

Try this: on one machine, create a symbolic link to any file and allow Dropbox to sync. On the second machine you will actually see a *copy* of the symbolic link and not the symbolic link itself. This is a super useful feature because it allows you to have your content not confined to the Dropbox folder that is being synchronized.
However, this is not good for the notebook directory because that directory needs the symlinks, and not just copies of directories.

I think that the notebook directory only has symlinks to other files in the notebook directory, and in my experience, it respects these kind of links. So if the whole notebook directory is under the control of Dropbox, there is no problem. That is, try setting DOT_SAGENB to something like `Dropbox/.sagenb/`.

Apparently the solution of setting DOT_SAGENB to a directory inside Dropbox works fine. Thank you!
I have tried moving .sage to Dropbox and replacing .sage by a symlink, and for some reason it fails badly. Also I tried creating a symlink inside .sage called sage_notebook.sagenb pointing to a directory inside Dropbox and that also failed.