Function: treemacs--select-workspace-by-name

treemacs--select-workspace-by-name is a byte-compiled function defined in treemacs-workspaces.el.

Signature

(treemacs--select-workspace-by-name)

Documentation

Interactively select the workspace.

Selection is based on the list of names of all workspaces and still happens when there is only one workspace.

Source Code

;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-workspaces.el
(defun treemacs--select-workspace-by-name ()
  "Interactively select the workspace.
Selection is based on the list of names of all workspaces and still happens
when there is only one workspace."
  (treemacs--maybe-load-workspaces)
  (let (name)
    (while (or (null name) (string= "" name))
      (setf name (completing-read
                  "Workspace: "
                  (->> treemacs--workspaces
                       (--map (cons (treemacs-workspace->name it) it)))
                  nil :require-match)))
    (--first (string= name (treemacs-workspace->name it))
             treemacs--workspaces)))