Function: projectile--watch-keep-file-p

projectile--watch-keep-file-p is a byte-compiled function defined in projectile.el.

Signature

(projectile--watch-keep-file-p PROJECT FILE)

Documentation

Return non-nil when FILE (relative to PROJECT) belongs in the file list.

Runs FILE through the same dirconfig and globally-ignored filtering the native and hybrid indexers use, and respects dirconfig + keep entries. VCS-level ignores (e.g. .gitignore) are not consulted, so under alien indexing a watched project can temporarily gain entries the VCS would have excluded, until the next full re-index.

Source Code

;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile--watch-keep-file-p (project file)
  "Return non-nil when FILE (relative to PROJECT) belongs in the file list.
Runs FILE through the same dirconfig and globally-ignored filtering the
native and hybrid indexers use, and respects dirconfig `+' keep
entries.  VCS-level ignores (e.g. `.gitignore') are not consulted, so
under alien indexing a watched project can temporarily gain entries the
VCS would have excluded, until the next full re-index."
  (let ((default-directory project))
    (and (projectile-remove-ignored (list file))
         (let ((dirs (projectile-get-project-directories project)))
           (or (member project dirs)
               (let ((absolute (expand-file-name file project)))
                 (seq-some (lambda (dir) (string-prefix-p dir absolute))
                           dirs)))))))