0

I'm a bit confused when writing code using the VC interface. After executing the following commands in the shell (committing a dummy file ~/test/file in a fresh git repo ~/test):

cd
mkdir test
cd test
git init
touch file
git add file
git commit -am "test"

I end up in a situation in which Emacs (vc-state "~/test/file") evaluate to unregistered but (vc-registered "~/test/file") reports the converse as it evaluates to t. What's wrong?

1 Answer 1

0

Apparently, I'm supposed to be on the buffer. Hence, the following snippet

(with-current-buffer 
  (find-file-noselect "~/test/file") 
  (vc-state "~/test/file"))

is evaluated to up-to-date.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.