-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
Hello!
Tabs hiding function doesnt work, despite the fact it provides right results:
(defun centaur-tabs-hide-tab (buffer)
"Hide BUFFER from the tab bar if it matches various criteria."
(let ((name (buffer-name buffer))
result)
(with-current-buffer buffer
(setq result
(or
;; Hide *Ilist* buffers
(string-prefix-p "*Ilist" name)
;; Sidebar
(eq major-mode 'dired-sidebar-mode)
;; Blacklisted buffers
(string-prefix-p "*epc" name)
(string-prefix-p "*helm" name)
(string-prefix-p "*Helm" name)
(string-prefix-p "*Compile-Log*" name)
(string-prefix-p "*lsp" name)
(string-prefix-p "*company" name)
(string-prefix-p "*Flycheck" name)
(string-prefix-p "*tramp" name)
(string-prefix-p " *Mini" name)
(string-prefix-p "*help" name)
(string-prefix-p "*straight" name)
(string-prefix-p " *temp" name)
(string-prefix-p "*Help" name)
(string-prefix-p "*mybuf" name)
;; Magit internal buffers (no extension)
(and (string-prefix-p "magit" name)
(not (file-name-extension name))))))
;; Log buffer and result
(message "[centaur-tabs] %s → hide: %s" name result)
result))
(setq centaur-tabs-hide-tab-function #'centaur-tabs-hide-tab)
In messages:
[centaur-tabs] :~/emacs_config/ → hide: t
[centaur-tabs] *Warnings* → hide: nil
[centaur-tabs] *scratch* → hide: nil
[centaur-tabs] :~/ → hide: t
[centaur-tabs] *Messages* → hide: nil
It is still shown in the tab line, and I can cycle to these buffers.
Thank you in advance.
Metadata
Metadata
Assignees
Labels
No labels