Function: treemacs--get-bounds-of-project
treemacs--get-bounds-of-project is an interactive and byte-compiled
function defined in treemacs-workspaces.el.
Signature
(treemacs--get-bounds-of-project PROJECT)
Documentation
Get the bounds a PROJECT in the current buffer.
Returns a cons cell of buffer positions at the very start and end of the PROJECT, excluding newlines.
PROJECT: Project Struct
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-workspaces.el
(defun treemacs--get-bounds-of-project (project)
"Get the bounds a PROJECT in the current buffer.
Returns a cons cell of buffer positions at the very start and end of the
PROJECT, excluding newlines.
PROJECT: Project Struct"
(interactive)
(save-excursion
(goto-char (treemacs-project->position project))
(let* ((start (line-beginning-position))
(next (treemacs--next-non-child-button (treemacs-project->position project)))
(end (if next
(-> next (treemacs-button-start) (previous-button) (treemacs-button-end))
;; final position minus the final newline
(1- (point-max)))))
(cons start end))))