>> Maybe it's not working since vc-dir-refresh already doesn't use >> vc-run-delayed to run vc-dir-refresh-files and vc-dir-update. > > I don't know if that's the way to determine this. Doing both calls in the > callback is a good approach which is easy for vc-dir-refresh to > take. dired-vc-next-action couldn't do that, so vc-run-delayed could be > the next best option. Or not, of course. Actually, vc-run-delayed can't be used because it's fired when the first vc-process finishes, but vc-dir runs at least 4 processes in sequence. So the only available callback is in vc-dir-refresh, and only when `more-to-come' is nil. > Here's a slight modification: create both the hook and a function inside > the vc-dir package (let's call it vc-dir-mark-files) which will accept a > list of file names and mark them. dired-vc-next-action will then call it > from the hook. All this works fine with the patch below. The only part of the patch that I don't like is too much code in the first part of vc-dir-mark-files that just resolves discrepancy between Dired and VC-Dir: dired-get-marked-files returns directory names without the trailing slash, but vc-dir-fileinfo->name returns directories with the trailing slash.