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

From: martin rudalics <[email-masked]>
Date: Thu, 21 Nov 2019 09:23:41 +0100

> I don't know why 'switch-to-buffer' changes the order of
 > window-prev-buffers used in the tab-line.  We have to ask Martin
 > is it possible to keep the original order in window-prev-buffers list.

No.  The aim of 'window-prev-buffers' (and 'window-next-buffers') is
to make navigation between the buffers shown in that window reliable.
So 'window-prev-buffers' is kept in a "most recently shown in that
window first" order.

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.  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 (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.

martin