emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BUG] Tabs and mode/header/frame-title update


From: Ingo Lohmar
Subject: Re: [BUG] Tabs and mode/header/frame-title update
Date: Sun, 20 Oct 2019 18:49:17 +0200

On Sun, Oct 20 2019 19:31 (+0300), Juri Linkov wrote:

>> 2) However, I use tabs w/o tab-bar-mode and only looked at the code
>> above because I wondered why my frame-title (where I put the current tab
>> info) was not reliably updated when, eg, adding a tab.
>>
>> IMO, such an update is *especially* relevant when you use the functions
>> without `tab-bar-mode`.  But all calls to `force-mode-line-update` (at
>> the end of various interactive functions) are conditioned on
>> `tab-bar-mode`.
>>
>> Since this is by no means a frequent operation, I strongly suggest
>> to update the modeline(/header/title) unconditionally.
>
> I tried to reproduce this, but without `tab-bar-mode` the frame-title
> is still updated.  Maybe this somehow depends on your settings?

Possibly relevant settings:

(setq tab-bar-close-tab-select 'left
      tab-bar-new-tab-choice nil  ;"clone"
      tab-bar-tab-name-function #'tab-bar-tab-name-all
      tab-bar-show nil)           ;never auto-show

(setq frame-title-format
      '("emacs --- "
        ((bound-and-true-p wconf-string) wconf-string)
        ((bound-and-true-p tab-bar-tab-name-function)
         (:eval (format "%d: %s"
                        (tab-bar--current-tab-index)
                        (funcall tab-bar-tab-name-function))))
        (multiple-frames " %b")         ;else too busy
        (global-mode-string             ;time, load, battery?
         (" " global-mode-string))
        " "))

> Please confirm that it really updates the frame-title when you call
> `force-mode-line-update` unconditionally.  Then I will remove that condition.

Just [re-]checked: The frame title is updated immediately when I delete
a tab, but not when I add a new one.  In the latter case, typing 'M-x'
already triggers the update, as does switching tabs (back and forth), of
course.

When I change all (6) `force-mode-line-update` calls from interactive
functions and `eval-buffer` tab-bar.el, creating a new tab updates my
frame title immediately, indeed.

Mind you, I do /not/ claim that all these calls are strictly necessary;
it could be that for some of the commands the update is implied (I
honestly don't know).  But I /do/ think that /if/ there is such a call
(as in the above 6 functions), it should definitely run
independent of `tar-bar-mode`.

Thanks for your quick fix and reply!
Ingo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]