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: [BUG] Tabs and mode/header/frame-title update Date: Sun, 20 Oct 2019 16:26:03 +0200 Message-ID: <87v9sjjxxg.fsf@kenko.localhost.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="145315"; 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 16:26:24 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 1iMCA4-000bic-Gp for ged-emacs-devel@m.gmane.org; Sun, 20 Oct 2019 16:26:24 +0200 Original-Received: from localhost ([::1]:36292 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMCA3-0008OY-FJ for ged-emacs-devel@m.gmane.org; Sun, 20 Oct 2019 10:26:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50123) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMC9w-0008MC-RJ for emacs-devel@gnu.org; Sun, 20 Oct 2019 10:26:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iMC9v-0002KP-Hp for emacs-devel@gnu.org; Sun, 20 Oct 2019 10:26:16 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:51425) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iMC9v-0002Fb-1e for emacs-devel@gnu.org; Sun, 20 Oct 2019 10:26:15 -0400 Original-Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id C18542400FD for ; Sun, 20 Oct 2019 16:26:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1571581570; bh=c/xsM1VXJRy7Jgbi4pqDx3PXF1xjI6LLR3/QMalHgQ4=; h=From:To:Subject:Date:From; b=LoYLcCvj2I5LB3m9DqoNn0AxgCF3Fjmb38WDjCYDLmMUVBh9kQ4NGVAgDAPGp+u8C VoRQELjwYMUnzV/Ke8ZEQ9cm5WFgLbagwqF8U7IJv1WfcrJDxZSuFu0C4dD2WgttE8 QX8gchf07M4KGJlfOTpNtGrclRmbkCDHWoK3yCv7wSykIYUHWVC1UQ6NyDe0PQG3d8 PWDHYv3Iuo9ylEk5KoX/rkKj7EVGjptobIxxCbS3v6lJ8WMWn1y+TvDlSqr4T/Jhch ZQjY7EQMHp7OH+bDNV0SkNwSHP/9hakM/XWkQcfUdrLiHY+TcHC/O96lMbFDG22bHl dfPjLCzNjWR9g== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 46x2BN2Z0Dz9rxQ for ; Sun, 20 Oct 2019 16:26:04 +0200 (CEST) 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:241249 Archived-At: Tabs are working great, but here is one minor thing I stumbled about, and that eventually led me to a bug: 1) The bug is: at the end of `tab-bar-rename-tab`, it should read @@ -687,7 +687,7 @@ tab-bar-rename-tab (funcall tab-bar-tab-name-function)))) (setf (cdr (assq 'name tab-to-rename)) tab-new-name (cdr (assq 'explicit-name tab-to-rename)) tab-explicit-name) - (if (tab-bar-mode) + (if tab-bar-mode (force-mode-line-update) (message "Renamed tab to '%s'" tab-new-name)))) so as not to turn on `tab-bar-mode`, but only to check its status. 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.