Function: treemacs-project->refresh-path-status!

treemacs-project->refresh-path-status! is a byte-compiled function defined in treemacs-workspaces.el.

Signature

(treemacs-project->refresh-path-status! SELF)

Documentation

Refresh the path status of project SELF in the current buffer.

Does not preserve the current position in the buffer.

Source Code

;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-workspaces.el
(defun treemacs-project->refresh-path-status! (self)
  "Refresh the path status of project SELF in the current buffer.
Does not preserve the current position in the buffer."
  (let ((old-path-status (treemacs-project->path-status self))
        (new-path-status (treemacs--get-path-status (treemacs-project->path self))))
    (unless (eq old-path-status new-path-status)
      (setf (treemacs-project->path-status self) new-path-status)
      ;; When the path transforms from unreadable or disconnected to readable,
      ;; update the :symlink status on its button.
      (let ((pos (treemacs-project->position self))
            (path (treemacs-project->path self)))
        (when (treemacs-project->is-readable? self)
          (treemacs-button-put pos :symlink (file-symlink-p path)))
        (treemacs-button-put pos 'face (treemacs--root-face self))))))