fritzgrabo/project-tab-groups

could set tab name as project name?

Closed this issue · 2 comments

I use project-tab-groups and treemacs.
treemacs integration of tab-bar-mode using treemacs-tab-bar.el , it treat tab name as workspace .

Hi @ltylty, thanks for your question.

I'm not a user of treemacs, but from what I gather, treemacs-tab-bar.el allows treemacs buffers to be unique inside the active tab instead of the default frame-based buffer scope. It seems to rely on the tab's name for that.

Note that my package project-tab-groups keeps several tabs for a given project in a single tab group, using the project name as the name of the tab group. The idea is that there can be multiple tabs that relate to a single project.

If I understood your question correctly, you're asking to name individual tabs inside a project's tab group after the project, too, so the treemacs buffer can pick up the project name from the tab's name? If I got that right, then I think you'd end up with a tab group called "project-foobar" and several tabs inside that are also called "project-foobar". There must be a better way! 😉

Maybe the author of treemacs-tab-bar.el can provide an option to use the name of the containing tab group, rather than the name of the active tab to find or create a related treemacs buffer?

What do you think?

thank you for your answer.

I use the follow code to set tab name as project name

  (defun tab-bar-tab-name-current-project ()
    (let ((project (project-current)))
      (if project
          (project-name project)
	"Default")))
  (setq tab-bar-tab-name-function #'tab-bar-tab-name-current-project)