Function: treemacs--find-workspace
treemacs--find-workspace is a byte-compiled function defined in
treemacs-workspaces.el.
Signature
(treemacs--find-workspace &optional PATH)
Documentation
Find the right workspace the given PATH.
PATH: String
Source Code
;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-workspaces.el
(define-inline treemacs--find-workspace (&optional path)
"Find the right workspace the given PATH.
PATH: String"
(declare (side-effect-free t))
(inline-letevals (path)
(inline-quote
(let ((ws-for-path (--first (treemacs-is-path ,path :in-workspace it)
treemacs--workspaces)))
(setf (treemacs-current-workspace)
(pcase-exhaustive treemacs-find-workspace-method
('find-for-file-or-pick-first
(or ws-for-path (car treemacs--workspaces)))
('find-for-file-or-manually-select
(or ws-for-path (treemacs--select-workspace-by-name)))
('always-ask
(treemacs--select-workspace-by-name))))))))