You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been using centaur-tabs for some time and have been quite happy with it. Thanks for providing this great package. Recently I started using denote, which is also a great package. Denote has the particularity of being based on an efficient file-naming scheme that produces long names, e.g.: 20230331T093543--name-of-the-org-file__firsttag_secondtag_thirdtag_fourthtag.org
So now that I use it I can only see one tab (max 2) on my Emacs window.
Hopefully, centaur-tabs-label-fixed-length can reduce file names. But applied to denote files, it makes the tab name unreadable. For example, with the value 9, the tab will show "20230331".
Would it be possible to have a centaur-tabs command allowing to change the name of a tab? That is only changing the tab name and keeping the file name and the buffer name unchanged. Like Tab Bars does with tab-rename.
Then some code could be used to specify tab names. e.g. specifying tab names with #+tabname::
(defun org-get-kw-value (kw)
"Get the value of keyword KW."
(save-excursion
(goto-char (point-min))
(let ((case-fold-search t))
(re-search-forward (format "^#\\+%s:\\(.+\\)" kw) nil t)
(when-let (kwval (match-string-no-properties 1))
(string-trim kwval)))))
(defun my-org-hook-function ()
"If keyword TABNAME exists, set tab-rename to its value."
(when-let (new-tab-name (org-get-kw-value "tabname"))
(tab-rename new-tab-name)))
(add-hook 'org-mode-hook #'my-org-hook-function)
The text was updated successfully, but these errors were encountered:
morgandavidson
changed the title
[feature request] Skip first 17 chars in tab name
[feature request] Specify tab names
Apr 15, 2023
I have been using centaur-tabs for some time and have been quite happy with it. Thanks for providing this great package. Recently I started using denote, which is also a great package. Denote has the particularity of being based on an efficient file-naming scheme that produces long names, e.g.:
20230331T093543--name-of-the-org-file__firsttag_secondtag_thirdtag_fourthtag.org
So now that I use it I can only see one tab (max 2) on my Emacs window.
Hopefully,
centaur-tabs-label-fixed-length
can reduce file names. But applied to denote files, it makes the tab name unreadable. For example, with the value 9, the tab will show "20230331".Would it be possible to have a centaur-tabs command allowing to change the name of a tab? That is only changing the tab name and keeping the file name and the buffer name unchanged. Like Tab Bars does with
tab-rename
.Then some code could be used to specify tab names. e.g. specifying tab names with
#+tabname:
:The text was updated successfully, but these errors were encountered: