Variable: treemacs-RET-actions-config

treemacs-RET-actions-config is a customizable variable defined in treemacs-customization.el.

Value

((root-node-open . treemacs-toggle-node)
 (root-node-closed . treemacs-toggle-node)
 (dir-node-open . treemacs-toggle-node)
 (dir-node-closed . treemacs-toggle-node)
 (file-node-open . treemacs-visit-node-default)
 (file-node-closed . treemacs-visit-node-default)
 (tag-node-open . treemacs-toggle-node-prefer-tag-visit)
 (tag-node-closed . treemacs-toggle-node-prefer-tag-visit)
 (tag-node . treemacs-visit-node-default))

Documentation

Defines the behaviour of treemacs-RET-action.

Each alist element maps from a button state to the function that should be used for that state. The list of all possible button states is defined in treemacs-valid-button-states. Possible values are all treemacs-visit-node-* functions as well as treemacs-toggle-node for simple open/close actions, though in general you can use any function that accepts the prefix arg as its single argument.

To keep the alist clean changes should not be made directly, but with treemacs-define-RET-action, for example like this:
(treemacs-define-RET-action 'file-node-closed #'treemacs-visit-node-ace)

Source Code

;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-customization.el
(defcustom treemacs-RET-actions-config
  '((root-node-open   . treemacs-toggle-node)
    (root-node-closed . treemacs-toggle-node)
    (dir-node-open    . treemacs-toggle-node)
    (dir-node-closed  . treemacs-toggle-node)
    (file-node-open   . treemacs-visit-node-default)
    (file-node-closed . treemacs-visit-node-default)
    (tag-node-open    . treemacs-toggle-node-prefer-tag-visit)
    (tag-node-closed  . treemacs-toggle-node-prefer-tag-visit)
    (tag-node         . treemacs-visit-node-default))
  "Defines the behaviour of `treemacs-RET-action'.

Each alist element maps from a button state to the function that should be used
for that state.  The list of all possible button states is defined in
`treemacs-valid-button-states'.  Possible values are all treemacs-visit-node-*
functions as well as `treemacs-toggle-node' for simple open/close actions,
though in general you can use any function that accepts the prefix arg as its
single argument.

To keep the alist clean changes should not be made directly, but with
`treemacs-define-RET-action', for example like this:
\(treemacs-define-RET-action \\='file-node-closed #\\='treemacs-visit-node-ace)"
  :type '(alist :key-type symbol :value-type treemacs-ret-action)
  :group 'treemacs)