Dear vc-cvs.el maintainer, It is sometimes useful to have unregistered subdirectories in a directory which is under the control of CVS. However, current implementation of vc-cvs-dir-state in vc-cvs.el (of Emacs 21.2) does not work if a directory contains unregistered subdirectories. Here is more useful implementation of vc-cvs-dir-state. It checks if a given subdirectory is under the control of CVS or not. By using this, vc-directory never get fails even if a directory contains unregistered subdirectories. Masanobu UMEDA ---------------------------------------------------------------------- (defun vc-cvs-dir-state (dir) "Find the CVS state of all files in DIR." ;; Get the state only if DIR is under the control of CVS. (if (file-readable-p (expand-file-name "CVS/Entries" dir)) (if (vc-cvs-stay-local-p dir) (vc-cvs-dir-state-heuristic dir) (let ((default-directory dir)) ;; Don't specify DIR in this command, the default-directory is ;; enough. Otherwise it might fail with remote repositories. (with-temp-buffer (vc-do-command t 0 "cvs" nil "status" "-l") (goto-char (point-min)) (while (re-search-forward "^=+\n\\([^=\n].*\n\\|\n\\)+" nil t) (narrow-to-region (match-beginning 0) (match-end 0)) (vc-cvs-parse-status) (goto-char (point-max)) (widen)))))))