Function: projectile--watch-transient-file-p

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

Signature

(projectile--watch-transient-file-p FILE)

Documentation

Return non-nil when FILE is an editor artifact that shouldn't be cached.

Matches lockfiles (.#foo), auto-save files (#foo#), backup files (foo~) and the project's own persistent cache file - all of them appear and vanish as a side effect of editing and would otherwise churn the cache
(the cache file would even schedule a flush that touches itself).

Source Code

;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile--watch-transient-file-p (file)
  "Return non-nil when FILE is an editor artifact that shouldn't be cached.
Matches lockfiles (.#foo), auto-save files (#foo#), backup files (foo~)
and the project's own persistent cache file - all of them appear and
vanish as a side effect of editing and would otherwise churn the cache
(the cache file would even schedule a flush that touches itself)."
  (let ((name (file-name-nondirectory (directory-file-name file))))
    (or (string-prefix-p ".#" name)
        (and (string-prefix-p "#" name) (string-suffix-p "#" name))
        (string-suffix-p "~" name)
        (string= name projectile-cache-file))))