Function: projectile-dashboard--refresh

projectile-dashboard--refresh is a byte-compiled function defined in projectile.el.

Signature

(projectile-dashboard--refresh DIR)

Documentation

Render the dashboard for DIR into the dashboard buffer and return it.

Source Code

;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile-dashboard--refresh (dir)
  "Render the dashboard for DIR into the dashboard buffer and return it."
  (let ((data (projectile-dashboard--collect dir))
        (buffer (get-buffer-create projectile-dashboard-buffer-name)))
    (with-current-buffer buffer
      (let ((inhibit-read-only t))
        (erase-buffer)
        (projectile-dashboard-mode)
        (setq-local projectile-dashboard--directory dir)
        ;; The buffer is reused across projects, so point it at the one it
        ;; currently shows - otherwise commands invoked in it (and the mode
        ;; line) would keep targeting whichever project opened it first.
        (setq-local default-directory (or (plist-get data :root) dir))
        (projectile-dashboard--render data)
        (goto-char (point-min))))
    buffer))