From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: James N. V. Cash Newsgroups: gmane.emacs.bugs Subject: bug#42052: 28.0.50; tab-bar-mode should be frame-local Date: Sun, 28 Jun 2020 08:15:49 -0400 Message-ID: <871rlzwfm2.fsf@gmail.com> References: <87zh8qq57v.fsf@gmail.com> <87sgegdqmt.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="47175"; mail-complaints-to="usenet@ciao.gmane.io" Cc: , 42052@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 28 14:16:11 2020 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 1jpWED-000CAi-Rk for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 28 Jun 2020 14:16:09 +0200 Original-Received: from localhost ([::1]:60136 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jpWEC-0004NL-KU for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 28 Jun 2020 08:16:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45384) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jpWE6-0004NA-HH for bug-gnu-emacs@gnu.org; Sun, 28 Jun 2020 08:16:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34026) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jpWE6-0004yw-7q for bug-gnu-emacs@gnu.org; Sun, 28 Jun 2020 08:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jpWE6-0007TV-20 for bug-gnu-emacs@gnu.org; Sun, 28 Jun 2020 08:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: James N. V. Cash Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 28 Jun 2020 12:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42052 X-GNU-PR-Package: emacs Original-Received: via spool by 42052-submit@debbugs.gnu.org id=B42052.159334655828724 (code B ref 42052); Sun, 28 Jun 2020 12:16:02 +0000 Original-Received: (at 42052) by debbugs.gnu.org; 28 Jun 2020 12:15:58 +0000 Original-Received: from localhost ([127.0.0.1]:45572 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jpWE2-0007TE-GO for submit@debbugs.gnu.org; Sun, 28 Jun 2020 08:15:58 -0400 Original-Received: from mail-qt1-f180.google.com ([209.85.160.180]:42742) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jpWE0-0007T0-7J for 42052@debbugs.gnu.org; Sun, 28 Jun 2020 08:15:57 -0400 Original-Received: by mail-qt1-f180.google.com with SMTP id e12so10869968qtr.9 for <42052@debbugs.gnu.org>; Sun, 28 Jun 2020 05:15:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:cc:subject:in-reply-to:references :date:message-id:mime-version; bh=T9y8QRX+l8JC77DaqsiIoCxn0iSgCuv0+KBwFoRwYrQ=; b=Bd9WRNM8udHQD0SAiDCsKIo4r0GZ+Be0iutXVT7PQkM38rANW6zkE3vSXa1xJnmmoH xCCVvxjllBg7v7+yOfSQXsDTY3BJq5DP7pf+dYAZ6rUtujOxMFNx4/E3hA7Yn8dPsFwk g5QWk70SrI1jZZi7aEowE56L601DJeRpPNvsHTtBS4n1VWod/p91B6a+hXFsod4jfTlE IdOdhK515KocJ0/a+s4CyQ4OI5/st7F7OoeFF1+rck7z+fwannM0AqznbzrC7R3sIir/ e02/Z1dAWr6RYvozRq7eFFucUvke8x0eJIZPcbjForhwD/M+4o0/f+DQIe949Kn+ZKdI Gqcg== X-Gm-Message-State: AOAM530xzIcGeV608jiuVLLHxIvcIbvVAPzoh8nhMjtma2i/RJHN7RXa AAIYDQzk4EWddNX9J8T8amdQ9SYbUiw= X-Google-Smtp-Source: ABdhPJxMbWtKQjmSADInIofuiWKturpcGmYJjtpFqrhc+7BDfOrMRLHQufss3nwtF/PSicm/YOHwxQ== X-Received: by 2002:ac8:4e50:: with SMTP id e16mr11390625qtw.149.1593346550347; Sun, 28 Jun 2020 05:15:50 -0700 (PDT) Original-Received: from gonk ([2607:f2c0:e360:1126:f1f7:1507:40af:960a]) by smtp.gmail.com with ESMTPSA id a25sm14936489qtk.40.2020.06.28.05.15.49 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 28 Jun 2020 05:15:49 -0700 (PDT) In-Reply-To: <87sgegdqmt.fsf@mail.linkov.net> 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:182458 Archived-At: Juri Linkov writes: >> When setting tab-bar-show to `1`, I expect the tab bar to only show if >> there is more than one tab in the frame. >> > If someone will point out an example of frame-local modes, > this could help in implementing the same for tab-bar-mode. Looking at how the tab-bar-mode currently works, the thing that seems simplest to me would be to change the various functions that conditionally turn tab-bar-mode on/off (e.g. in tab-bar-new-tab-to) to have an additional check if (natnump tab-bar-show), in which case instead of calling (tab-bar-mode 1) or -1, setting the frame parameter tab-bar-lines for that particular frame to be 1 or 0, as appropriate. The wrinkle would be, I suppose, having to remove all the frame-local settings if tab-bar-show changes, but presumably that wouldn't be happening too often. A frame-local toggling of the tab bar could work the same way. If that makes sense (i.e. having the setting be frame local only when tab-bar-show is 1), I can try submitting a patch later today. James Cash