tab label too long
The tab-bar label for the Treemacs window is too long, and ugly.
Below an example, from a fresh Emacs 28.2 with only Treemacs v3.2 installed (version 20250322.1303) and without any customizations done:
*Treemacs-Scoped-Buffer-#<frame *Minibuf-1* GNU Emacs at e3asdas 0x5578b9f4f341>*
The Treemacs tab-bar tab occupies almost halve of the screen width, often pushing other tabs to a second line, and disturbing my overview. Switching to the next workspace with keybinding "C-c C-w n" adds another another long text to the label. Killing (instead of closing/toggling) the Treemacs window 'resets' the tab label to a single instance of the long text.
I couldn't find a customization option to set the Treemacs tab label, but maybe I missed some other easy method to set the tab label.
This issue has been automatically marked as stale because it has not had recent activity (this bot only works as a reminder, it will not close issues).
I've now added treemacs-buffer-name-function. A small prefix is still necessary for compatibility with winum, but you can now do something like this:
(defvar name-count 0)
(setf treemacs-buffer-name-function
(defun custom-name-fn (_)
(format "%s*" (cl-incf name-count))))
This will produce names like " *Treemacs-Buffer-1*".
This issue has been automatically marked as stale because it has not had recent activity (this bot only works as a reminder, it will not close issues).
Closing the issue because I assume it has now been resolved.
Btw, the variable treemacs-buffer-name-prefix has also recently been added.