From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#46299: 28.0.50; Value of tab-bar-show not respected in new frames. Date: Mon, 08 Feb 2021 20:19:12 +0200 Organization: LINKOV.NET Message-ID: <87v9b2ifrz.fsf@mail.linkov.net> References: <871rdv4xog.fsf@gmail.com> <87k0rmnbqs.fsf@mail.linkov.net> <87a6sfu0fi.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27071"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: 46299@debbugs.gnu.org To: Bastian Beranek Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 08 23:49:17 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l9FLJ-0006xP-3Q for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 Feb 2021 23:49:17 +0100 Original-Received: from localhost ([::1]:38134 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9FLH-0006kN-WF for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 Feb 2021 17:49:16 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50652) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9BCd-0003WG-It for bug-gnu-emacs@gnu.org; Mon, 08 Feb 2021 13:24:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40350) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l9BCd-0006Hu-28 for bug-gnu-emacs@gnu.org; Mon, 08 Feb 2021 13:24:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l9BCc-0006YA-Uf for bug-gnu-emacs@gnu.org; Mon, 08 Feb 2021 13:24:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Feb 2021 18:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46299 X-GNU-PR-Package: emacs Original-Received: via spool by 46299-submit@debbugs.gnu.org id=B46299.161280861525134 (code B ref 46299); Mon, 08 Feb 2021 18:24:02 +0000 Original-Received: (at 46299) by debbugs.gnu.org; 8 Feb 2021 18:23:35 +0000 Original-Received: from localhost ([127.0.0.1]:51895 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9BCA-0006XJ-3x for submit@debbugs.gnu.org; Mon, 08 Feb 2021 13:23:34 -0500 Original-Received: from relay3-d.mail.gandi.net ([217.70.183.195]:52685) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9BC5-0006Wd-U1 for 46299@debbugs.gnu.org; Mon, 08 Feb 2021 13:23:31 -0500 X-Originating-IP: 91.129.108.204 Original-Received: from mail.gandi.net (m91-129-108-204.cust.tele2.ee [91.129.108.204]) (Authenticated sender: juri@linkov.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id CD2686000D; Mon, 8 Feb 2021 18:23:22 +0000 (UTC) In-Reply-To: (Bastian Beranek's message of "Mon, 8 Feb 2021 18:50:40 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:199634 Archived-At: Hello Bastian, > I have tried to clean up my patch a bit more, please see the attached version 3. Thanks, everything looks right, except one thing that you removed the most important rule: > - (cond > - ((eq tab-bar-show t) > - (tab-bar-mode 1)) This is the core reason of existence of tab-bar-show separate from tab-bar-mode: when the user creates a new tab, the tab-bar should be activated, unless the user has customized tab-bar-show to nil. Actually, a more proper condition should be: (when tab-bar-show (tab-bar-mode 1)) and then after that you can use the remaining code: > + ;; Recalculate tab-bar-lines and update frames > + (tab-bar--update-tab-bar-lines (selected-frame)) > + (when tab-bar-mode > + (tab-bar--load-buttons) > + (tab-bar--define-keys)) In tab-bar-close-other-tabs: > + ;; Recalculate tab-bar-lines and update frames > + (tab-bar--update-tab-bar-lines) It could affect only the selected frame too, i.e.: (tab-bar--update-tab-bar-lines (selected-frame))