2

I have Subversion exclusive-locking enabled to increase SVN performance. If I commit a file the svn command line client opens Emacs so I can enter a commit message. But Emacs VC tries to determine the SVN status of the commit message file svn-commit.tmp with the command svn --non-interactive status -v svn-commit.tmp. That blocks because the commit command has the exclusive lock and I have to wait for the status timeout (10 seconds) until I can type my commit message. How can I disable version control for *.tmp files in Emacs to prevent that wait time? I didn't find an option to exclude files from VC.

2
  • Does adding *.tmp to svn:ignore help?
    – nega
    Mar 28, 2019 at 19:54
  • @nega It does not help to add *.tmp to svn:ignore, Emacs VC will run svn status for any file it opens.
    – holger
    Mar 29, 2019 at 15:39

1 Answer 1

1

You can override VC handled backends for specific file based on filename:

(defun my/find-file-hook ()
  (when (string-match-p "^svn-commit.*tmp$" (file-name-nondirectory (buffer-file-name)))
    (set (make-local-variable 'vc-handled-backends) nil)))

(add-hook 'find-file-hook #'my/find-file-hook)

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.