0

In VC Directory Mode, how do I ignore multiple files?

My use case is that I have a LaTeX repository (in SVN, but that should not matter) with over 15 *.aux files in a subdirectory.

Attempt 1

Mark a couple of files in VC Directory Mode, then run C-x v G (vc-ignore). The command still asks me for a file, so it does not use the marks.

Attempt 2

Run C-x v G (vc-ignore) and fill in a Wildcard, e.g., sections/*.aux. This does not exclude any files from the VC Directory Mode buffer (refreshed with g), but it does add the wildcard to SVN. I.e., when I do svn propedit svn:ignore . then a buffer opens with the sections/*.aux line in there.

  • You could just give it a globbed file name (as you've written, i.e. *.aux). Or if you only want some specific files, then, I'm guessing that C-x v d would list the version-controlled directory the same way Dired would, then you could mark and operate on multiple files. – wvxvw Mar 28 '16 at 6:18
  • @wvxvw I'm able to make file in VC Directory mode, but vc-ignore does not act on them. I'm adding the fact that I also tried that option to my original question. – Wouter Beek Mar 28 '16 at 8:50
1

Indeed, for some reason vc-dir-ignore operates only on a single file. But this should be easy to remedy:

(defun my/vc-ignore-multiple-files ()
  (interactive)
  (mapcar 'vc-ignore (vc-dir-marked-files)))

(define-key vc-dir-mode-map "a" 'my/vc-ignore-multiple-files)

Now marking several files and then pressing a will ignore all of them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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