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.devel Subject: Re: [PATCH] Address issue with tab-bar Date: Thu, 17 Sep 2020 22:07:02 +0300 Organization: LINKOV.NET Message-ID: <87een0nrza.fsf@mail.linkov.net> References: <87o8m4o1ti.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27419"; 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: emacs-devel@gnu.org To: James N V Cash Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Sep 17 21:10:01 2020 Return-path: Envelope-to: ged-emacs-devel@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 1kIzI9-0006z2-7y for ged-emacs-devel@m.gmane-mx.org; Thu, 17 Sep 2020 21:10:01 +0200 Original-Received: from localhost ([::1]:46318 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIzI8-0004Xd-AC for ged-emacs-devel@m.gmane-mx.org; Thu, 17 Sep 2020 15:10:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45146) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIzHD-0003fX-GT for emacs-devel@gnu.org; Thu, 17 Sep 2020 15:09:03 -0400 Original-Received: from relay11.mail.gandi.net ([217.70.178.231]:34465) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIzHB-0007XW-Jq for emacs-devel@gnu.org; Thu, 17 Sep 2020 15:09:03 -0400 Original-Received: from mail.gandi.net (m91-129-108-13.cust.tele2.ee [91.129.108.13]) (Authenticated sender: juri@linkov.net) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 82566100004; Thu, 17 Sep 2020 19:08:58 +0000 (UTC) In-Reply-To: <87o8m4o1ti.fsf@gmail.com> (James N. V. Cash's message of "Thu, 17 Sep 2020 11:33:29 -0400") Received-SPF: pass client-ip=217.70.178.231; envelope-from=juri@linkov.net; helo=relay11.mail.gandi.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/17 15:08:59 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:256021 Archived-At: > I've noticed an issue where, if tab-bar-mode is t, but tab-bar-show is > 1, then if you open a second tab, then close it, it will hide the tab > bar and not show it again. > > e.g. running the following code will result in two tabs being open, but > the tab bar not visible. > > (customize-set-variable 'tab-bar-show 1) > (tab-bar-mode) > (tab-bar-new-tab) > (tab-bar-close-tab) > (tab-bar-new-tab) > > The below patch addresses this issue by not hiding the tab bar if > tab-bar-mode is t, in the same way that tab-bar-new-tab-to does. But according to the documentation of 'tab-bar-show': "If the value is ‘1’, then hide the tab bar when it has only one tab, and show it again once more tabs are created." tab-bar-close-tab should hide the tab-bar on the selected frame with only one tab. So the problem is that tab-bar-new-tab doesn't show the tab-bar again when there are more than one tab. It seems this is a consequence of bug#42052 that tried to implement frame-local tab-bar where tab-bar-mode is always true, but it shows/hides frame-local tab-bars depending on the frame-parameter 'tab-bar-lines'.