Hello, all. I wonder techniques to perform versioning in TeXmacs. I mistakenly deleted part of my article and I find it difficult to recover, which lead me to think of recording the history continuously.
Versioning in TeXmacs
TeXmacs supports git and svn. So if you have your file managed by one of the two then you can commit the changes within the program by using the “Versioning Tool”. There is some description in the Help.
And of course in “The Jolly Writer”
Thanks. Now I am trying (I have no prior experience of versioning). It looks as simple as git init
and then git add **/*.tm
to start with.
Yes. Git is really simple (if you understand the underlying logic) and powerful. Don’t forget git commit
The TeXmacs documentation says that it supports commit from the menu Version
. However, I only see History
, Global status
, Global log
, Compare with
, Move
and Grain
. No commit. I can do it from the command line, but is that normal?
I don’t see a commit option either.
You could check out SparkleShare (https://www.sparkleshare.org/) for automatic syncing to a git repository.
Indeed. I’ve just checked the scheme code and the interface with git is not complete. You can use svn however which seems to work. It would be nice if someone would finish up the git interface. @darcy what is the current status? Were you involved in writing it?
I did not implement Git Commit on purpose.
I prefer git commit
on the command line.
I think that versioning needs to be highlighted more. Maybe an article in the blog—which could be similar to the help page, but contain some pictures.
For svn is implemented, I think is also important to have for git. I will try to complete the code as soon as I have some time.
I am not able to make git work with TeXmacs.
After git init
and an initial git commit
, if I do Global status from the menu I do not get an of the information that I get issuing status
from the command line. TeXmacs finds that the directory is not under version control.
What happens?
Separately from that, if I do Compare with -> older version
- differences in the preamble get accumulated (<\version-both>) and I do not see the way to select one or the other version there.
- If I modify the properties of an ornament through the “wrench” icon, the modifications are saved in
<\initial>
, but the version control does not see them: example
<\initial>
<\collection>
<associate|ornament-border|3ln>
<associate|ornament-shadow-color|dark green>
<associate|ornament-sunny-color|dark green>
<associate|preamble|false>
It looks complicated to get the versioning code to figure out what to consider and what not inside the parts automatically generated by TeXmacs, but perhaps one needs to look only inside <\initial>
(not <\references>
or <\auxiliary>
)?
Giovanni, indeed git support is still in the workings. You cannot yet use git from within TeXmacs even if some partial functionality seems to work (mostly history, log, comparison). Anyway I would suggest to wait. With Joris we are trying right now to improve this.
As for the comparison behaviour, I’m not an expert. Especially for the initial collection for which indeed we do not have access from within the editor. I guess is not obvious how to implement the conflict resolution interface there. Maybe a basic solution would be to look at the document in source mode and select the various versions there.
Ok. I haven’t yet tried Subversion. When this is further developed, I think it will deserve to be highlighted; I have read many times that “being compatible with version control software” is a strong advantage of text-based file formats, so it will be good to show this for TeXmacs too.
I thought about the commit functionality.
It is easy for git commit on a single file. But for the git workspace, we need to add the files to commit first and then commit. It is a bit complicated to implement a UI for selecting the files to commit.
That’s why I decided not to implement the git commit menu.