From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Ingo Lohmar Newsgroups: gmane.emacs.devel Subject: Re: [BUG] Tabs and mode/header/frame-title update Date: Sun, 20 Oct 2019 18:49:17 +0200 Message-ID: <87k18zjraq.fsf@kenko.localhost.com> References: <87v9sjjxxg.fsf@kenko.localhost.com> <87lftfjs4w.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="210182"; mail-complaints-to="usenet@blaine.gmane.org" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 20 18:49:37 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iMEOd-000sXq-FM for ged-emacs-devel@m.gmane.org; Sun, 20 Oct 2019 18:49:35 +0200 Original-Received: from localhost ([::1]:40902 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMEOc-00026E-9q for ged-emacs-devel@m.gmane.org; Sun, 20 Oct 2019 12:49:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35059) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMEOT-000262-PI for emacs-devel@gnu.org; Sun, 20 Oct 2019 12:49:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iMEOS-0000T5-A9 for emacs-devel@gnu.org; Sun, 20 Oct 2019 12:49:25 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:37233) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iMEOQ-0000R7-4C for emacs-devel@gnu.org; Sun, 20 Oct 2019 12:49:24 -0400 Original-Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 0BAA02400FD for ; Sun, 20 Oct 2019 18:49:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1571590159; bh=cbQmph0AG+aAgx9Y4var4Gm5ET0bdsZZe5pMUqwiKFQ=; h=From:To:Subject:Date:From; b=X/n4mu3pDrvM49WoLhsinVni8hm1ikctWo1RFaSQRhzSg+HKzwDvRsn0TrvtDEGHN hn2xvlMG4Dw2mVqLFHuVub9Rru8s4vcTVTjvnmjHrdiVX5XDDuYn2oO/3OYX4uMXga oLF2hry0f7Gn7RgAWrbi5iYGBFlo8Egzb2ixamZMYr1YQH+4qujdLOiLX+jWEefjNm LPhoygesj+ojBKlVYhy3jVAdp4Bbfp0hRm+Eb7NYgnQJqz+XsrKwYWSKUx7ziepQIY LCpvTmWPy9AxPT/fby6IdpYuCSfbrCqntblE8y191upADGgtqjaQFJv1UMuQEe2EVF e47Tp6Jskr6Dw== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 46x5Mf3FQkz9rxK for ; Sun, 20 Oct 2019 18:49:18 +0200 (CEST) In-Reply-To: <87lftfjs4w.fsf@mail.linkov.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 185.67.36.66 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:241255 Archived-At: 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