Subject: Re: bug#37667: 27.0.50; Tab Bar display problems with more than 5 tabs

From: Juri Linkov <[email-masked]>
Date: Thu, 21 Nov 2019 23:56:10 +0200

> Browser tabs are usually ordered by their creation time which has no
> relationship to what has been actually shown.  You can create a new
> browser tab and then remove it without ever visiting the corresponding
> link.

This is exactly how this is already implemented on the tab-bar.

> OTOH a buffer listed in 'window-prev-buffers' has been shown in
> that window at least once.  After C-x 2 the new window has just one
> element in that list, the buffer it shows.

The tab-line is used just for buffer selection, so either it can use
the order of buffer-list, or the order of window-prev-buffers, or
alphabetical order.  I see no other way to sort buffers.

You mentioned 'creation time' above.  Does a buffer have a buffer-local
variable for its creation time?  Then we could sort by buffer's
creation time.  But currently I see only the variable buffer-display-time,
not buffer-creation-time.

> The (here defunct) tab mix plus had a number of ways to affect the
> (dynamic re-)sorting of tabs including the positioning of a new tab
> wrt the currently active one.  Maybe we should try to simulate some of
> their more popular ones here.

Many features of the tab mix plus are already supported on the tab-bar.