Variable: treemacs-pre-refresh-hook
treemacs-pre-refresh-hook is a customizable variable defined in
treemacs-customization.el.
Value
nil
Documentation
Hooks to run right before the refresh process for a project kicks off.
During the refresh the project is effectively collapsed and then expanded again.
This hook runs *before* that happens. It runs with treemacs as the
current-buffer and receives as its arguments all the information that treemacs
collects for its refresh process:
* The project being refreshed (might be 'all)
* The current screen-line number (can be nil).
* The current button. Might be nil if point is on the header line.
* The current button's state. See also treemacs-valid-button-states. Is nil
if the current button is nil.
* The nearest file path, as collected with treemacs--nearest-path. Is nil if
point is on the header.
* The current button's tag path. Is nil if the current button is nil.
Source Code
;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-customization.el
(defcustom treemacs-pre-refresh-hook nil
"Hooks to run right before the refresh process for a project kicks off.
During the refresh the project is effectively collapsed and then expanded again.
This hook runs *before* that happens. It runs with treemacs as the
`current-buffer' and receives as its arguments all the information that treemacs
collects for its refresh process:
* The project being refreshed (might be \\='all)
* The current screen-line number (can be nil).
* The current button. Might be nil if point is on the header line.
* The current button's state. See also `treemacs-valid-button-states'. Is nil
if the current button is nil.
* The nearest file path, as collected with `treemacs--nearest-path'. Is nil if
point is on the header.
* The current button's tag path. Is nil if the current button is nil."
:type 'hook
:group 'treemacs-hooks)