Variable: treemacs-select-when-already-in-treemacs

treemacs-select-when-already-in-treemacs is a customizable variable defined in treemacs-customization.el.

Value

move-back

Documentation

How treemacs-select-window behaves when treemacs is already selected.

Possible values are:
 - stay - remain in the treemacs windows, effectively doing nothing
 - close - close the treemacs window
 - goto-next - jump to the next treemacs-based window (e.g. treemacs-mu4e)
 - move-back - move point back to the most recently used window (as selected
   by get-mru-window)
 - next-or-back - a combination of the two previous options. First try to
   move to the next treemacs-based window, if none exists move back to the most
   recently used window

Source Code

;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-customization.el
(defcustom treemacs-select-when-already-in-treemacs 'move-back
  "How `treemacs-select-window' behaves when treemacs is already selected.

Possible values are:
 - `stay' - remain in the treemacs windows, effectively doing nothing
 - `close' - close the treemacs window
 - `goto-next' - jump to the next treemacs-based window (e.g. treemacs-mu4e)
 - `move-back' - move point back to the most recently used window (as selected
   by `get-mru-window')
 - `next-or-back' - a combination of the two previous options.  First try to
   move to the next treemacs-based window, if none exists move back to the most
   recently used window"
  :type '(choice (const stay)
                 (const close)
                 (const move-back))
  :group 'treemacs)