Subject: bug#52019: 28.0.60; tab-bar is not updated when buffer is killed

From: Juri Linkov <[email-masked]>
Date: Sun, 21 Nov 2021 19:30:13 +0200

> When a buffer is killed it seams like only the active tab is
> updated. E.g. if a buffer that is shown in another tab is killed from the
> buffer list, then the tab-bar will still show that buffer name.
>
> This bug is also present on Emacs 27 and on master.

This is not a bug, but a feature.  The tabs on the tab-bar
are like bookmarks that represent the state that was current
at the time of switching from the active tab that freezes
its state as a "bookmark".  The tab name should always
show the old buffer names, so the user can see what
buffers were displayed in that tab.

All web browsers work the same way.  When some web server
changes the title of the web page opened in the web browser
in a tab, you need to switch to this tab and reload the page
to see a new title in the tab name.  Would you send such a bug
report to a web browser's bug tracker too?

If you don't like this, you can rename the tab manually to a fixed name.
This is a feature that even web browsers don't have.

Or even better: never kill buffers displayed in another tab,
checking with 'tab-bar-get-buffer-tab' whether the buffer
can be killed, or only buried.

> The name of that tab will be updated when you switch to it.

Ideally, the tab should show some placeholder for the killed buffer
after the user switches to it, so the tab name should keep its
original name.  This would less confusing than showing some random
buffer instead of the killed buffer.  But this is a separate feature
that could be discussed in a separate request.