I want to implement automatic tab management. Every file I open needs to go into a tab. The tab into which any given buffer goes is determined by root directory of the VC repo the file belongs to.
The mechanism used by tabbar.el was tabbar-buffer-groups-function
where I could use a function like
(defun my/find-vc-root ()
"Retuns the repository root as per [vc]."
(vc-call-backend (vc-responsible-backend default-directory)
'root default-directory))
I do see tab-bar-new-tab-group
in the code but I can't wrap my head around how it is to be used.
tab-line-tabs-buffer-group-function
in tab-line to do whattabbar-buffer-groups-function
did (details). Emacs also has tab-bar but it works differently from tabbar.el, so I would suggest trying tab-line first to make it easier to move from tabbar.el.