Function: treemacs-with-workspace

treemacs-with-workspace is a macro defined in treemacs-macros.el.

Signature

(treemacs-with-workspace WORKSPACE &rest BODY)

Documentation

Use WORKSPACE as the current workspace when running BODY.

Specifically this means that calls to treemacs-current-workspace will return WORKSPACE and if no workspace has been set for the current scope yet it will not be set either.

Source Code

;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-macros.el
(defmacro treemacs-with-workspace (workspace &rest body)
  "Use WORKSPACE as the current workspace when running BODY.
Specifically this means that calls to `treemacs-current-workspace' will return
WORKSPACE and if no workspace has been set for the current scope yet it will not
be set either."
  (declare (indent 1) (debug (form body)))
  `(let ((treemacs-override-workspace ,workspace))
     (ignore treemacs-override-workspace)
     ,@body))