Function: projectile-dashboard--collect
projectile-dashboard--collect is a byte-compiled function defined in
projectile.el.
Signature
(projectile-dashboard--collect &optional DIR)
Documentation
Collect the dashboard data for DIR's project as a plist.
DIR defaults to default-directory. Outside a project the plist has a
nil :root and the rendering degrades to saying so.
The data is collected in a temporary buffer with the project's
directory-local variables applied, the way
projectile-switch-project-by-name runs the switch action. The project
type, its tasks and its lifecycle commands can all come from
.dir-locals.el, and the dashboard buffer has none of them - without this
a refresh would quietly render a different project than the first pass.
Nothing here indexes the project or touches the file cache: an uncached
project is reported as not indexed rather than indexed on the spot, so
that the dashboard stays cheap enough to be a
projectile-switch-project-action.
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile-dashboard--collect (&optional dir)
"Collect the dashboard data for DIR's project as a plist.
DIR defaults to `default-directory'. Outside a project the plist has a
nil `:root' and the rendering degrades to saying so.
The data is collected in a temporary buffer with the project's
directory-local variables applied, the way
`projectile-switch-project-by-name' runs the switch action. The project
type, its tasks and its lifecycle commands can all come from
.dir-locals.el, and the dashboard buffer has none of them - without this
a refresh would quietly render a different project than the first pass.
Nothing here indexes the project or touches the file cache: an uncached
project is reported as not indexed rather than indexed on the spot, so
that the dashboard stays cheap enough to be a
`projectile-switch-project-action'."
(let* ((dir (or dir default-directory))
(root (ignore-errors (projectile-project-root dir))))
(if (null root)
(list :dir dir :root nil)
(with-temp-buffer
(setq default-directory root)
(hack-dir-local-variables-non-file-buffer)
(projectile-dashboard--collect-in-project dir root)))))