From unknown Fri Jun 20 19:48:31 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#42052 <42052@debbugs.gnu.org> To: bug#42052 <42052@debbugs.gnu.org> Subject: Status: 28.0.50; tab-bar-mode should be frame-local Reply-To: bug#42052 <42052@debbugs.gnu.org> Date: Sat, 21 Jun 2025 02:48:31 +0000 retitle 42052 28.0.50; tab-bar-mode should be frame-local reassign 42052 emacs submitter 42052 "James N. V. Cash" severity 42052 wishlist tag 42052 fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 25 17:52:33 2020 Received: (at submit) by debbugs.gnu.org; 25 Jun 2020 21:52:33 +0000 Received: from localhost ([127.0.0.1]:41443 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joZnN-0003XB-4z for submit@debbugs.gnu.org; Thu, 25 Jun 2020 17:52:33 -0400 Received: from lists.gnu.org ([209.51.188.17]:45810) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joYA7-0000cr-PK for submit@debbugs.gnu.org; Thu, 25 Jun 2020 16:07:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59996) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1joYA7-0005yq-Kw for bug-gnu-emacs@gnu.org; Thu, 25 Jun 2020 16:07:55 -0400 Received: from mail-qk1-x729.google.com ([2607:f8b0:4864:20::729]:37752) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1joYA4-0006rk-Gc for bug-gnu-emacs@gnu.org; Thu, 25 Jun 2020 16:07:55 -0400 Received: by mail-qk1-x729.google.com with SMTP id k18so6665227qke.4 for ; Thu, 25 Jun 2020 13:07:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version; bh=gMUt5eZwLOox1ZvGBVkmkx7Fho1pCpQdY7wSYD6+8X8=; b=jcnKMVsDai5Oh/A8nrH3JihEFxqdOOrIhWCzkzMslWF1DeNDFn/fwWMzONeeTFIEVT HE7EnsyzkyGT+Knu2sl7nWuVJbalrM5wnNl+KsiDy5q8cY3GGKOtp5SEIPbZCtvFJeuj 1mdy/skEcuSwHr8ExDkoCuYbVZV8TfoJW2SqFgwcxYlvOvA/QcDCm9/eZsMdNpo83DYR 4MyHfRKXrNwOpmLIoksvDkgNxHooCMto/Gb3LNvT9U7035xnIKJYTtepuPL9OX+mO85+ 1lalWGK11Dajhr+AZ/vEAgTpf7O52/w2yvHYAplFkFZ4Y5KPT525Brd+fU6D93/bXr3j pxZQ== 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:subject:date:message-id:mime-version; bh=gMUt5eZwLOox1ZvGBVkmkx7Fho1pCpQdY7wSYD6+8X8=; b=Broo5VQyBwe06hTQRrxisgHdlCqjM1yKWTHSZRL/HMASlOBXifP4Ia7QqxNmB3TVIW PWmpDZL4UcTOgLcUxi3mqPxIJDiWjF+pfpXpcYFQLbQX3vq6gROpj+5PsLjHF2zP4zYT V/PkB/xSWthOgsGfPb2iEpIrZ22707WrrYrmPyObO3JwzphHjeM8gQmY9fyMbDgme9Bn qTnOP0l5vmPLhNwzb17G04eFVRjzpCXt+wC+2YW3MmcvKJWYwkAGSOP8VuzlCGm8FDOR 0M9MdarKVmE7AzciIAQRNbXi3jrmOsghYogw+F0J8+YlBetcBxFHzbazwztFsagfSEnU LdTg== X-Gm-Message-State: AOAM5330yaPDNLDMJ+OBD+rHcV0JVUpQN4KVtST5+lmaJUzxRoa1Xo2k 5H5m/yTpN7Gx8jB5vLyqcX+OarZKJBk= X-Google-Smtp-Source: ABdhPJxHm+kAagL0tzAFjTxTup/2CR1tU728wDiMLUlZsyzSM4RcRT1rYnpmw7zw8KUJJObk0qzo0Q== X-Received: by 2002:a37:6643:: with SMTP id a64mr10476099qkc.397.1593115670531; Thu, 25 Jun 2020 13:07:50 -0700 (PDT) Received: from gonk ([2607:f2c0:e360:1126:5c1f:c98b:d6d8:1042]) by smtp.gmail.com with ESMTPSA id u6sm7673979qtk.9.2020.06.25.13.07.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 25 Jun 2020 13:07:49 -0700 (PDT) From: "James N. V. Cash" To: bug-gnu-emacs@gnu.org Subject: 28.0.50; tab-bar-mode should be frame-local Date: Thu, 25 Jun 2020 16:07:48 -0400 Message-ID: <87zh8qq57v.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::729; envelope-from=james.nvc@gmail.com; helo=mail-qk1-x729.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 25 Jun 2020 17:52:32 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 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. This behaves as expected when there is only one frame, but if I have multiple frames open, then if any one of them has more than one tab, it turns on tab-bar-mode, which then makes any other frame show the tab bar, even if they only have one tab in them. Would it be possible to have tab-bar-mode showing be frame-local? In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30, cairo version 1.15.10) of 2020-06-20 built on gonk Repository revision: 3af631dcf28a5964d9e56c9be8ee7f2125d90d8a Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.11906000 System Description: Ubuntu 18.04.4 LTS Configured using: 'configure --with-xwidgets --with-cairo' Configured features: XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS XWIDGETS LIBSYSTEMD JSON PDUMPER LCMS2 GMP From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 27 20:18:36 2020 Received: (at 42052) by debbugs.gnu.org; 28 Jun 2020 00:18:36 +0000 Received: from localhost ([127.0.0.1]:44787 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jpL1o-0004B9-Ih for submit@debbugs.gnu.org; Sat, 27 Jun 2020 20:18:36 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:58989) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jpL1l-0004Aq-J8 for 42052@debbugs.gnu.org; Sat, 27 Jun 2020 20:18:34 -0400 X-Originating-IP: 91.129.96.187 Received: from mail.gandi.net (m91-129-96-187.cust.tele2.ee [91.129.96.187]) (Authenticated sender: juri@linkov.net) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 90FF340007; Sun, 28 Jun 2020 00:18:26 +0000 (UTC) From: Juri Linkov To: "James N. V. Cash" Subject: Re: bug#42052: 28.0.50; tab-bar-mode should be frame-local Organization: LINKOV.NET References: <87zh8qq57v.fsf@gmail.com> Date: Sun, 28 Jun 2020 02:40:27 +0300 In-Reply-To: <87zh8qq57v.fsf@gmail.com> (James N. V. Cash's message of "Thu, 25 Jun 2020 16:07:48 -0400") Message-ID: <87sgegdqmt.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42052 Cc: 42052@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > 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. > > This behaves as expected when there is only one frame, but if I have > multiple frames open, then if any one of them has more than one tab, it > turns on tab-bar-mode, which then makes any other frame show the tab > bar, even if they only have one tab in them. > > Would it be possible to have tab-bar-mode showing be frame-local? Thanks for the request, I see this means a request for a new feature of enabling the tab-bar separately on each frame independently from other frames. When some time ago I asked on emacs-devel about the need for a such feature, proposing to add a new function global-tab-bar-mode, no one wanted it. But nevertheless it could be created now anyway. If someone will point out an example of frame-local modes, this could help in implementing the same for tab-bar-mode. I can find only toggle-tool-bar-mode-from-frame, but actually it's still not frame-local. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 28 08:15:58 2020 Received: (at 42052) by debbugs.gnu.org; 28 Jun 2020 12:15:58 +0000 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 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 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) 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) From: James N. V. Cash To: Juri Linkov Subject: Re: bug#42052: 28.0.50; tab-bar-mode should be frame-local In-Reply-To: <87sgegdqmt.fsf@mail.linkov.net> References: <87zh8qq57v.fsf@gmail.com> <87sgegdqmt.fsf@mail.linkov.net> Date: Sun, 28 Jun 2020 08:15:49 -0400 Message-ID: <871rlzwfm2.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 42052 Cc: , 42052@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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 From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 28 15:45:45 2020 Received: (at 42052) by debbugs.gnu.org; 28 Jun 2020 19:45:45 +0000 Received: from localhost ([127.0.0.1]:46958 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jpdFJ-0004BM-85 for submit@debbugs.gnu.org; Sun, 28 Jun 2020 15:45:45 -0400 Received: from mail-qv1-f42.google.com ([209.85.219.42]:43171) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jpdFE-0004B6-My for 42052@debbugs.gnu.org; Sun, 28 Jun 2020 15:45:43 -0400 Received: by mail-qv1-f42.google.com with SMTP id e3so453369qvo.10 for <42052@debbugs.gnu.org>; Sun, 28 Jun 2020 12:45:40 -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=vPi1YbCYGADzfmjxJv2eaim6qBYG/sZ+5FimD2N7MCc=; b=BqPlT8dLtPi0S4Hx+gqx6Bw/6OmxkRwssAY28dJ6X9E3s85CbC6d7sEmgHYGQ52D16 bICWH9XXRd3/iREJH4T8rwUWQve5QCxgWdYH7q6ENyBlYKsSMneGsvZeKMYcxKwPWtIP R5ZXF5O5pq3s0uCLGmQ6LvkMP+c8TgU5BCL0Q+NyBPGwREtDlch7Bi8fCqUHdQrit7nj h5Pg+Z2XcauD61HlUTZ0YfBVkLYOUD4MnJWnBrZS9sbuim6fGdzogu1taEO+w88WuOGJ qVugA6jUvxf90UqO+ogL/6nzrXgaTjw/g04WQT8bNmffj5dvgpv62LwD0RLqAgmoQqDJ AgHA== X-Gm-Message-State: AOAM531uQ7qQUvvMNdk2TQEcd9ziHx3vbQmOK/326F+eM11DpbrhSkIn zNC/m3HVt8oH2Y+kKbZ+G0CCjRpKeLY= X-Google-Smtp-Source: ABdhPJziiAPMEZjrxwwTMrVCAWJid+V/RjdevMsZyWEMZJ8oaqu7I4py+d5oWC5HI0MboW9yM+fp4A== X-Received: by 2002:ad4:5483:: with SMTP id q3mr11617972qvy.99.1593373534853; Sun, 28 Jun 2020 12:45:34 -0700 (PDT) Received: from gonk ([2607:f2c0:e360:1126:b892:e1bb:7c65:665b]) by smtp.gmail.com with ESMTPSA id d14sm3724601qti.41.2020.06.28.12.45.33 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 28 Jun 2020 12:45:34 -0700 (PDT) From: James N. V. Cash To: Juri Linkov Subject: Re: bug#42052: 28.0.50; tab-bar-mode should be frame-local In-Reply-To: <871rlzwfm2.fsf@gmail.com> References: <87zh8qq57v.fsf@gmail.com> <87sgegdqmt.fsf@mail.linkov.net> <871rlzwfm2.fsf@gmail.com> Date: Sun, 28 Jun 2020 15:45:33 -0400 Message-ID: <87wo3rug82.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 42052 Cc: , 42052@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) James N. V. Cash writes: > 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. Here's a simple patch I made that seems to act more like I expect --- /home/james/src/emacs/lisp/tab-bar.el 2020-06-20 10:16:57.177037735 -0400 +++ tab-bar.el 2020-06-28 15:40:38.711147160 -0400 @@ -799,11 +799,16 @@ (run-hook-with-args 'tab-bar-tab-post-open-functions (nth to-index tabs))) - (when (and (not tab-bar-mode) - (or (eq tab-bar-show t) - (and (natnump tab-bar-show) - (> (length tabs) tab-bar-show)))) + (cond + (tab-bar-mode) + ((eq tab-bar-show t) (tab-bar-mode 1)) + ((and (natnump tab-bar-show) + (> (length tabs) tab-bar-show) + (zerop (frame-parameter nil 'tab-bar-lines))) + (progn + (message "show") + (set-frame-parameter nil 'tab-bar-lines 1)))) (force-mode-line-update) (unless tab-bar-mode @@ -936,10 +941,10 @@ tab-bar-closed-tabs) (set-frame-parameter nil 'tabs (delq close-tab tabs))) - (when (and tab-bar-mode + (when (and (not (zerop (frame-parameter nil 'tab-bar-lines))) (and (natnump tab-bar-show) (<= (length tabs) tab-bar-show))) - (tab-bar-mode -1)) + (set-frame-parameter nil 'tab-bar-lines 0)) (force-mode-line-update) (unless tab-bar-mode @@ -975,10 +980,12 @@ (run-hook-with-args 'tab-bar-tab-pre-close-functions (nth index tabs) nil))) (set-frame-parameter nil 'tabs (list (nth current-index tabs))) - (when (and tab-bar-mode - (and (natnump tab-bar-show) - (<= 1 tab-bar-show))) - (tab-bar-mode -1)) + (when (and (not (zerop (frame-parameter nil 'tab-bar-lines))) + (and (natnump tab-bar-show) + (<= (length tabs) tab-bar-show))) + (modify-frame-parameters + nil + (assq-delete-all 'tab-bar-lines (frame-parameters nil)))) (force-mode-line-update) (unless tab-bar-mode From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 28 19:21:45 2020 Received: (at 42052) by debbugs.gnu.org; 28 Jun 2020 23:21:45 +0000 Received: from localhost ([127.0.0.1]:47214 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jpgcL-0005t6-CU for submit@debbugs.gnu.org; Sun, 28 Jun 2020 19:21:45 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:35153) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jpgcH-0005so-EU for 42052@debbugs.gnu.org; Sun, 28 Jun 2020 19:21:43 -0400 X-Originating-IP: 91.129.96.187 Received: from mail.gandi.net (m91-129-96-187.cust.tele2.ee [91.129.96.187]) (Authenticated sender: juri@linkov.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 407F760003; Sun, 28 Jun 2020 23:21:33 +0000 (UTC) From: Juri Linkov To: James N. V. Cash Subject: Re: bug#42052: 28.0.50; tab-bar-mode should be frame-local Organization: LINKOV.NET References: <87zh8qq57v.fsf@gmail.com> <87sgegdqmt.fsf@mail.linkov.net> <871rlzwfm2.fsf@gmail.com> <87wo3rug82.fsf@gmail.com> Date: Mon, 29 Jun 2020 02:18:57 +0300 In-Reply-To: <87wo3rug82.fsf@gmail.com> (James N. V. Cash's message of "Sun, 28 Jun 2020 15:45:33 -0400") Message-ID: <87pn9idbj2.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42052 Cc: 42052@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> 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. > > Here's a simple patch I made that seems to act more like I expect Thanks for the patch. One problem is that directly changing the frame parameter tab-bar-lines avoids performing some other settings in tab-bar-mode such as loading button images and changing some keybindings. OTOH, these keybindings can't be frame-local anyway, so maybe this is not important for the case when tab-bar-show is 1. > + ((and (natnump tab-bar-show) > + (> (length tabs) tab-bar-show) > + (zerop (frame-parameter nil 'tab-bar-lines))) > + (progn > + (message "show") > + (set-frame-parameter nil 'tab-bar-lines 1)))) Please don't forget to remove this debugging message in the final patch. > @@ -975,10 +980,12 @@ > (run-hook-with-args 'tab-bar-tab-pre-close-functions (nth index tabs) nil))) > (set-frame-parameter nil 'tabs (list (nth current-index tabs))) > > - (when (and tab-bar-mode > - (and (natnump tab-bar-show) > - (<= 1 tab-bar-show))) > - (tab-bar-mode -1)) > + (when (and (not (zerop (frame-parameter nil 'tab-bar-lines))) > + (and (natnump tab-bar-show) > + (<= (length tabs) tab-bar-show))) > + (modify-frame-parameters > + nil > + (assq-delete-all 'tab-bar-lines (frame-parameters nil)))) Unlike other places that simply use (set-frame-parameter nil 'tab-bar-lines 0) this code is more complex. But it seems it should work with just (set-frame-parameter nil 'tab-bar-lines 0) as well. BTW, I see a problem in the old code: the variable 'tabs' is not always updated and sometimes contains obsolete data. It should help to replace (<= (length tabs) tab-bar-show) with (<= (length (funcall tab-bar-tabs-function)) tab-bar-show) that gets fresh data. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 28 20:26:39 2020 Received: (at 42052) by debbugs.gnu.org; 29 Jun 2020 00:26:39 +0000 Received: from localhost ([127.0.0.1]:47240 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jphd9-0007Zz-Fe for submit@debbugs.gnu.org; Sun, 28 Jun 2020 20:26:39 -0400 Received: from mail-qk1-f172.google.com ([209.85.222.172]:44018) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jphd6-0007Zk-Ms for 42052@debbugs.gnu.org; Sun, 28 Jun 2020 20:26:39 -0400 Received: by mail-qk1-f172.google.com with SMTP id c30so9993790qka.10 for <42052@debbugs.gnu.org>; Sun, 28 Jun 2020 17:26:36 -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=EV5IH6ynzd4cfwT3arethQFTv+semTA+WndNu4DWQg0=; b=nXrpQEqIZrx7I1OoNDTfaVLhOyPw180pE/cAyvPsza6Ay1yD7SCQ4ebq9h/XSLYF7W sRrNrZFD4bvJY/zKom87UbXfNKMruRUursfbGEn9EwXO2tnJyDPFGGKf+hfhe+mzCkpc jfJ5Ew1vrlGYCbw5bUaEeTEo+qOI5zHpG3vyhMGuGqGTIfSjrW8KYUpaw/vY+VChAxqK wq6urTS+eD1mudUob3cXBmZ1Y18vLmTZjT07lRvfY1JrDXxqJpFmMRvU8DpeB11MniNR LQA1E65KnRxFBqLVl1ZMdTMwNTlp2kZKxPlgon4CmbXH9hyQkvrkC1bCvretyAZKNwWw FV6w== X-Gm-Message-State: AOAM531W6tO9fZvhAA38IfpLRo0hpBkrqvX36zNo15AWOodAofL7E4MI gUJH66QrR5bzgUJXLMi+bLJ1F9TJaLE= X-Google-Smtp-Source: ABdhPJxhcftc07EmZ5AiVcjmN68Bw2T0uU9/srYB6+YCZmBhJ+GvtrFk2IWVNwyGg7Qwqmd3RKoYpg== X-Received: by 2002:ae9:ea13:: with SMTP id f19mr7115201qkg.331.1593390390953; Sun, 28 Jun 2020 17:26:30 -0700 (PDT) Received: from gonk ([2607:f2c0:e360:1126:b892:e1bb:7c65:665b]) by smtp.gmail.com with ESMTPSA id w28sm12109912qkw.92.2020.06.28.17.26.30 for <42052@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 28 Jun 2020 17:26:30 -0700 (PDT) From: James N. V. Cash To: 42052@debbugs.gnu.org Subject: Re: bug#42052: 28.0.50; tab-bar-mode should be frame-local In-Reply-To: <87pn9idbj2.fsf@mail.linkov.net> References: <87zh8qq57v.fsf@gmail.com> <87sgegdqmt.fsf@mail.linkov.net> <871rlzwfm2.fsf@gmail.com> <87wo3rug82.fsf@gmail.com> <87pn9idbj2.fsf@mail.linkov.net> Date: Sun, 28 Jun 2020 20:26:29 -0400 Message-ID: <87pn9ivhsa.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 42052 Cc: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Juri Linkov writes: > Please don't forget to remove this debugging message in the final patch. Oh oops, sorry about that. > Unlike other places that simply use (set-frame-parameter nil 'tab-bar-lines 0) > this code is more complex. But it seems it should work with just > (set-frame-parameter nil 'tab-bar-lines 0) as well. Ah, right. I was thinking that > BTW, I see a problem in the old code: the variable 'tabs' is not always updated > and sometimes contains obsolete data. It should help to replace > > (<= (length tabs) tab-bar-show) > > with > > (<= (length (funcall tab-bar-tabs-function)) tab-bar-show) > > that gets fresh data. That makes sense. Here's another patch that addresses this issues, although as you say, it still doesn't address the issue of loading the button images or changing keybindings. --- /home/james/src/emacs/lisp/tab-bar.el 2020-06-20 10:16:57.177037735 -0400 +++ /home/james/tmp/tab-bar.el 2020-06-28 20:15:46.073203151 -0400 @@ -799,11 +799,14 @@ (run-hook-with-args 'tab-bar-tab-post-open-functions (nth to-index tabs))) - (when (and (not tab-bar-mode) - (or (eq tab-bar-show t) - (and (natnump tab-bar-show) - (> (length tabs) tab-bar-show)))) + (cond + (tab-bar-mode) + ((eq tab-bar-show t) (tab-bar-mode 1)) + ((and (natnump tab-bar-show) + (> (length (funcall tab-bar-tabs-function)) tab-bar-show) + (zerop (frame-parameter nil 'tab-bar-lines))) + (set-frame-parameter nil 'tab-bar-lines 1))) (force-mode-line-update) (unless tab-bar-mode @@ -936,10 +939,11 @@ tab-bar-closed-tabs) (set-frame-parameter nil 'tabs (delq close-tab tabs))) - (when (and tab-bar-mode - (and (natnump tab-bar-show) - (<= (length tabs) tab-bar-show))) - (tab-bar-mode -1)) + (when (and (not (zerop (frame-parameter nil 'tab-bar-lines))) + (natnump tab-bar-show) + (<= (length (funcall tab-bar-tabs-function)) + tab-bar-show)) + (set-frame-parameter nil 'tab-bar-lines 0)) (force-mode-line-update) (unless tab-bar-mode @@ -975,10 +979,11 @@ (run-hook-with-args 'tab-bar-tab-pre-close-functions (nth index tabs) nil))) (set-frame-parameter nil 'tabs (list (nth current-index tabs))) - (when (and tab-bar-mode - (and (natnump tab-bar-show) - (<= 1 tab-bar-show))) - (tab-bar-mode -1)) + (when (and (not (zerop (frame-parameter nil 'tab-bar-lines))) + (natnump tab-bar-show) + (<= (length (funcall tab-bar-tabs-function)) + tab-bar-show)) + (set-frame-parameter nil 'tab-bar-lines 0)) (force-mode-line-update) (unless tab-bar-mode From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 28 20:35:12 2020 Received: (at 42052) by debbugs.gnu.org; 29 Jun 2020 00:35:12 +0000 Received: from localhost ([127.0.0.1]:47256 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jphlQ-0007og-5d for submit@debbugs.gnu.org; Sun, 28 Jun 2020 20:35:12 -0400 Received: from mail-qk1-f169.google.com ([209.85.222.169]:45117) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jphlM-0007oN-FJ for 42052@debbugs.gnu.org; Sun, 28 Jun 2020 20:35:10 -0400 Received: by mail-qk1-f169.google.com with SMTP id c139so13844033qkg.12 for <42052@debbugs.gnu.org>; Sun, 28 Jun 2020 17:35:08 -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:subject:in-reply-to:references:date :message-id:mime-version; bh=+wGjYfBx+Yn8Io9jWleH1l18f48Wx5SPFvh5yOiO9wc=; b=dAGrI+AroQ4sXe9zMjipNl92kcwjK5G1f8sM8PNWLQJ+OO5YF+tdLqDQN/nZtQjEgi GUJIGEw9FAqsjbd0GoJw8ctOHQRv3dmsPXjEnlXHqVVEEpznkp62hAA/VGqvjBVBzqPl YCE1K1nPRflVZhSlDP9+p1IvQcr84DJr5sS05JM2F49HDW3rm6sQ918pu8nRqakuqNdx j427VgwiufnCrMhFd9DvCx/7/FpUMO2Cu8wAiJcf2geFmNf+QUlP/9vAOnD2P8Hha/Bn +I7PiLICCS4Fbbw/EjVm8qfKOyFEW80MVzR4tufcRLjMKLsRiYYgo04jMTRxDjjYHsZ0 2X0A== X-Gm-Message-State: AOAM530ZzkBOai1kVoQXtE7g0MfhM+TfTtdhjRYeEjUC5cZSruGuJQJP zzP2Ox4jGiWI+x66P/Orcin0oOcdc8g= X-Google-Smtp-Source: ABdhPJy1iAiPuPKV2cjP/Cuf2y1ckCQQ+XWA3GhtTnpL88pn5d6MdUWesV+NQcTudCqDSlE5KcCuNQ== X-Received: by 2002:ae9:ef83:: with SMTP id d125mr12791300qkg.287.1593390902691; Sun, 28 Jun 2020 17:35:02 -0700 (PDT) Received: from gonk ([2607:f2c0:e360:1126:b892:e1bb:7c65:665b]) by smtp.gmail.com with ESMTPSA id i26sm9038317qkh.14.2020.06.28.17.35.01 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 28 Jun 2020 17:35:02 -0700 (PDT) From: James N. V. Cash To: Juri Linkov Subject: Re: bug#42052: 28.0.50; tab-bar-mode should be frame-local In-Reply-To: <87pn9ivhsa.fsf@gmail.com> References: <87zh8qq57v.fsf@gmail.com> <87sgegdqmt.fsf@mail.linkov.net> <871rlzwfm2.fsf@gmail.com> <87wo3rug82.fsf@gmail.com> <87pn9idbj2.fsf@mail.linkov.net> <87pn9ivhsa.fsf@gmail.com> Date: Sun, 28 Jun 2020 20:35:01 -0400 Message-ID: <87eepyvhe2.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 42052 Cc: 42052@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) James N. V. Cash writes: >> Unlike other places that simply use (set-frame-parameter nil 'tab-bar-lines 0) >> this code is more complex. But it seems it should work with just >> (set-frame-parameter nil 'tab-bar-lines 0) as well. > > Ah, right. I was thinking that Oof, sorry, my brain is just melting today. Meant to write: "I was thinking that removing the tab-bar-lines would allow switching tab-bar-mode on or off global work properly, but then looking at the implementation, I see that it sets the frame parameter explicitly when toggling on/off in any case." From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 29 19:47:01 2020 Received: (at 42052) by debbugs.gnu.org; 29 Jun 2020 23:47:01 +0000 Received: from localhost ([127.0.0.1]:49772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jq3UL-0004Lo-2f for submit@debbugs.gnu.org; Mon, 29 Jun 2020 19:47:01 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:34387) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jq3UI-0004LY-NK for 42052@debbugs.gnu.org; Mon, 29 Jun 2020 19:46:59 -0400 X-Originating-IP: 91.129.96.187 Received: from mail.gandi.net (m91-129-96-187.cust.tele2.ee [91.129.96.187]) (Authenticated sender: juri@linkov.net) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 6CD4820006; Mon, 29 Jun 2020 23:46:50 +0000 (UTC) From: Juri Linkov To: James N. V. Cash Subject: Re: bug#42052: 28.0.50; tab-bar-mode should be frame-local Organization: LINKOV.NET References: <87zh8qq57v.fsf@gmail.com> <87sgegdqmt.fsf@mail.linkov.net> <871rlzwfm2.fsf@gmail.com> <87wo3rug82.fsf@gmail.com> <87pn9idbj2.fsf@mail.linkov.net> <87pn9ivhsa.fsf@gmail.com> Date: Tue, 30 Jun 2020 02:45:55 +0300 In-Reply-To: <87pn9ivhsa.fsf@gmail.com> (James N. V. Cash's message of "Sun, 28 Jun 2020 20:26:29 -0400") Message-ID: <87zh8liggc.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42052 Cc: 42052@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Here's another patch that addresses this issues, although as you say, it > still doesn't address the issue of loading the button images or changing > keybindings. Thanks, pushed to master. If you have more ideas for further development, this report could be left open to address these issues too. From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 09 13:06:54 2020 Received: (at 42052) by debbugs.gnu.org; 9 Jul 2020 17:06:54 +0000 Received: from localhost ([127.0.0.1]:41572 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jta0c-0000bR-55 for submit@debbugs.gnu.org; Thu, 09 Jul 2020 13:06:54 -0400 Received: from mail-qk1-f179.google.com ([209.85.222.179]:37191) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jta0X-0000bB-Pd for 42052@debbugs.gnu.org; Thu, 09 Jul 2020 13:06:52 -0400 Received: by mail-qk1-f179.google.com with SMTP id k18so2503488qke.4 for <42052@debbugs.gnu.org>; Thu, 09 Jul 2020 10:06:49 -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=tfo1V/LH7UeXNyJPy3MLKnIWZj1lVcvTAXFn4GiqqPM=; b=Po5SzNAJecFXXwZAXGgLMeZjHy6teyL4ZcK+JkMpms8NZRxalw4oNhAMpTknNTBs2R xA804EjQ+GOGp/sl+/iodGLezxJeBvu4Cz6hsDGjmYAhMN2Ttvil3NBdvNi/piQN64yP S6SZ6yIfLRpTNysFmWOiF4Y5KIOYMlbjmoI02xNJXz9c+2oRY2UqTn3Q1FFXvp0ADKWS 546aq9hRr36HjgfP9qS7ezx0ZjvFQoygcn8h/KPuP3EPoDV7i6ooHdTri300+sEtm+O8 wkLBUqnsKzQIqIOwbBIwdgv704fqPMkzjmytqvJZ8u0KdfbFjaH9ocrdSqwY4HcRWn0H XrFQ== X-Gm-Message-State: AOAM531IICWLbEPBC+hIOzutgtQ0B+sxLl+1DnkVOjAk5e6ndjGy/ocO gNoCUkYk+5GAgOrANYtTSLyWKMfzrM4= X-Google-Smtp-Source: ABdhPJxUuh2IPWp3OfBN3peZrxj3q9BjT3iv4TJZym5XBIUH4Ej/CEbgh0w8E3eKzUJUwy/SsRem2Q== X-Received: by 2002:a37:4d90:: with SMTP id a138mr57879717qkb.363.1594314403643; Thu, 09 Jul 2020 10:06:43 -0700 (PDT) Received: from gonk ([2607:f2c0:e360:1126:102c:c1f3:1533:8899]) by smtp.gmail.com with ESMTPSA id e129sm4508550qkf.132.2020.07.09.10.06.42 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 09 Jul 2020 10:06:42 -0700 (PDT) From: James N. V. Cash To: Juri Linkov Subject: Re: bug#42052: 28.0.50; tab-bar-mode should be frame-local In-Reply-To: <87zh8liggc.fsf@mail.linkov.net> References: <87zh8qq57v.fsf@gmail.com> <87sgegdqmt.fsf@mail.linkov.net> <871rlzwfm2.fsf@gmail.com> <87wo3rug82.fsf@gmail.com> <87pn9idbj2.fsf@mail.linkov.net> <87pn9ivhsa.fsf@gmail.com> <87zh8liggc.fsf@mail.linkov.net> Date: Thu, 09 Jul 2020 13:06:41 -0400 Message-ID: <874kqgpqhq.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 42052 Cc: , 42052@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Juri Linkov writes: > Thanks, pushed to master. If you have more ideas for further development, > this report could be left open to address these issues too. I've attached another patch that makes the key bindings & xpm icons get loaded when tab-bar-show is 1 as well. It doesn't un-load the keybindings in the way that globalling toggling tab-bar-mode off, but I don't really see a sensible way of doing that frame-locally. --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -95,23 +95,27 @@ tab-bar-select-tab-modifiers :version "27.1") -(define-minor-mode tab-bar-mode - "Toggle the tab bar in all graphical frames (Tab Bar mode)." - :global t - ;; It's defined in C/cus-start, this stops the d-m-m macro defining it again. - :variable tab-bar-mode - (let ((val (if tab-bar-mode 1 0))) - (dolist (frame (frame-list)) - (set-frame-parameter frame 'tab-bar-lines val)) - ;; If the user has given `default-frame-alist' a `tab-bar-lines' - ;; parameter, replace it. - (if (assq 'tab-bar-lines default-frame-alist) - (setq default-frame-alist - (cons (cons 'tab-bar-lines val) - (assq-delete-all 'tab-bar-lines - default-frame-alist))))) - - (when (and tab-bar-mode tab-bar-new-button +(defun tab-bar--define-keys () + "Install key bindings for switching between tabs if the user has +configured them." + (when tab-bar-select-tab-modifiers + (global-set-key (vector (append tab-bar-select-tab-modifiers (list ?0))) + 'tab-bar-switch-to-recent-tab) + (dotimes (i 9) + (global-set-key (vector (append tab-bar-select-tab-modifiers + (list (+ i 1 ?0)))) + 'tab-bar-select-tab))) + ;; Don't override user customized key bindings + (unless (global-key-binding [(control tab)]) + (global-set-key [(control tab)] 'tab-next)) + (unless (global-key-binding [(control shift tab)]) + (global-set-key [(control shift tab)] 'tab-previous)) + (unless (global-key-binding [(control shift iso-lefttab)]) + (global-set-key [(control shift iso-lefttab)] 'tab-previous))) + +(defun tab-bar--load-buttons () + "Load the icons for the tab buttons." + (when (and tab-bar-new-button (not (get-text-property 0 'display tab-bar-new-button))) ;; This file is pre-loaded so only here we can use the right data-directory: (add-text-properties 0 (length tab-bar-new-button) @@ -121,7 +125,7 @@ tab-bar-mode :ascent center)) tab-bar-new-button)) - (when (and tab-bar-mode tab-bar-close-button + (when (and tab-bar-close-button (not (get-text-property 0 'display tab-bar-close-button))) ;; This file is pre-loaded so only here we can use the right data-directory: (add-text-properties 0 (length tab-bar-close-button) @@ -129,24 +133,27 @@ tab-bar-mode :file "tabs/close.xpm" :margin (2 . 0) :ascent center)) - tab-bar-close-button)) + tab-bar-close-button))) +(define-minor-mode tab-bar-mode + "Toggle the tab bar in all graphical frames (Tab Bar mode)." + :global t + ;; It's defined in C/cus-start, this stops the d-m-m macro defining it again. + :variable tab-bar-mode + (let ((val (if tab-bar-mode 1 0))) + (dolist (frame (frame-list)) + (set-frame-parameter frame 'tab-bar-lines val)) + ;; If the user has given `default-frame-alist' a `tab-bar-lines' + ;; parameter, replace it. + (if (assq 'tab-bar-lines default-frame-alist) + (setq default-frame-alist + (cons (cons 'tab-bar-lines val) + (assq-delete-all 'tab-bar-lines + default-frame-alist))))) + (when tab-bar-mode + (tab-bar--load-buttons)) (if tab-bar-mode - (progn - (when tab-bar-select-tab-modifiers - (global-set-key (vector (append tab-bar-select-tab-modifiers (list ?0))) - 'tab-bar-switch-to-recent-tab) - (dotimes (i 9) - (global-set-key (vector (append tab-bar-select-tab-modifiers - (list (+ i 1 ?0)))) - 'tab-bar-select-tab))) - ;; Don't override user customized key bindings - (unless (global-key-binding [(control tab)]) - (global-set-key [(control tab)] 'tab-next)) - (unless (global-key-binding [(control shift tab)]) - (global-set-key [(control shift tab)] 'tab-previous)) - (unless (global-key-binding [(control shift iso-lefttab)]) - (global-set-key [(control shift iso-lefttab)] 'tab-previous))) + (tab-bar--define-keys) ;; Unset only keys bound by tab-bar (when (eq (global-key-binding [(control tab)]) 'tab-next) (global-unset-key [(control tab)])) @@ -806,7 +813,10 @@ tab-bar-new-tab-to ((and (natnump tab-bar-show) (> (length (funcall tab-bar-tabs-function)) tab-bar-show) (zerop (frame-parameter nil 'tab-bar-lines))) - (set-frame-parameter nil 'tab-bar-lines 1))) + (progn + (tab-bar--load-buttons) + (tab-bar--define-keys) + (set-frame-parameter nil 'tab-bar-lines 1)))) (force-mode-line-update) (unless tab-bar-mode From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 09 20:03:56 2020 Received: (at 42052) by debbugs.gnu.org; 10 Jul 2020 00:03:56 +0000 Received: from localhost ([127.0.0.1]:41892 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtgWC-0006mq-88 for submit@debbugs.gnu.org; Thu, 09 Jul 2020 20:03:56 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:55435) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtgW9-0006mP-Mb for 42052@debbugs.gnu.org; Thu, 09 Jul 2020 20:03:55 -0400 X-Originating-IP: 91.129.103.18 Received: from mail.gandi.net (m91-129-103-18.cust.tele2.ee [91.129.103.18]) (Authenticated sender: juri@linkov.net) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id F0A9EE0007; Fri, 10 Jul 2020 00:03:45 +0000 (UTC) From: Juri Linkov To: James N. V. Cash Subject: Re: bug#42052: 28.0.50; tab-bar-mode should be frame-local Organization: LINKOV.NET References: <87zh8qq57v.fsf@gmail.com> <87sgegdqmt.fsf@mail.linkov.net> <871rlzwfm2.fsf@gmail.com> <87wo3rug82.fsf@gmail.com> <87pn9idbj2.fsf@mail.linkov.net> <87pn9ivhsa.fsf@gmail.com> <87zh8liggc.fsf@mail.linkov.net> <874kqgpqhq.fsf@gmail.com> Date: Fri, 10 Jul 2020 02:49:42 +0300 In-Reply-To: <874kqgpqhq.fsf@gmail.com> (James N. V. Cash's message of "Thu, 09 Jul 2020 13:06:41 -0400") Message-ID: <871rlkckq1.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42052 Cc: 42052@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > I've attached another patch that makes the key bindings & xpm icons get > loaded when tab-bar-show is 1 as well. It doesn't un-load the > keybindings in the way that globalling toggling tab-bar-mode off, but I > don't really see a sensible way of doing that frame-locally. I don't know if such thing as frame-local keybindings is currently possible. The manual at (info "(elisp) Searching Keymaps") shows the decision tree: (or (if overriding-terminal-local-map (FIND-IN overriding-terminal-local-map)) (if overriding-local-map (FIND-IN overriding-local-map) (or (FIND-IN (get-char-property (point) 'keymap)) (FIND-IN-ANY emulation-mode-map-alists) (FIND-IN-ANY minor-mode-overriding-map-alist) (FIND-IN-ANY minor-mode-map-alist) (if (get-text-property (point) 'local-map) (FIND-IN (get-char-property (point) 'local-map)) (FIND-IN (current-local-map))))) (FIND-IN (current-global-map))) If the variable `overriding-terminal-local-map` can't be made frame-local, then maybe a new rule could be added. Then like `(get-char-property (point) 'keymap)` gets a keymap at point, a new rule could get a keymap from the frame alist. From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 11 10:45:44 2020 Received: (at 42052) by debbugs.gnu.org; 11 Jul 2020 14:45:44 +0000 Received: from localhost ([127.0.0.1]:44779 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1juGl6-00061o-Ct for submit@debbugs.gnu.org; Sat, 11 Jul 2020 10:45:44 -0400 Received: from mail-qk1-f170.google.com ([209.85.222.170]:39825) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1juGl4-00061c-Dm for 42052@debbugs.gnu.org; Sat, 11 Jul 2020 10:45:43 -0400 Received: by mail-qk1-f170.google.com with SMTP id l6so8160480qkc.6 for <42052@debbugs.gnu.org>; Sat, 11 Jul 2020 07:45:42 -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=KjIjDI/BX07A60WnuxOFY5va3mUL48Qym+rd1M3tE6U=; b=RKWdL9bTOtdjVlt2LMSsS9deATNIXYexPEkAvBVWa8nZtn++vW652HffQ18bQI5eDm /65eNc39gKEgNlxDDo5NoBlyyz7sK5X1OMvD1WNx0InLi0UjMfHWTtsy+Zj6umJehqbe F7C5EAToNqix4i2p8KzJ97eiOI3Jj453am5pu8wLSdcEgBkVHhGL5ep8qgX904WAkIVd AFc7LOK5ygBllKvg4o4m3JIgPx3RLL2DhhvsmLRfb8uzqKLeZAzlSDb8x4KoT4hMmgWP F1S1EqgAQp6US5mnf4Y5qkojavsdIQ6rzcDH9Sc5o5mdAI2YUyajjKt3tk9+aHolieT/ CsWw== X-Gm-Message-State: AOAM5325n9GZL3RFaYfiNwAtiCu8DOP1ZYHa6CwI6/jCucZ+LLP/dqgX QQvBmfN9vvYYL4OLyXX7iu7zFQyK8l91Fw== X-Google-Smtp-Source: ABdhPJzgZpu9DNuaeo4sjMlbhzlZ+eurmRr41akdHlga6vhrT9g4rzx+4uZzXJXV+HzJjkxTKmT5Ig== X-Received: by 2002:a37:9bc9:: with SMTP id d192mr71950365qke.409.1594478736526; Sat, 11 Jul 2020 07:45:36 -0700 (PDT) Received: from gonk ([2607:f2c0:e360:1126:a0e9:4921:f3ee:b2fb]) by smtp.gmail.com with ESMTPSA id v184sm11787594qki.12.2020.07.11.07.45.35 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 11 Jul 2020 07:45:35 -0700 (PDT) From: James N. V. Cash To: Juri Linkov Subject: Re: bug#42052: 28.0.50; tab-bar-mode should be frame-local In-Reply-To: <871rlkckq1.fsf@mail.linkov.net> References: <87zh8qq57v.fsf@gmail.com> <87sgegdqmt.fsf@mail.linkov.net> <871rlzwfm2.fsf@gmail.com> <87wo3rug82.fsf@gmail.com> <87pn9idbj2.fsf@mail.linkov.net> <87pn9ivhsa.fsf@gmail.com> <87zh8liggc.fsf@mail.linkov.net> <874kqgpqhq.fsf@gmail.com> <871rlkckq1.fsf@mail.linkov.net> Date: Sat, 11 Jul 2020 10:45:35 -0400 Message-ID: <87sgdym7ow.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 42052 Cc: , 42052@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Juri Linkov writes: >> I've attached another patch that makes the key bindings & xpm icons get >> loaded when tab-bar-show is 1 as well. It doesn't un-load the >> keybindings in the way that globalling toggling tab-bar-mode off, but I >> don't really see a sensible way of doing that frame-locally. > > ... > > If the variable `overriding-terminal-local-map` can't be made frame-local, > then maybe a new rule could be added. Then like `(get-char-property (point) 'keymap)` > gets a keymap at point, a new rule could get a keymap from the frame alist. I can look into that as a generally useful addition. For this particular case though, I don't know if it's completely necessary: The functions that are bound to keys here silently do nothing if there's only one tab and the bindings don't get added if there are other bindings for those keys, so as far as I can tell, it shouldn't really make a difference whether or not the bindings are active when the tab bar isn't visible. It is entirely possible I'm missing something though and it certainly does seem "cleaner" to remove the key bindings when they don't need to be there. From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 11 11:17:13 2020 Received: (at 42052) by debbugs.gnu.org; 11 Jul 2020 15:17:13 +0000 Received: from localhost ([127.0.0.1]:44784 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1juHFZ-0006nz-09 for submit@debbugs.gnu.org; Sat, 11 Jul 2020 11:17:13 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:30910) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1juHFW-0006nl-BS for 42052@debbugs.gnu.org; Sat, 11 Jul 2020 11:17:12 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 7C7B41012E2; Sat, 11 Jul 2020 11:17:04 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 83C471012BA; Sat, 11 Jul 2020 11:17:02 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1594480622; bh=a3OpyjYyjabTbXpqxAWdrYA8xnKzc6vtfJmcLqP0PIc=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=iodF5w4gbk7KTiVwMB/uXaJ10kUVyOGYEWQRIdqzbFS6cCHZYkDZlawndy1G5pqSD bUZVsGQjOHvw/9D6CVAgEnSuHdQKMA4+EwJ9nKhLzGgPtX+zK0jkEYXwBOKK8m0cm3 xiz2zhKQH9Idp5nR1tbXu0lu3EGQU+oRjoirFiF1/CvvsOFraFny2OOEN/wGhza7gd wJ1Gf+OgzFdCT1scZGAidl9gwhKifW8K2doCX5xR4I0YUkZZ8RVzAB3awo9p/laBY5 MJkB+rtACf33VdWM8OKKMhCVISHNS5tAVxnEBvVBZ3etPxNDAzJ4oRe56tgUPFbUX1 7McgKhJuhACBg== Received: from alfajor (unknown [216.154.19.75]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 39938120AAD; Sat, 11 Jul 2020 11:17:02 -0400 (EDT) From: Stefan Monnier To: Juri Linkov Subject: Re: bug#42052: 28.0.50; tab-bar-mode should be frame-local Message-ID: References: <87zh8qq57v.fsf@gmail.com> <87sgegdqmt.fsf@mail.linkov.net> <871rlzwfm2.fsf@gmail.com> <87wo3rug82.fsf@gmail.com> <87pn9idbj2.fsf@mail.linkov.net> <87pn9ivhsa.fsf@gmail.com> <87zh8liggc.fsf@mail.linkov.net> <874kqgpqhq.fsf@gmail.com> <871rlkckq1.fsf@mail.linkov.net> Date: Sat, 11 Jul 2020 11:17:01 -0400 In-Reply-To: <871rlkckq1.fsf@mail.linkov.net> (Juri Linkov's message of "Fri, 10 Jul 2020 02:49:42 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.087 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42052 Cc: "James N. V. Cash" , 42052@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > I don't know if such thing as frame-local keybindings is currently possible. > > The manual at (info "(elisp) Searching Keymaps") shows the decision tree: FWIW, I think it would be nice to eliminate the last few remaining places where we collect the active keymaps by hand rather than by calling Fcurrent_active_maps. Then we could allow Elisp code to modify the behavior of `current-active-maps`. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 11 20:35:06 2020 Received: (at 42052) by debbugs.gnu.org; 12 Jul 2020 00:35:06 +0000 Received: from localhost ([127.0.0.1]:45084 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1juPxS-0007je-6A for submit@debbugs.gnu.org; Sat, 11 Jul 2020 20:35:06 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:63407) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1juPxQ-0007i4-UJ for 42052@debbugs.gnu.org; Sat, 11 Jul 2020 20:35:05 -0400 X-Originating-IP: 91.129.103.18 Received: from mail.gandi.net (m91-129-103-18.cust.tele2.ee [91.129.103.18]) (Authenticated sender: juri@linkov.net) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 3D39840006; Sun, 12 Jul 2020 00:34:56 +0000 (UTC) From: Juri Linkov To: James N. V. Cash Subject: Re: bug#42052: 28.0.50; tab-bar-mode should be frame-local Organization: LINKOV.NET References: <87zh8qq57v.fsf@gmail.com> <87sgegdqmt.fsf@mail.linkov.net> <871rlzwfm2.fsf@gmail.com> <87wo3rug82.fsf@gmail.com> <87pn9idbj2.fsf@mail.linkov.net> <87pn9ivhsa.fsf@gmail.com> <87zh8liggc.fsf@mail.linkov.net> <874kqgpqhq.fsf@gmail.com> <871rlkckq1.fsf@mail.linkov.net> <87sgdym7ow.fsf@gmail.com> Date: Sun, 12 Jul 2020 03:01:15 +0300 In-Reply-To: <87sgdym7ow.fsf@gmail.com> (James N. V. Cash's message of "Sat, 11 Jul 2020 10:45:35 -0400") Message-ID: <87y2npzjn8.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42052 Cc: 42052@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > For this particular case though, I don't know if it's completely > necessary: The functions that are bound to keys here silently do nothing > if there's only one tab and the bindings don't get added if there are > other bindings for those keys, so as far as I can tell, it shouldn't > really make a difference whether or not the bindings are active when the > tab bar isn't visible. The answer depends on another question: why bother unsetting tab-bar keys while disabling tab-bar-mode globally? I mean the lines in tab-bar-mode after ";; Unset only keys bound by tab-bar". Maybe it's useful to make the keybindings space cleaner? PS: please see the bug report sent yesterday to emacs-devel at https://lists.gnu.org/archive/html/emacs-devel/2020-07/msg00251.html It seems the variable tab-bar-mode should be frame-local. From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 11 20:35:10 2020 Received: (at 42052) by debbugs.gnu.org; 12 Jul 2020 00:35:10 +0000 Received: from localhost ([127.0.0.1]:45087 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1juPxW-0007jt-F2 for submit@debbugs.gnu.org; Sat, 11 Jul 2020 20:35:10 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:4703) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1juPxV-0007j3-3j for 42052@debbugs.gnu.org; Sat, 11 Jul 2020 20:35:09 -0400 X-Originating-IP: 91.129.103.18 Received: from mail.gandi.net (m91-129-103-18.cust.tele2.ee [91.129.103.18]) (Authenticated sender: juri@linkov.net) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 2C5DC240003; Sun, 12 Jul 2020 00:35:00 +0000 (UTC) From: Juri Linkov To: Stefan Monnier Subject: Re: bug#42052: 28.0.50; tab-bar-mode should be frame-local Organization: LINKOV.NET References: <87zh8qq57v.fsf@gmail.com> <87sgegdqmt.fsf@mail.linkov.net> <871rlzwfm2.fsf@gmail.com> <87wo3rug82.fsf@gmail.com> <87pn9idbj2.fsf@mail.linkov.net> <87pn9ivhsa.fsf@gmail.com> <87zh8liggc.fsf@mail.linkov.net> <874kqgpqhq.fsf@gmail.com> <871rlkckq1.fsf@mail.linkov.net> Date: Sun, 12 Jul 2020 03:04:31 +0300 In-Reply-To: (Stefan Monnier's message of "Sat, 11 Jul 2020 11:17:01 -0400") Message-ID: <87d051zj14.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42052 Cc: "James N. V. Cash" , 42052@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> I don't know if such thing as frame-local keybindings is currently possible. >> >> The manual at (info "(elisp) Searching Keymaps") shows the decision tree: > > FWIW, I think it would be nice to eliminate the last few remaining > places where we collect the active keymaps by hand rather than by > calling Fcurrent_active_maps. > > Then we could allow Elisp code to modify the behavior of > `current-active-maps`. I can't find these places where the active keymaps are collected by hand. But maybe adding an advice on `current-active-maps` to use frame-local keybindings might help to find these places where frame-local keybindings will fail. From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 12 12:38:36 2020 Received: (at 42052) by debbugs.gnu.org; 12 Jul 2020 16:38:36 +0000 Received: from localhost ([127.0.0.1]:46674 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1juezr-0003fL-NL for submit@debbugs.gnu.org; Sun, 12 Jul 2020 12:38:35 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:5048) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1juezq-0003f7-Ic for 42052@debbugs.gnu.org; Sun, 12 Jul 2020 12:38:35 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C9EE044128E; Sun, 12 Jul 2020 12:38:28 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 58ADE440688; Sun, 12 Jul 2020 12:38:27 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1594571907; bh=moWeQSqfReGMr11vdOjX8bBvL+5XyGNiEMEZ0VqV5Pg=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=cExFgBrbsG6VWQQcsylr5niAWD4h70rCVeRRfmm9lgVxVpDEKpWugR3RFVV30uF+i yrGNETf7IocC9UXYpMkMp5Q2psXLUE5cAntivHDymnDBTLuwZYDKDk7OF8bykSECPs EiI2XF+DqhCAN1tuUSigeQ/1c/sRR29+NSrXvmAXnQqxU/ve4FUlFS8J6Zsc6y/m2B Ers2fEaD+72B7uO92js6574rArfafTf14RBZlpPszgtPZoh6qedSQUsk9JQ+qS7pqI U0w7mA1jHeN7r2quY5DXVmI4FeCa7U7Gol9B2v8oYMRYvaxs76lqRuozYtYz2alkkv TvqD3aL+srITA== Received: from alfajor (unknown [45.72.129.42]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id D57CA120538; Sun, 12 Jul 2020 12:38:26 -0400 (EDT) From: Stefan Monnier To: Juri Linkov Subject: Re: bug#42052: 28.0.50; tab-bar-mode should be frame-local Message-ID: References: <87zh8qq57v.fsf@gmail.com> <87sgegdqmt.fsf@mail.linkov.net> <871rlzwfm2.fsf@gmail.com> <87wo3rug82.fsf@gmail.com> <87pn9idbj2.fsf@mail.linkov.net> <87pn9ivhsa.fsf@gmail.com> <87zh8liggc.fsf@mail.linkov.net> <874kqgpqhq.fsf@gmail.com> <871rlkckq1.fsf@mail.linkov.net> <87d051zj14.fsf@mail.linkov.net> Date: Sun, 12 Jul 2020 12:38:25 -0400 In-Reply-To: <87d051zj14.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 12 Jul 2020 03:04:31 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.033 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42052 Cc: "James N. V. Cash" , 42052@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Juri Linkov [2020-07-12 03:04:31] wrote: >>> I don't know if such thing as frame-local keybindings is currently possible. >>> >>> The manual at (info "(elisp) Searching Keymaps") shows the decision tree: >> >> FWIW, I think it would be nice to eliminate the last few remaining >> places where we collect the active keymaps by hand rather than by >> calling Fcurrent_active_maps. >> >> Then we could allow Elisp code to modify the behavior of >> `current-active-maps`. > > I can't find these places where the active keymaps are collected by hand. Grep for `current_minor_maps`: it should ideally only be called from Fcurrent_minor_mode_maps and Fcurrent_active_maps. IIRC it's done in the code to build the menus and the tool bar. Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 25 09:49:50 2020 Received: (at control) by debbugs.gnu.org; 25 Aug 2020 13:49:50 +0000 Received: from localhost ([127.0.0.1]:60827 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAZKg-0001tZ-Bh for submit@debbugs.gnu.org; Tue, 25 Aug 2020 09:49:50 -0400 Received: from mail-yb1-f171.google.com ([209.85.219.171]:33091) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAZKe-0001tL-Ty for control@debbugs.gnu.org; Tue, 25 Aug 2020 09:49:49 -0400 Received: by mail-yb1-f171.google.com with SMTP id p191so7191958ybg.0 for ; Tue, 25 Aug 2020 06:49:48 -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:mime-version:date:message-id:subject:to; bh=CNR5GN8XqfmirYF8MI3F4w+5/KaonDGG3wftt+FieaQ=; b=XrbSAkoyu2z8zV7oHdpvO1YKBXkXtfakEWnoxgWgLcrsMg99sADcU60NF1XzAEbL47 r+Z/93BN6uycCDNTfr9EGtSRjGBK7Gg7blSPCMWIMu1/AsYskjII7F+CGPCxRYYjX8/b DMkhjyRzN9kD6UgVEoW7ZD4Tr7M5G0Sg3miNEAgxtuGrJz/vH5o/BtD3hJpHPX+FddQu wzFOfN0pxLZgVMHX9R9BInA48QunJlcGPhzZOXHQ3ilvJ820e0D8UhzRbNzW9iH8T4uA 5pdXyIlBc/Npb8+AHL+5owYtj/oPWBs6gFCR6dKuNjOsG1hg72ZHTkzjM5o19KUpy8iO gEDA== X-Gm-Message-State: AOAM532X4FOEsXBiiWAd88QCQ+nnlYhZnzXIC9PJEzP9fILRqgvEcYeA 4eZ0gubGwBVqKoPt8C6/L/HSdamqpLjAf06KHsPX9wYQ X-Google-Smtp-Source: ABdhPJxMm0sIOFrXaQq3awO9l9vgy+iev4hfKxBrwCXRFO0pzKkgyaDb0Ozwq7PxMML0jRCoLeZepwNGbDjdQwfThqI= X-Received: by 2002:a25:7007:: with SMTP id l7mr13971734ybc.85.1598363383279; Tue, 25 Aug 2020 06:49:43 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 25 Aug 2020 06:49:42 -0700 From: Stefan Kangas MIME-Version: 1.0 Date: Tue, 25 Aug 2020 06:49:42 -0700 Message-ID: Subject: To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 2.5 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: severity 42052 wishlist thanks Content analysis details: (2.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stefankangas[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.219.171 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.219.171 listed in list.dnswl.org] 2.0 BLANK_SUBJECT Subject is present but empty 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: severity 42052 wishlist thanks Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.219.171 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.219.171 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stefankangas[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 2.0 BLANK_SUBJECT Subject is present but empty -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different severity 42052 wishlist thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 12 23:07:31 2020 Received: (at 42052) by debbugs.gnu.org; 13 Oct 2020 03:07:32 +0000 Received: from localhost ([127.0.0.1]:44703 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kSAex-0002W8-Lf for submit@debbugs.gnu.org; Mon, 12 Oct 2020 23:07:31 -0400 Received: from quimby.gnus.org ([95.216.78.240]:41204) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kSAev-0002Vo-Iy for 42052@debbugs.gnu.org; Mon, 12 Oct 2020 23:07:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=LZPDBU56/5WokbG4lXVoPN0HBY/8ml1NWgmzVve6EuE=; b=D4ISkMAynEh4+pSEC37CuCHQqh be9AIU/7Rhx3kyoSSP38Wf2IeRrGMpalDo9YLq8r/SbQ42ybuuoiHzPnwH83Cxmd6ZamOVeRuXRCd uHoJb9S4HbambZ01NLz+4ehE2SYPCC4G4pF0efv9lB77S4XrWkQvCR4Kemyej3Y0mIIc=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kSAem-0001MU-4Y; Tue, 13 Oct 2020 05:07:22 +0200 From: Lars Ingebrigtsen To: Juri Linkov Subject: Re: bug#42052: 28.0.50; tab-bar-mode should be frame-local References: <87zh8qq57v.fsf@gmail.com> <87sgegdqmt.fsf@mail.linkov.net> <871rlzwfm2.fsf@gmail.com> <87wo3rug82.fsf@gmail.com> <87pn9idbj2.fsf@mail.linkov.net> <87pn9ivhsa.fsf@gmail.com> <87zh8liggc.fsf@mail.linkov.net> <874kqgpqhq.fsf@gmail.com> <871rlkckq1.fsf@mail.linkov.net> X-Now-Playing: Oval's _Wohnton_: "AllesinGedanken" Date: Tue, 13 Oct 2020 05:07:18 +0200 In-Reply-To: <871rlkckq1.fsf@mail.linkov.net> (Juri Linkov's message of "Fri, 10 Jul 2020 02:49:42 +0300") Message-ID: <87lfga7rix.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Juri Linkov writes: >> I've attached another patch that makes the key bindings & xpm icons get >> loaded when tab-bar-show is 1 as well. It doesn't un-load the >> keybindings in the way that globalling toggling tab-bar-m [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 42052 Cc: "James N. V. Cash" , 42052@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Juri Linkov writes: >> I've attached another patch that makes the key bindings & xpm icons get >> loaded when tab-bar-show is 1 as well. It doesn't un-load the >> keybindings in the way that globalling toggling tab-bar-mode off, but I >> don't really see a sensible way of doing that frame-locally. > > I don't know if such thing as frame-local keybindings is currently possible. And then the discussion seemed to be concerned with that point, but skimming this thread, it doesn't look like the proposed patch was discussed. Juri, could you take a look at the patch and see whether it looks reasonable? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 05 13:37:14 2021 Received: (at 42052) by debbugs.gnu.org; 5 Jan 2021 18:37:14 +0000 Received: from localhost ([127.0.0.1]:42680 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kwrCk-0000us-Hv for submit@debbugs.gnu.org; Tue, 05 Jan 2021 13:37:14 -0500 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:34595) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kwrCi-0000ub-UI; Tue, 05 Jan 2021 13:37:13 -0500 X-Originating-IP: 91.129.98.64 Received: from mail.gandi.net (m91-129-98-64.cust.tele2.ee [91.129.98.64]) (Authenticated sender: juri@linkov.net) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 09708C0004; Tue, 5 Jan 2021 18:37:03 +0000 (UTC) From: Juri Linkov To: Lars Ingebrigtsen Subject: Re: bug#42052: 28.0.50; tab-bar-mode should be frame-local Organization: LINKOV.NET References: <87zh8qq57v.fsf@gmail.com> <87sgegdqmt.fsf@mail.linkov.net> <871rlzwfm2.fsf@gmail.com> <87wo3rug82.fsf@gmail.com> <87pn9idbj2.fsf@mail.linkov.net> <87pn9ivhsa.fsf@gmail.com> <87zh8liggc.fsf@mail.linkov.net> <874kqgpqhq.fsf@gmail.com> <871rlkckq1.fsf@mail.linkov.net> <87lfga7rix.fsf@gnus.org> Date: Tue, 05 Jan 2021 20:36:28 +0200 In-Reply-To: <87lfga7rix.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 13 Oct 2020 05:07:18 +0200") Message-ID: <875z4bkz83.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42052 Cc: "James N. V. Cash" , 42052@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) tags 42052 fixed close 42052 28.0.50 thanks >>> I've attached another patch that makes the key bindings & xpm icons get >>> loaded when tab-bar-show is 1 as well. It doesn't un-load the >>> keybindings in the way that globalling toggling tab-bar-mode off, but I >>> don't really see a sensible way of doing that frame-locally. >> >> I don't know if such thing as frame-local keybindings is currently possible. > > And then the discussion seemed to be concerned with that point, but > skimming this thread, it doesn't look like the proposed patch was > discussed. > > Juri, could you take a look at the patch and see whether it looks > reasonable? Sorry for the delay. Now the patch is pushed to master, and report is closed. Frame-local keybindings could be implemented in a separate feature request. From unknown Fri Jun 20 19:48:31 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 03 Feb 2021 12:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator