Closed dschaehi closed 5 years ago
When you finish rule of hide tab, please restart Emacs re-rest, rule should be apply after restart Emacs.
The rules work for most of the cases, for examples the *Messages*
or the *scratch*
buffers do not show any tabs.
But *Agenda Commands*
or *NeoTree*
show tabs.
So the rules sometimes work and sometimes don't.
Could you check, whether M-x org-agenda
shows a tab in your case, when you use the above rule?
I found the solution: the names of the buffers I mentioned previously actually start with a space, i.e., _*NeoTree*
and _*Agenda Commands*"
where _
means a space here. Emacs handles buffers whose names start with a space specially (see here) and does not show the space in the tabs. I only had to add a new rule (string-prefix-p " *" name)
to hide those buffers.
For future reference of people coming in through Google: had a similar problem with *which-key*
, whose name also started with a space I never noticed.
My solution:
(defun awesome-tab-hide-tab (x)
(let ((name (format "%s" x)))
(or
(string-prefix-p "*" name)
(string-prefix-p " *" name)
)
)
)
Thanks for the great library. I really enjoy using the tabs. I have one small issue though: I've set the
awesome-hide-tab
function to hide all buffers starting with a . But it looks like read-only buffers still show tabs starting with a , such as the*Agenda Commands*
buffer when I callorg-agenda
inorg-mode
or the*NeoTree*
buffer when I call neotree. Can this problem be solved? The following is myawesome-hide-tab
function.