Function: projectile-session--refresh-tab-names

projectile-session--refresh-tab-names is a byte-compiled function defined in projectile.el.

Signature

(projectile-session--refresh-tab-names)

Documentation

Recompute and apply names for every open project tab.

Naming every project tab (not just the newest) lets same-named projects become disambiguated the moment a clash appears. Tabs the user renamed by hand are left alone: a tab is only renamed while its current name still matches the one Projectile last assigned it (its projectile-auto-name parameter), which a manual tab-bar-rename-tab breaks.

Source Code

;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile-session--refresh-tab-names ()
  "Recompute and apply names for every open project tab.
Naming every project tab (not just the newest) lets same-named projects
become disambiguated the moment a clash appears.  Tabs the user renamed
by hand are left alone: a tab is only renamed while its current name
still matches the one Projectile last assigned it (its `projectile-auto-name'
parameter), which a manual `tab-bar-rename-tab' breaks."
  (dolist (tab (projectile-session--project-tabs))
    (let ((auto (alist-get 'projectile-auto-name (cdr tab)))
          (current (alist-get 'name (cdr tab))))
      (when (or (null auto) (equal auto current))
        (projectile-session--set-tab-name
         tab (funcall projectile-session-tab-name-function
                      (projectile-session--tab-root tab))))))
  (force-mode-line-update t))