Function: projectile--read-known-projects-file
projectile--read-known-projects-file is a byte-compiled function
defined in projectile.el.
Signature
(projectile--read-known-projects-file)
Documentation
Return the known projects on disk, or the symbol unreadable\=.
Distinguishing the two matters: an absent file legitimately means no projects, while an unreadable one means the list on disk is unknown - and treating unknown as empty is how a corrupt file used to take the known projects with it (see issue #1927).
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile--read-known-projects-file ()
"Return the known projects on disk, or the symbol `unreadable\\='.
Distinguishing the two matters: an absent file legitimately means no
projects, while an unreadable one means the list on disk is unknown -
and treating unknown as empty is how a corrupt file used to take the
known projects with it (see issue #1927)."
(let ((file projectile-known-projects-file))
(cond
((not (file-exists-p file)) nil)
(t (condition-case nil
(let ((data (with-temp-buffer
(insert-file-contents file)
(read (buffer-string)))))
(if (proper-list-p data) data 'unreadable))
(error 'unreadable))))))