In the info on vc (Version control and the mode line) the emacs manual says:
The character between the back-end name and the revision ID
indicates the version control status of the file. `-' means that the
work file is not locked (if locking is in use), or not modified (if
locking is not in use). `:' indicates that the file is locked, or that
it is modified.
However at the shell a git status says
# On branch master
nothing to commit (working directory clean)
If I close and reopen the file the colon becomes a -
But I get a message:
`working-revision' not found: using the old `workfile-version' instead.
Wrong type argument: stringp, nil
So vc can be assumed to be a broken I guess?
I had a similar problem. The cause was an old git.el I had lying
around. You should check if vc-git works when you turn off all
customization, i.e. with emacs -Q. Another possible source of old git
support files might be your OS. Debian and friends automatically
install git support for emacs along with the git package. Loading it
is disabled here for Emacs 23, though (Ubuntu Jaunty).
HTH,
Anselm
--
Anselm Helbig
mailto:anselm.helb...@googlemail.com
Thanks! That tracked it --that is vc works with emacs -Q and fails
without.
But now how to track where the problem is?
I can hardly use emacs with -Q !!
Well, try emacs -q (no .emacs loading) and emacs --no-site-file (no
loading of site-specific customizations). What does
M-x locate-library vc-git
give you?
Hi!
>> Thanks! That tracked it --that is vc works with emacs -Q and fails
>> without.
>> But now how to track where the problem is?
>> I can hardly use emacs with -Q !!
>
> Well, try emacs -q (no .emacs loading) and emacs --no-site-file (no
> loading of site-specific customizations). What does
>
> M-x locate-library vc-git
>
> give you?
And also check `M-x list-load-path-shadows' to find which external elisp
files shadow emacs builtins.
Bye,
Tassilo
Thanks Anselm & Tassilo
The specific info from Anselm -- checkout vc-git.el -- helped me track
the culprit. I had been trying it earlier; it neither worked and also
evidently broke the working vc. When I renamed it out of the way the
problem (seems) to have gone.
But Tassilo's method is the way of tracking down such problems in the
first place so thanks.
Sorry Junio I should have checked.
Actually I had earlier checked.
Then I tried many emacs-git options, none of which worked.
Then I upgraded my emacs to 23 in which the vc is upgraded for dvses like git.
Time passed and I forgot what I had found, made worse by the fact that
sometimes I'm on windows and sometimes on linux and the 'working'
status of different things is quite different.
However the point is that I was not loading the older vc-git.el at
all. emacs was getting the wrong one.
It may be better if vc were hardened so that it gets its own vc-*.els
in preference to random stuff lying on the load-path.