Function: projectile-keep-project-p

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

Signature

(projectile-keep-project-p PROJECT)

Documentation

Determine whether we should cleanup (remove) PROJECT or not.

It handles the case of remote projects as well. See projectile--cleanup-known-projects.

Remote projects are always kept regardless of connection state. Previously a remote project that *was* connected was tested with file-readable-p, which is a remote round-trip per project - and since projectile--cleanup-known-projects may be called every time the user invokes a switch-project command (when projectile-auto-cleanup-known-projects is on), that turned project switching into a sequence of network stats. The user can still explicitly drop dead remote projects via projectile-remove-known-project.

Source Code

;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile-keep-project-p (project)
  "Determine whether we should cleanup (remove) PROJECT or not.

It handles the case of remote projects as well.
See `projectile--cleanup-known-projects'.

Remote projects are always kept regardless of connection state.
Previously a remote project that *was* connected was tested with
`file-readable-p', which is a remote round-trip per project - and
since `projectile--cleanup-known-projects' may be called every time
the user invokes a switch-project command (when
`projectile-auto-cleanup-known-projects' is on), that turned project
switching into a sequence of network stats.  The user can still
explicitly drop dead remote projects via `projectile-remove-known-project'."
  ;; Taken from `recentf-keep-default-predicate'
  (cond
   ((file-remote-p project))
   ((file-readable-p project))))