ema2159 / centaur-tabs

Emacs plugin aiming to become an aesthetic, modern looking tabs plugin
GNU General Public License v3.0
727 stars 50 forks source link

Wrong group name from centaur-tabs-get-group-name function #210

Open grolongo opened 1 year ago

grolongo commented 1 year ago

Hello and thank you for centaur-tabs,

I'm using (derived-mode-p 'dired-mode) "Dired") and (derived-mode-p 'erc-mode) "ERC") in centaur-tabs-buffer-groups to group Dired and ERC related buffers into separate centaur groups.

Everything works as expected. Each Dired and ERC buffers are getting sent to their respective separate group. No complain.

However I noticed something odd:

If I'm in a Dired buffer (which is already in it's own Dired group) and do:
Eval: (centaur-tabs-get-group-name (current-buffer))
it returns "Common", as if this buffer is in the group named "Common", but it is not, it's in the group "Dired".

If I do it for an ERC buffer it returns that it's in one of my project group... what? yet it's definitely not, because it's in the group "ERC".

You would tell me "bug but who cares?" as long as the buffers are getting grouped accordingly.

The thing is I'm making a custom function to have the centaur group name displayed in the mode-line for each buffers, and I was planning to use (centaur-tabs-get-group-name (current-buffer)) to get that, but it returns wrong information.

Is there a way to fix this or any other command to get the correct group name of a buffer?

Thank you!