Function: projectile--siblings-by-key
projectile--siblings-by-key is a byte-compiled function defined in
projectile.el.
Signature
(projectile--siblings-by-key ROOT KEY-FUNCTION)
Documentation
Return the known projects KEY-FUNCTION gives the same answer for as ROOT.
Nil when ROOT has no key, and nil when so many projects share it that
the answer says nothing - see projectile-sibling-max-group-share. This
is the shape every inferred signal takes: some property of a project
root, and everything else that has it too.
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile--siblings-by-key (root key-function)
"Return the known projects KEY-FUNCTION gives the same answer for as ROOT.
Nil when ROOT has no key, and nil when so many projects share it that
the answer says nothing - see `projectile-sibling-max-group-share'. This
is the shape every inferred signal takes: some property of a project
root, and everything else that has it too."
(when-let* ((key (funcall key-function root)))
(let* ((projects (projectile--sibling-candidate-projects))
(matches (seq-filter (lambda (project)
(equal key (funcall key-function project)))
projects)))
(unless (and projectile-sibling-max-group-share
;; A share of a handful of projects isn't a measurement
;; of anything, and the switch list is short enough not
;; to need narrowing, so the cap only starts applying
;; once "most of them" means something.
(>= (length projects) projectile--sibling-cap-min-projects)
(> (length matches)
(max 2 (floor (* projectile-sibling-max-group-share
(length projects))))))
matches))))