Variable: treemacs-post-refresh-hook

treemacs-post-refresh-hook is a customizable variable defined in treemacs-customization.el.

Value

nil

Documentation

Hooks to run right before the refresh process is finished off.

During the refresh the project is effectively collapsed and then expanded again. This hook runs *after* that has happened. It runs with treemacs as the current-buffer and receives as its arguments all the information that treemacs collects for its refresh process. Note that these values were collected at the start of the refresh, and may now be longer valid (for example the current button's position will be wrong, even if it wasn't deleted outright):
 * The project being refreshed (might be 'all)
 * The current screen-line number (can be nil).
 * The current button. Might be nil if point was 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 was 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-post-refresh-hook nil
  "Hooks to run right before the refresh process is finished off.
During the refresh the project is effectively collapsed and then expanded again.
This hook runs *after* that has happened.  It runs with treemacs as the
`current-buffer' and receives as its arguments all the information that treemacs
collects for its refresh process.  Note that these values were collected at the
start of the refresh, and may now be longer valid (for example the current
button's position will be wrong, even if it wasn't deleted outright):
 * The project being refreshed (might be \\='all)
 * The current screen-line number (can be nil).
 * The current button.  Might be nil if point was 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 was on the header.
 * The current button's tag path.  Is nil if the current button is nil."
  :type 'hook
  :group 'treemacs-hooks)