Function: projectile-bookmark--under-root-p
projectile-bookmark--under-root-p is a byte-compiled function defined
in projectile.el.
Signature
(projectile-bookmark--under-root-p FILENAME ROOT)
Documentation
Return non-nil when FILENAME is a file under ROOT.
ROOT is expected to be a true name already; FILENAME is resolved to one, so a symlinked path into the project still matches. FILENAME need not exist - a bookmark whose file was deleted still belongs to the project that file was in.
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile-bookmark--under-root-p (filename root)
"Return non-nil when FILENAME is a file under ROOT.
ROOT is expected to be a true name already; FILENAME is resolved to
one, so a symlinked path into the project still matches. FILENAME need
not exist - a bookmark whose file was deleted still belongs to the
project that file was in."
(and filename
;; A remote file can't be under a local root (and the other way
;; around). Answer that from the names alone: resolving a remote
;; name would open a TRAMP connection, and a single stale remote
;; bookmark would then stall every bookmark prompt.
(equal (file-remote-p filename) (file-remote-p root))
(let ((non-essential t))
(string-prefix-p root (file-truename (expand-file-name filename))))))