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: Fri, 12 Feb 2021 11:31:19 +0200 Organization: LINKOV.NET Message-ID: <871rdlr4vc.fsf@mail.linkov.net> References: <871rdv4xog.fsf@gmail.com> <87k0rmnbqs.fsf@mail.linkov.net> <87a6sfu0fi.fsf@mail.linkov.net> <87v9b2ifrz.fsf@mail.linkov.net> <55ebad56-b440-198a-653e-1660040d5eae@gmx.at> <38b988fd-2ad6-a596-23a0-1d765249f718@gmx.at> <87tuqjydku.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="28026"; 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 Fri Feb 12 10:58:12 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 1lAVDG-00079B-HH for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 12 Feb 2021 10:58:10 +0100 Original-Received: from localhost ([::1]:49868 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lAVDF-00071e-Jl for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 12 Feb 2021 04:58:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60044) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAVD8-00071G-NI for bug-gnu-emacs@gnu.org; Fri, 12 Feb 2021 04:58:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48423) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lAVD8-0003ev-GK for bug-gnu-emacs@gnu.org; Fri, 12 Feb 2021 04:58:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lAVD8-0001pO-Fe for bug-gnu-emacs@gnu.org; Fri, 12 Feb 2021 04:58: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: Fri, 12 Feb 2021 09:58: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.16131238376974 (code B ref 46299); Fri, 12 Feb 2021 09:58:02 +0000 Original-Received: (at 46299) by debbugs.gnu.org; 12 Feb 2021 09:57:17 +0000 Original-Received: from localhost ([127.0.0.1]:59969 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lAVCO-0001oQ-U5 for submit@debbugs.gnu.org; Fri, 12 Feb 2021 04:57:17 -0500 Original-Received: from relay9-d.mail.gandi.net ([217.70.183.199]:44741) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lAVCM-0001oB-Id for 46299@debbugs.gnu.org; Fri, 12 Feb 2021 04:57:15 -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 relay9-d.mail.gandi.net (Postfix) with ESMTPSA id E8F03FF810; Fri, 12 Feb 2021 09:57:06 +0000 (UTC) In-Reply-To: (Bastian Beranek's message of "Thu, 11 Feb 2021 13:14:53 +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:199851 Archived-At: Hello Bastian, Everything in your patch v7 is correct now, except one case of tab-bar-new-tab-to: >> Would you agree that here in tab-bar-new-tab-to, the first call of >> tab-bar-mode should already do all these calls: tab-bar--update-tab-bar-lines, >> tab-bar--load-buttons, tab-bar--define-keys? So maybe it should be >> sufficient just to leave these 2 lines here: >> >> (when tab-bar-show >> (tab-bar-mode 1)) I noticed this could be optimized not to call tab-bar-mode again every time when tab-bar-mode was already enabled. Maybe use something like this: (when (and (not tab-bar-mode) tab-bar-show) (tab-bar-mode 1)) > Yes I agree that tab-bar--update-tab-bar-lines is not needed. It > happens in the line before when tab-bar-show is not nil and doesn't > matter otherwise. I have left these two lines, though: > > (when tab-bar-mode > (tab-bar--load-buttons) > (tab-bar--define-keys)) I still have doubts whether these lines are needed at all. > Because I think defining the keys is useful even if tab-bar-show is > nil, so you can switch to another tab using the key bindings even if > you can't see the tab-bar. The problem is that tab-bar--define-keys defines only two keys C-TAB and S-C-TAB and [modifier-digit] keys to select a tab by its displayed number that mostly make sense with the visible tab bar. So one of the purposes of the nil value of tab-bar-show was to allow the users also to disable the C-TAB and digit keys. Then users could use C-TAB bindings from other packages, while still using global tab-switching keys such as 'C-x t o', and also to select tabs by names using 'C-x t b', whereas selecting by numbers makes sense only when the tab bar is visible. > As for the buttons, I think it makes sense to load them so that in > case tab-bar-show is customized to another value afterwards they are > available directly. tab-bar--load-buttons and tab-bar--define-keys are called anyway when enabling the tab bar with tab-bar-mode. So these two functions could be called only in tab-bar-mode, but afterwards when it's already enabled, there is no need to call them again.