Subject: bug#58866: tab-line tab order is not preserved by desktop when customizing tab-line-tabs-function

From: Juri Linkov <[email-masked]>
Date: Sat, 29 Oct 2022 20:48:34 +0300

tags 58866 notabug
close 58866 29.0.50
thanks

> desktop is restoring the tab-line tab order on application reload when
> using the default tab-line-tabs-function. When using a custom
> tab-line-tabs-function the order is not being preserved. (I suspect it
> could be due to how I want my tabs to behave.)
>
> Is desktop supposed to preserve the tab order for user customizations?

Desktop preserves the window buffer order, so the order for the default
tab-line-tabs-function is preserved in consequence.

Since you customized tab-line-tabs-function to another order
in 'old-tabs', you need also to save your variable 'old-tabs' in
your desktop.  Please look in desktop.el what hooks can you use
to serialize your variable with buffer objects to save it with
buffer names as strings.