Function: treemacs-goto-file-node
treemacs-goto-file-node is a byte-compiled function defined in
treemacs-core-utils.el.
Signature
(treemacs-goto-file-node PATH &optional PROJECT)
Documentation
Move point to button identified by PATH under PROJECT in the current buffer.
Relies on treemacs-find-file-node, and will also set window-point and ensure
hl-line highlighting.
Called by treemacs-goto-node when PATH identifies a file name.
PATH: Filepath PROJECT: Project Struct
Source Code
;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-core-utils.el
(cl-macrolet
((define-goto (name find-function has-project doc)
`(define-inline ,name (path ,@(when has-project '(&optional project)))
,doc
(inline-letevals (path ,@(when has-project '(project)))
(inline-quote
(-when-let (result (,find-function ,(quote ,path) ,@(when has-project '(,project))))
(treemacs--evade-image)
(hl-line-highlight)
;; Only change window point if the current buffer is actually visible
(-when-let (window (get-buffer-window))
(set-window-point window (point)))
result))))))
(define-goto treemacs-goto-file-node treemacs-find-file-node t
"Move point to button identified by PATH under PROJECT in the current buffer.
Relies on `treemacs-find-file-node', and will also set window-point and ensure
hl-line highlighting.
Called by `treemacs-goto-node' when PATH identifies a file name.
PATH: Filepath
PROJECT: Project Struct")
(define-goto treemacs--goto-custom-top-level-node treemacs--find-custom-top-level-node nil
"Move to the top-level extension node at PATH, returning the button's position.")
(define-goto treemacs--goto-custom-dir-node treemacs--find-custom-dir-node nil
"Move to the directory extension node at PATH, returning the button's position.")
(define-goto treemacs--goto-custom-project-node treemacs--find-custom-project-node nil
"Move to the project extension node at PATH, returning the button's position."))