Function: projectile--watch-apply-event
projectile--watch-apply-event is a byte-compiled function defined in
projectile.el.
Signature
(projectile--watch-apply-event PROJECT EVENT)
Documentation
Apply one file-notify EVENT to PROJECT's cached file list.
Returns non-nil when the cached list was mutated. Throws
projectile--watch-fallback (with a reason string) when the event
cannot be applied incrementally.
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile--watch-apply-event (project event)
"Apply one file-notify EVENT to PROJECT's cached file list.
Returns non-nil when the cached list was mutated. Throws
`projectile--watch-fallback' (with a reason string) when the event
cannot be applied incrementally."
(pcase-let ((`(,descriptor ,action ,file . ,rest) event))
(pcase action
('created (projectile--watch-handle-created project file))
('deleted (projectile--watch-handle-deleted project file))
;; A rename is a deletion at the old name plus a creation at the new
;; one. `or' would short-circuit the second handler, so evaluate both.
('renamed
(let ((removed (projectile--watch-handle-deleted project file))
(added (and (car rest)
(projectile--watch-handle-created project (car rest)))))
(or removed added)))
('stopped (projectile--watch-handle-stopped project descriptor))
;; `changed' / `attribute-changed' don't affect the file list.
(_ nil))))