Subject: Re: bug#71601: 29.1; force-mode-line-update does not refresh names of tab-lines

From: Al Haji-Ali <[email-masked]>
Date: Mon, 17 Jun 2024 09:31:53 +0100

On 17/06/2024, Juri Linkov wrote:
>
> Please try to set `tab-line-cache-key-function` to a function
> that is a copy of `tab-line-cache-key-default` but where
> at the end there is appended your addition of (format-time-string "%S"):

Indeed, the tab caching seems to be the issue. I resolved it slightly differently by clearing the cache before calling `force-mode-line-update`. 

(set-window-parameter nil 'tab-line-cache nil)
(force-mode-line-update)

whenever I want to update the tab names.

I would suggest that a solution for forcing name updates is included in the documentation for `tab-line-tab-name-format-function`, possibly defining a new function like
`tab-line-force-update`.
Also, shouldn't the cache be cleared in the `:set` code of `tab-line-tab-name-format-function`? (That's where I actually figured out that I needed to call `force-mode-line-update`).

-- Al