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, 15 Feb 2021 19:01:17 +0200 Organization: LINKOV.NET Message-ID: <87pn11z2n6.fsf@mail.linkov.net> References: <871rdv4xog.fsf@gmail.com> <87v9b2ifrz.fsf@mail.linkov.net> <55ebad56-b440-198a-653e-1660040d5eae@gmx.at> <38b988fd-2ad6-a596-23a0-1d765249f718@gmx.at> <87tuqjydku.fsf@mail.linkov.net> <871rdlr4vc.fsf@mail.linkov.net> <87ft1zsu75.fsf@mail.linkov.net> <87im6ulbzz.fsf@mail.linkov.net> <87sg5xwskc.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39145"; 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 15 18:09:58 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 1lBhNk-000A46-Sf for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Feb 2021 18:09:56 +0100 Original-Received: from localhost ([::1]:57548 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lBhNj-0000U3-Rn for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Feb 2021 12:09:55 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59808) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lBhLu-0006jI-7r for bug-gnu-emacs@gnu.org; Mon, 15 Feb 2021 12:08:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55313) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lBhLu-0006vj-0S for bug-gnu-emacs@gnu.org; Mon, 15 Feb 2021 12:08:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lBhLt-0005sU-Kw for bug-gnu-emacs@gnu.org; Mon, 15 Feb 2021 12:08:01 -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, 15 Feb 2021 17:08:01 +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.161340885922540 (code B ref 46299); Mon, 15 Feb 2021 17:08:01 +0000 Original-Received: (at 46299) by debbugs.gnu.org; 15 Feb 2021 17:07:39 +0000 Original-Received: from localhost ([127.0.0.1]:38620 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lBhLX-0005rU-9h for submit@debbugs.gnu.org; Mon, 15 Feb 2021 12:07:39 -0500 Original-Received: from relay5-d.mail.gandi.net ([217.70.183.197]:35919) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lBhLV-0005rG-Al for 46299@debbugs.gnu.org; Mon, 15 Feb 2021 12:07:38 -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 relay5-d.mail.gandi.net (Postfix) with ESMTPSA id A6AE81C000B; Mon, 15 Feb 2021 17:07:28 +0000 (UTC) In-Reply-To: <87sg5xwskc.fsf@gmail.com> (Bastian Beranek's message of "Mon, 15 Feb 2021 11:09:39 +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:200074 Archived-At: >> Before your patch, I did nothing with the enabled tab-bar, >> but now it disables the tab-bar, and doesn't enable it again later, >> because tab-bar-show is let-bound to nil. > > Could you please describe the desired behavior of tab-switcher in a few > more words? I can't see anything wrong with it if I try it out here, Sorry, this failed in one of the previous versions of the patch, but works fine in the last version of your patch pushed to master. So there is no problem, sorry for false alarm. > although I can sort of see what you're getting at: While the > tab-swicher is active there should be no tab bar, and it should return > when it is finished? Maybe this could provide a nice visual effect, but the problem is that it's not easy to detect the moment when it is finished. I often use tab-switcher to create a new tab, and sometimes instead of selecting an existing tab from the tab list, I change the mind and switch to another buffer in the same new tab. > What I see is that the tab-bar just stays on all the time, with a > temporary tab for the tab-switcher itself. I have tab-bar-show > customized to "1" here. This is fine. > Side question: Why does tab-switcher need to create a tab for its > purpose? Doesn't it make more sense to use a regular buffer for that? This is to emulate window switching feature that exists on most window managers: all windows are unselected when the window switcher is activated. >> A good solution would be to add a new choice value to tab-bar-show. >> Something like 'do-not-change-tab-bar-lines', but shorter. >> Then when let-bound, it should do nothing with the tab-bar-lines. > > Wouldn't it make more sense to have a different variable for that? > Because tab-bar-show is a defcustom and we wouldn't want to expose this > special value to users, right? Exposing such value to users is fine, but anyway it seems there is no need to add a new value or variable. >> Also this is related to another problem: >> What if the user wants to manually enable the tab bar on one frame only >> without enabling tab-bar-mode? Currently it's possible with >> >> (add-hook 'after-make-frame-functions 'toggle-frame-tab-bar) >> >> But tab-bar--update-tab-bar-lines will disable it sooner or later. >> Customizing to the same value like 'do-not-change-tab-bar-lines' >> will solve this problem as well. > > That's true. I can see how tab-bar--update-tab-bar-lines can interfere > with toggle-frame-tab-bar. > > But I think we would need a frame dependent variable to fix this. We > can't use a global single variable, because toggle-frame-tab-bar is not > supposed to change the behavior of tabs on other frames. I have to think > about a good solution for a bit longer. Is attaching a new parameter to > frames similiar to this a possibility? Good idea. Actually frame parameters could serve as a kind of "frame-local variables". > Note that I'm not yet suggesting that we do it exactly as the above, > this has other issues - toggling twice does leave the do-not-change > frame parameter in place for example, so it's not the same as doing > nothing. Also toggling once should handle two cases: 1. while tab-bar-lines is enabled in all frames, it should disable tab-bar-lines in the specified frame; 2. while tab-bar-lines is disabled in all frames, it should enable tab-bar-lines in the specified frame.