From unknown Mon Aug 18 11:28:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79159: [PATCH] Do not display in the tab line tabs that are excluded. Resent-From: Elijah Gabe =?UTF-8?Q?P=C3=A9rez?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Aug 2025 20:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 79159 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 79159@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.175416486715887 (code B ref -1); Sat, 02 Aug 2025 20:02:02 +0000 Received: (at submit) by debbugs.gnu.org; 2 Aug 2025 20:01:07 +0000 Received: from localhost ([127.0.0.1]:37963 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uiIPj-00047D-04 for submit@debbugs.gnu.org; Sat, 02 Aug 2025 16:01:07 -0400 Received: from lists.gnu.org ([2001:470:142::17]:56414) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uiIPh-00038d-7a for submit@debbugs.gnu.org; Sat, 02 Aug 2025 16:01:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uiIPE-0001w7-Qe for bug-gnu-emacs@gnu.org; Sat, 02 Aug 2025 16:00:37 -0400 Received: from mail-oa1-x44.google.com ([2001:4860:4864:20::44]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uiIPB-0008Rx-Ea for bug-gnu-emacs@gnu.org; Sat, 02 Aug 2025 16:00:35 -0400 Received: by mail-oa1-x44.google.com with SMTP id 586e51a60fabf-2ff8d43619cso1838226fac.1 for ; Sat, 02 Aug 2025 13:00:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1754164831; x=1754769631; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=Gn8yTniXt7SkqJWoM5lcWRv6ULRUweSV8HRjJMOtNYg=; b=FpM0EybcktDyk2Dg1Jj0mD3R66Mfckq0Oi9l21auZGQYODMAK7DpiRPNRm6tbR5PCP GtxGAEndYjy1hT9F7I2DWdUROD/kewp6nMD2VjeXoliABgyk7ETo5IDuTLP0cH1Z1HGT zsTqiX0KN16Aahe2cpt3dKfGPklhESDNIXhSBKAnG2zxcZpSWb3KHSZZJ4u1kyxehlTW KXpitJkLFLowbp7B4/SEtrJRBFlUYb1AXvrt2nXp3o2Z7mcodPUyig32sl/iucQqtEGQ pxhhbVRxeh/pBconeTJEF+TCn7S5nnilGGNVAD3JYWDa45CB7EKL/fz8PWOrvIYOD6/r rbCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754164831; x=1754769631; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Gn8yTniXt7SkqJWoM5lcWRv6ULRUweSV8HRjJMOtNYg=; b=LOKALf6Q9LuK8GlYe/tygy9SsDVcL2JjydPpxySl5BYXTrrAIrYL/rnVxFI2cckd5C yuv+6mVeMyfGaARc47HpL85Z/16ncnnzr2JIqimURBpQm7M5TfM15wonNNCLlTrtJ9B6 6xlQPI47pjWYhTsBRKbfcim98+NosvGBXZwdQ9ruxO/HKyvBJzki1WMbCkxtC5mpWrDA HG3LtiAgwAQ7PstI4R8QN/r0ncrdbZXzg0o8koUZRVzZo1KF7TRcSyj7du712Kf2M+2F TzZSJoVO3vdSYTtUJ0umKgwwYTQ9DFy0mgrtoIov3/E6wVYjDLmWMS2GQCd5ZgUqM1kQ AfWw== X-Gm-Message-State: AOJu0YzQsLHns3xQcrLe/Vm0pZ2jXb6xdBVuHIhLehKi/9aTT12k81IS rZZVFO5qDLO5s+Jp6pt5Wv4YwPs6Pml/Tmfmhf2vnm3qS0XgOeJUMf2K83yZ/CqX X-Gm-Gg: ASbGncscy8VbameDp/2QQktj6egUowle4/AY6daZFRy785T1X3MwMn3WNITpK6sNcLB 0LcPBAv1yKN5PbfrM27T21MEI38KMSkTASgcw5Dx3c8qRhaSDD22xCRE4dHixQxBNWRMDjIyXCt GcliCBATpo2B2sUJol+8DiQsWa7XZ0f8WpxMNbXzKDh6F34hxiXhfkFRw2Q2AelkIgCEJBx8p1O G0bPM4pPDBLXh0JGKFa73TdbKbNyGTKRPMRWBRdvItg0WN5wA6ChGXAjm2p0JvEXDsDdQ5Hwl/o qUPmRGif8zPhTrzfnL0VD3WAwGQc3uflXNAXK50N9F9kbZe6XNRrt+GhcTmkXjpQ1+1ilNd+xAc 2uTwdtSBzA80fZuhpjd3UcVfZWA== X-Google-Smtp-Source: AGHT+IHEQXLWT6oFJyhC49rLWMqUrBHmvL+vfBFTm48wK6F3Mzrt9oQUeOPXMYWAxYSluTPJIrV7Pg== X-Received: by 2002:a05:6870:4782:b0:308:fc2b:b7a with SMTP id 586e51a60fabf-30b67bafe79mr2142903fac.43.1754164831303; Sat, 02 Aug 2025 13:00:31 -0700 (PDT) Received: from fedora ([189.215.162.117]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-74186caabe2sm1380217a34.10.2025.08.02.13.00.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Aug 2025 13:00:30 -0700 (PDT) From: Elijah Gabe =?UTF-8?Q?P=C3=A9rez?= Date: Sat, 02 Aug 2025 14:00:27 -0600 Message-ID: <871pptcx44.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2001:4860:4864:20::44; envelope-from=eg642616@gmail.com; helo=mail-oa1-x44.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.2 (+) 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: Tags: patch tab-line by default displays all the tabs in the tab line, however this also includes the tab that are excluded in 'tab-line-exclude-modes' and 'tab-line-exclude-buffers', which IMO makes no sense. Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2001:470:142:0:0:0:0:17 listed in] [list.dnswl.org] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (eg642616[at]gmail.com) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (eg642616[at]gmail.com) 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: 0.2 (/) --=-=-= Content-Type: text/plain Tags: patch tab-line by default displays all the tabs in the tab line, however this also includes the tab that are excluded in 'tab-line-exclude-modes' and 'tab-line-exclude-buffers', which IMO makes no sense. The patch attached, solves this. Currently, it only works for 'tab-line-tabs-fixed-window-buffers'. --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Do-not-display-in-the-tab-line-tabs-that-are-exclude.patch >From fa84b8e93802e16fdfba1f9cc79e076da8d25527 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?El=C3=ADas=20Gabriel=20P=C3=A9rez?= Date: Fri, 1 Aug 2025 20:14:59 -0600 Subject: [PATCH] Do not display in the tab line tabs that are excluded. * etc/NEWS: Announce changes. * lisp/tab-line.el (tab-line-tabs-fixed-buffer-list-function): New variable. (tab-line-tabs-fixed-window-buffers): Rework for hide the excluded tabs. (Bug#) --- etc/NEWS | 5 +++++ lisp/tab-line.el | 16 +++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/etc/NEWS b/etc/NEWS index 36a9bf39d55..dc2f0c819fb 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -432,6 +432,11 @@ a buffer. The value must be a condition which is passed to With this user option, if non-nil (the default), the tab close button will change its appearance if the tab buffer has been modified. +*** 'tab-line-tabs-fixed-window-buffers' now hides the excluded tabs. +All the buffers included in 'tab-line-exclude-buffers' and +'tab-line-exclude-modes' will not appear in the tab line only if +'tab-line-tabs-function' is set to 'tab-line-tabs-fixed-window-buffers'. + ** Project --- diff --git a/lisp/tab-line.el b/lisp/tab-line.el index 51675dbbb29..ff05f5d83c0 100644 --- a/lisp/tab-line.el +++ b/lisp/tab-line.el @@ -585,6 +585,14 @@ tab-line-tabs-window-buffers (list buffer) next-buffers))) +(defvar tab-line-tabs-fixed-buffer-list-function + #'tab-line-tabs-window-buffers + "Function for get a list of window buffers. +Used only for `tab-line-tabs-fixed-window-buffers'.") + +(defvar tab-line-exclude-buffers) +(defvar tab-line-exclude-modes) + (defun tab-line-tabs-fixed-window-buffers () "Like `tab-line-tabs-window-buffers' but keep stable sorting order. This means that switching to a buffer previously shown in the same @@ -598,7 +606,13 @@ tab-line-tabs-fixed-window-buffers (lambda (buf idx) (puthash buf idx index-table)) old-buffers) index-table)) - (new-buffers (sort (tab-line-tabs-window-buffers) + (buffer-list (seq-remove + (lambda (b) + (or (with-current-buffer b + (memq major-mode tab-line-exclude-modes)) + (buffer-match-p tab-line-exclude-buffers b))) + (funcall tab-line-tabs-fixed-buffer-list-function))) + (new-buffers (sort buffer-list :in-place t :key (lambda (buffer) (gethash buffer buffer-positions -- 2.50.1 --=-=-= Content-Type: text/plain -- - E.G via Gnus and Org. --=-=-=-- From unknown Mon Aug 18 11:28:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79159: [PATCH] Do not display in the tab line tabs that are excluded. Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 Aug 2025 05:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 79159 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Elijah Gabe =?UTF-8?Q?P=C3=A9rez?= Cc: 79159@debbugs.gnu.org Received: via spool by 79159-submit@debbugs.gnu.org id=B79159.17541980342135 (code B ref 79159); Sun, 03 Aug 2025 05:14:01 +0000 Received: (at 79159) by debbugs.gnu.org; 3 Aug 2025 05:13:54 +0000 Received: from localhost ([127.0.0.1]:41127 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uiR2g-0000YN-11 for submit@debbugs.gnu.org; Sun, 03 Aug 2025 01:13:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60904) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uiR2c-0000Y4-JW for 79159@debbugs.gnu.org; Sun, 03 Aug 2025 01:13:51 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uiR2X-0000ex-2j; Sun, 03 Aug 2025 01:13:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=GSdvkKSID5eN9KLtdNQURaYF+touIsVAOptLL10DNSk=; b=leGTV2bWBI3aS58bSPnw SMKyFCwax/P3bU3Ck9i0nRkeylholrsa7vMKGfMyrf2qnrPtRzPUNNc2yhJSpiVvdep/tB34bBAtW haa6jkQLI7AXa+Fvd1ZD1Gw0xRxrO0bqguKdVk4D1ClmbPYICE5RZsKPXRF+OjjFpA33FB1E/yPbD bZVXvAWpJ9VlwaR3jXZbXhxs7db9tZ3MOXWb/psiTVnDJzAgQatgOKLQP0cyLfjGLO+eUpNfuEV7B keUJ3crwzHjr4rHOYoKJwckFFeT7Gw7qE4QFTJkNKSd4dK9fMxtPI9/FOKT3hG/wJ09X9hyuVCA7Q NDBBJf4pBhqoQw==; Date: Sun, 03 Aug 2025 08:13:41 +0300 Message-Id: <86wm7loum2.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <871pptcx44.fsf@gmail.com> (message from Elijah Gabe =?UTF-8?Q?P=C3=A9rez?= on Sat, 02 Aug 2025 14:00:27 -0600) References: <871pptcx44.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) 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 (---) > From: Elijah Gabe Pérez > Date: Sat, 02 Aug 2025 14:00:27 -0600 > > tab-line by default displays all the tabs in the tab line, however this > also includes the tab that are excluded in 'tab-line-exclude-modes' and > 'tab-line-exclude-buffers', which IMO makes no sense. I think "makes no sense" is in the eyes of the beholder. These variables determine which buffers should have the tab-line shown in their windows, they don't mean these buffers should not be reachable via the tab-line in other buffers. Hiding them in all tab-lines means you cannot switch to those buffers except via "C-x b" or somesuch. That is not the intent of these variables, AFAIU. Their intent is to disable tab-line in buffers where showing the tab-line makes no sense. The default value of tab-line-exclude-modes is a good example of that. But I won't object to adding a knob to have the behavior you want, if Juri agrees, and there are no other objections. However, this must be an opt-in behavior, by default off. > Currently, it only works for 'tab-line-tabs-fixed-window-buffers'. Which IMO is a limitation that should be lifted, for this feature to make sense. I expect to see bug reports if we don't. > +*** 'tab-line-tabs-fixed-window-buffers' now hides the excluded tabs. > +All the buffers included in 'tab-line-exclude-buffers' and > +'tab-line-exclude-modes' will not appear in the tab line only if > +'tab-line-tabs-function' is set to 'tab-line-tabs-fixed-window-buffers'. A buffer cannot be "included" in a list of modes, so talking about a buffer included in tab-line-exclude-modes is confusing. I suggest to reword: *** Excluded buffers are no longer shown in tab-lines of other buffers. Buffers that match 'tab-line-exclude-buffers' and buffers whose modes are in 'tab-line-exclude-modes' will not appear in tab-lines of other buffers. Also, why isn't there either "+++" (and a suitable change to the manual) or "---" for this entry? We don't want to defer the decision whether and how to document the changes in the manuals to the time when a release will be prepared, we want to make the necessary documentation changes right away. So let's please decide now whether this change deserves to be mentioned in the manuals, and act accordingly. Thanks. From unknown Mon Aug 18 11:28:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79159: [PATCH] Do not display in the tab line tabs that are excluded. Resent-From: Elijah Gabe =?UTF-8?Q?P=C3=A9rez?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Aug 2025 02:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 79159 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 79159@debbugs.gnu.org Received: via spool by 79159-submit@debbugs.gnu.org id=B79159.175427514419087 (code B ref 79159); Mon, 04 Aug 2025 02:40:02 +0000 Received: (at 79159) by debbugs.gnu.org; 4 Aug 2025 02:39:04 +0000 Received: from localhost ([127.0.0.1]:47416 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uil6N-0004xm-6e for submit@debbugs.gnu.org; Sun, 03 Aug 2025 22:39:03 -0400 Received: from mail-oa1-x42.google.com ([2001:4860:4864:20::42]:60852) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uil6I-0004wx-3x for 79159@debbugs.gnu.org; Sun, 03 Aug 2025 22:39:00 -0400 Received: by mail-oa1-x42.google.com with SMTP id 586e51a60fabf-30b6b801f4eso973400fac.1 for <79159@debbugs.gnu.org>; Sun, 03 Aug 2025 19:38:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1754275132; x=1754879932; darn=debbugs.gnu.org; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=UsjFnU7HVQE918kD7F/JsLuMpsIovAvpK6AaBKdLvQM=; b=aRZo0VPgJ0rVLfMMKOfnd6ojiYY1MzLxBvFTYoTVx37/QShc3mSKAG6zDlF/wTmO9Q W8rk2jboiWw4lqUI6phNmtDIGIgRk91Qr6+Lt1BIiK6p/eB6LsZuMbvVRY2DaTNEQD++ 5Jbe9voquOVvt7h4pk66XoRBTMK5meXeL25SiwrUwDm09R8r0cegCf0Q0NhTJ3rE1Z8k W7Ymtvyl3JMO/32gfrBpDJm+fQGv27pOSd41gtaKm3gL8UoFkYeQkg135d2RcXgFXGEP 1bM+sjOJM8w5u9tSOt7YDqSCtlqQj3u0guHdCELBbw+jAZDLoNsAt6cZjG9NKCryvzmE TtMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754275132; x=1754879932; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=UsjFnU7HVQE918kD7F/JsLuMpsIovAvpK6AaBKdLvQM=; b=LK+tS5CejVx6q2wlwvvMu8ApXOSLt6QkAukz5ow07IVLdkEaM2jYTGlIm4wIo7mKHI aZ63f1SzzMQ0joLeIV3degLWA7rGCwAxxpf0hyGHVxeyNb6ahpNuEDZYs5lbbUDuresE pdR4ddraMphiRE5OpGsxN41DL5LECBiCAmYDIFPDPqCv/ngmCej/NTzBaa5GAmGcR3ak Pr23D6uFLSHvgXSbR/PPrY8wA7c12J5z1YyF5H8NhCTWd9GdWyhHYWVh9Yp8wKgZTEbM dRDjRYHEv8Q89JbYaOp1dJBiTHiiXsXMjrxnqXGrBdTXdbWtxPItzjuqMG77fJ9suruI voww== X-Gm-Message-State: AOJu0YzOT9qGzHajAgmFH7/NKIOIdM9rQDHacPbYjc1BvWNCG+Y8aaWD nhQh5W898wEMCRGil2hz6IqkO51oa1qDmiWmNBEBffQA4j6fFvcIi5/pIvqI8o06 X-Gm-Gg: ASbGncs6h9PNFcnSjrOOsB/j3Q36s8+jVMuPIHMU1Jd/AvpxREktDDpkTFieRjep+YW BCDNYaT87SkJIhLBIAZbV7lYiJUAzu9GQc00zwigAEy893HKPVPKg1kh0bzHD/kx+Qo3RJe0pDz lVUglqITeusoU6nlTRo0zFbTOUjXthIMjya49PthYNERfqlQsV0+kXYHv1fjydfO2W55uevhZ1w QTs7oFoaLF5R7v10XUmQB1EEtSFARi83KGwHIcX3YSQtGwwn0OvHMyHCMvlHM+NUMNBF2sydl+L v4aKD+VmGM4IUasBKKRtva4HXpPFTVkOGsWmr0OtAbca5fiNDtzoi/Ty1F5DXBoQZOKIFWPkwXB RiWmZZhwSI6K6Zic= X-Google-Smtp-Source: AGHT+IGQWlyU0l41y1cUk+RfrSeLpTIqgSgVdE+oyPDf6ieUDVTkSKThmvgxT37n+96zTA81L57KmQ== X-Received: by 2002:a05:687c:20e5:b0:2ea:8091:41f2 with SMTP id 586e51a60fabf-30b678e2310mr4054122fac.19.1754275131646; Sun, 03 Aug 2025 19:38:51 -0700 (PDT) Received: from fedora ([189.215.161.127]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-307a717f93fsm2480922fac.14.2025.08.03.19.38.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Aug 2025 19:38:50 -0700 (PDT) From: Elijah Gabe =?UTF-8?Q?P=C3=A9rez?= In-Reply-To: <86wm7loum2.fsf@gnu.org> References: <871pptcx44.fsf@gmail.com> <86wm7loum2.fsf@gnu.org> Date: Sun, 03 Aug 2025 20:38:48 -0600 Message-ID: <871pprak07.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.3 (/) 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: -0.7 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Eli Zaretskii writes: >> From: Elijah Gabe P=C3=A9rez >> Date: Sat, 02 Aug 2025 14:00:27 -0600 >>=20 >> tab-line by default displays all the tabs in the tab line, however >> this >> also includes the tab that are excluded in 'tab-line-exclude-modes' >> and >> 'tab-line-exclude-buffers', which IMO makes no sense. > > I think "makes no sense" is in the eyes of the beholder. These > variables determine which buffers should have the tab-line shown in > their windows, they don't mean these buffers should not be reachable > via the tab-line in other buffers. Hiding them in all tab-lines means > you cannot switch to those buffers except via "C-x b" or somesuch. > That is not the intent of these variables, AFAIU. Their intent is to > disable tab-line in buffers where showing the tab-line makes no sense. > The default value of tab-line-exclude-modes is a good example of that. Of course, but the variable names can be confusing, some users familiar with other tab-line-like packages might expect this feature. This may also depend on the users workflow; some may prefer to use the tab-line to display only relevant tabs and search for the rest with "C-x b". > But I won't object to adding a knob to have the behavior you want, if > Juri agrees, and there are no other objections. However, this must be > an opt-in behavior, by default off. Fine, I've added it as an option. >> Currently, it only works for 'tab-line-tabs-fixed-window-buffers'. > > Which IMO is a limitation that should be lifted, for this feature to > make sense. I expect to see bug reports if we don't. I've added it to the other relevant functions. >> +*** 'tab-line-tabs-fixed-window-buffers' now hides the excluded >> tabs. >> +All the buffers included in 'tab-line-exclude-buffers' and >> +'tab-line-exclude-modes' will not appear in the tab line only if >> +'tab-line-tabs-function' is set to >> 'tab-line-tabs-fixed-window-buffers'. > > A buffer cannot be "included" in a list of modes, so talking about a > buffer included in tab-line-exclude-modes is confusing. I suggest to > reword: > > *** Excluded buffers are no longer shown in tab-lines of other buffers. > Buffers that match 'tab-line-exclude-buffers' and buffers whose > modes are in 'tab-line-exclude-modes' will not appear in tab-lines > of other buffers. > Also, why isn't there either "+++" (and a suitable change to the > manual) or "---" for this entry? We don't want to defer the decision > whether and how to document the changes in the manuals to the time > when a release will be prepared, we want to make the necessary > documentation changes right away. So let's please decide now whether > this change deserves to be mentioned in the manuals, and act > accordingly. I forgot it, but i don't think this needs to be added to the manual, mostly because none of the NEWS entries in "Tab Bars and Tab Lines" are in the manual. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Do-not-display-in-the-tab-line-tabs-that-are-exclude.patch >From 14da64c8040717626d21866d28a63d025b888cce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?El=C3=ADas=20Gabriel=20P=C3=A9rez?= Date: Fri, 1 Aug 2025 20:14:59 -0600 Subject: [PATCH] Do not display in the tab line tabs that are excluded. (Bug#79159) * etc/NEWS: Announce changes. * lisp/tab-line.el (tab-line-hide-excluded-buffers): New user option. (tab-line-displayable-tab-list): New function. (tab-line-tabs-mode-buffers, tab-line-tabs-buffer-groups) (tab-line-tabs-window-buffers) (tab-line-tabs-fixed-window-buffers): Rework. --- etc/NEWS | 6 ++++++ lisp/tab-line.el | 51 ++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 51 insertions(+), 6 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index e12a9dcb127..c4183c50095 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -436,6 +436,12 @@ a buffer. The value must be a condition which is passed to With this user option, if non-nil (the default), the tab close button will change its appearance if the tab buffer has been modified. +--- +***Excluded buffers are no longer shown in tab-lines of other buffers. +Buffers that match 'tab-line-exclude-buffers' and buffers whose +modes are in 'tab-line-exclude-modes' will not appear in tab-lines +of other buffers. + ** Project --- diff --git a/lisp/tab-line.el b/lisp/tab-line.el index 51675dbbb29..98e1f4346a6 100644 --- a/lisp/tab-line.el +++ b/lisp/tab-line.el @@ -402,6 +402,23 @@ tab-line-tabs-buffer-list-function "Function to return a global list of buffers. Used only for `tab-line-tabs-mode-buffers' and `tab-line-tabs-buffer-groups'.") + +(defvar tab-line-hide-excluded-buffers) +(defvar tab-line-exclude-modes) +(defvar tab-line-exclude-buffers) + +(defun tab-line-displayable-tab-list (tabs) + "Return a list of displayable tabs from TABS. +TABS must be a list of buffers." + (if tab-line-hide-excluded-buffers + (seq-remove + (lambda (b) + (or (with-current-buffer b + (memq major-mode tab-line-exclude-modes)) + (buffer-match-p tab-line-exclude-buffers b))) + tabs) + tabs)) + (defun tab-line-tabs-buffer-list () (seq-filter (lambda (b) (and (buffer-live-p b) (/= (aref (buffer-name b) 0) ?\s))) @@ -415,7 +432,8 @@ tab-line-tabs-mode-buffers (seq-sort-by #'buffer-name #'string< (seq-filter (lambda (b) (with-current-buffer b (derived-mode-p mode))) - (funcall tab-line-tabs-buffer-list-function))))) + (tab-line-displayable-tab-list + (funcall tab-line-tabs-buffer-list-function)))))) (defun tab-line-tab-modified-p (tab buffer-p) "Return t if TAB is modified." @@ -513,7 +531,8 @@ tab-line-tabs-buffer-groups If non-nil, `tab-line-tabs-buffer-group-function' is used to generate the group name." (if (window-parameter nil 'tab-line-groups) - (let* ((buffers (funcall tab-line-tabs-buffer-list-function)) + (let* ((buffers (tab-line-displayable-tab-list + (funcall tab-line-tabs-buffer-list-function))) (groups (delq nil (mapcar #'car (seq-group-by #'tab-line-tabs-buffer-group-name @@ -581,9 +600,18 @@ tab-line-tabs-window-buffers (prev-buffers (seq-filter #'buffer-live-p prev-buffers)) ;; Remove next-buffers from prev-buffers (prev-buffers (seq-difference prev-buffers next-buffers))) - (append (reverse prev-buffers) - (list buffer) - next-buffers))) + (tab-line-displayable-tab-list + (append (reverse prev-buffers) + (list buffer) + next-buffers)))) + +(defvar tab-line-tabs-fixed-buffer-list-function + #'tab-line-tabs-window-buffers + "Function for get a list of window buffers. +Used only for `tab-line-tabs-fixed-window-buffers'.") + +(defvar tab-line-exclude-buffers) +(defvar tab-line-exclude-modes) (defun tab-line-tabs-fixed-window-buffers () "Like `tab-line-tabs-window-buffers' but keep stable sorting order. @@ -598,7 +626,9 @@ tab-line-tabs-fixed-window-buffers (lambda (buf idx) (puthash buf idx index-table)) old-buffers) index-table)) - (new-buffers (sort (tab-line-tabs-window-buffers) + (buffer-list (tab-line-displayable-tab-list + (funcall tab-line-tabs-fixed-buffer-list-function))) + (new-buffers (sort buffer-list :in-place t :key (lambda (buffer) (gethash buffer buffer-positions @@ -1316,6 +1346,15 @@ tab-line-exclude-buffers :group 'tab-line :version "31.1") +(defcustom tab-line-hide-excluded-buffers nil + "Whether the excluded buffers should not appear in the tab line. +If non-nil, buffers that match `tab-line-exclude-buffers' and buffers +whose modes are in `tab-line-exclude-modes' will not appear in +tab-lines." + :type 'boolean + :group 'tab-line + :version "31.1") + ;;;###autoload (defvar-local tab-line-exclude nil) -- 2.50.1 --=-=-= Content-Type: text/plain -- - E.G via Gnus and Org. --=-=-=-- From unknown Mon Aug 18 11:28:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79159: [PATCH] Do not display in the tab line tabs that are excluded. Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Aug 2025 12:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 79159 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Elijah Gabe =?UTF-8?Q?P=C3=A9rez?= Cc: 79159@debbugs.gnu.org Received: via spool by 79159-submit@debbugs.gnu.org id=B79159.175431219713337 (code B ref 79159); Mon, 04 Aug 2025 12:57:02 +0000 Received: (at 79159) by debbugs.gnu.org; 4 Aug 2025 12:56:37 +0000 Received: from localhost ([127.0.0.1]:49679 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uiuk1-0003T3-GM for submit@debbugs.gnu.org; Mon, 04 Aug 2025 08:56:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46792) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uiujy-0003Sn-Vo for 79159@debbugs.gnu.org; Mon, 04 Aug 2025 08:56:36 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uiujt-0000Fa-II; Mon, 04 Aug 2025 08:56:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=SQVVZBXQlLPe+UYXg28BYuZJgRP7OqygSB8qUwZRgRY=; b=G7rRXAeiXQ3/Nl3Jt0SU n2av9wyE1uUX/LmFR8YIYA7F3zgW1iUYRSpuEBhv8IqTz+O/xi/5j6htQIx9fZTEIFQQ1kX+Mozj6 SlQKOv1igUV89rOhrCYy0WBRWhGrYyK+b/03FK2XIKCMHEx98pnDN+JIZGq0hKTCRrI3pUUw7iVBG 9SBSK6O8GofRTBmngDPBBDCer2iJWnq9A5ZnAds+qHCYyibT96X9/Z7auNLgkN4Ut80T4NHu5Y+Fp ZoH5BMiuzCGrwSEhIUwQsdphakz0ThtFW+dItdaiiJYRJpHOU23Y6BLaMGaGV2y4niqtaf3SyCI+c pmk6sbZIfcz2fA==; Date: Mon, 04 Aug 2025 15:56:26 +0300 Message-Id: <86ldnzw8hx.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <871pprak07.fsf@gmail.com> (message from Elijah Gabe =?UTF-8?Q?P=C3=A9rez?= on Sun, 03 Aug 2025 20:38:48 -0600) References: <871pptcx44.fsf@gmail.com> <86wm7loum2.fsf@gnu.org> <871pprak07.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) 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 (---) > From: Elijah Gabe PĂ©rez > Cc: 79159@debbugs.gnu.org > Date: Sun, 03 Aug 2025 20:38:48 -0600 > > +***Excluded buffers are no longer shown in tab-lines of other buffers. > +Buffers that match 'tab-line-exclude-buffers' and buffers whose > +modes are in 'tab-line-exclude-modes' will not appear in tab-lines > +of other buffers. If the default is to show them (which is what I think we should do), then the above should make it clear that the new behavior is optional. As in "Excluded buffers can now be hidden from tab-lines in other buffers". > +(defcustom tab-line-hide-excluded-buffers nil > + "Whether the excluded buffers should not appear in the tab line. ^^^^^^^^^^^^^^^^^^^^ "should be hidden from" is better Let's wait for Juri to review this. Thanks. From unknown Mon Aug 18 11:28:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79159: [PATCH] Do not display in the tab line tabs that are excluded. Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Aug 2025 06:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 79159 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Elijah Gabe =?UTF-8?Q?P=C3=A9rez?= Cc: 79159@debbugs.gnu.org, Eli Zaretskii Received: via spool by 79159-submit@debbugs.gnu.org id=B79159.17543760831576 (code B ref 79159); Tue, 05 Aug 2025 06:42:02 +0000 Received: (at 79159) by debbugs.gnu.org; 5 Aug 2025 06:41:23 +0000 Received: from localhost ([127.0.0.1]:53469 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ujBMQ-0000PL-V2 for submit@debbugs.gnu.org; Tue, 05 Aug 2025 02:41:23 -0400 Received: from mout-y-209.mailbox.org ([2001:67c:2050:103:465::209]:49058) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ujBMN-0000Oz-VB for 79159@debbugs.gnu.org; Tue, 05 Aug 2025 02:41:20 -0400 Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-y-209.mailbox.org (Postfix) with ESMTPS id 4bx3jN1jjFzB0RJ; Tue, 5 Aug 2025 08:41:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; t=1754376072; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1q+ETThuOieH7f52BvkG5dXe6l8f7v4ZrMzcVOlMJ+4=; b=gATCOYetVXVXUwVS0BsvlHQOigT0j+1qYAkRukvALPHUjx5Gnpb9Z1B4kMjUQlnQ0an+ah d7oEC70Un6WwbBm6CADPNI8+jLG7zw/JMt4eXR27HowVVWG2Om8f5G3OyAW0yroOw3jx7Q bZvjbk3wdTtjOTY3efrMOyrrEAAVG+CGms3kZOYPxBB29GzWCktusxwcxsHYYWAqXAc2br yPyJs8AGipJidP5MgkFKW6MMA4/+xwXQbXrhtIJesJKbaZUSY75egY12UPwKaoPu0sgoX0 AxzJMg7eYeLL0YQvoNbNxfXXO46M1wPuACS/IXj9z7rM977oHCjv4qo8VlFoog== From: Juri Linkov In-Reply-To: <871pprak07.fsf@gmail.com> Organization: LINKOV.NET References: <871pptcx44.fsf@gmail.com> <86wm7loum2.fsf@gnu.org> <871pprak07.fsf@gmail.com> Date: Tue, 05 Aug 2025 09:31:34 +0300 Message-ID: <87cy9aqovd.fsf@mail.linkov.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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 (-) > + (or (with-current-buffer b > + (memq major-mode tab-line-exclude-modes)) Optimization without using 'with-current-buffer': (buffer-local-value 'major-mode b) > @@ -598,7 +626,9 @@ tab-line-tabs-fixed-window-buffers > (lambda (buf idx) (puthash buf idx index-table)) > old-buffers) > index-table)) > - (new-buffers (sort (tab-line-tabs-window-buffers) > + (buffer-list (tab-line-displayable-tab-list > + (funcall tab-line-tabs-fixed-buffer-list-function))) Please don't hardcode 'tab-line-displayable-tab-list'. The proper way is to have a predicate user option with two const values: one is a function that returns all buffers, another that omits excluded buffers, and a slot for a user-defined custom function. Maybe the existing 'tab-line-tabs-buffer-list-function' should be promoted to the user option. From unknown Mon Aug 18 11:28:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79159: [PATCH] Do not display in the tab line tabs that are excluded. Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Aug 2025 06:42:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 79159 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 79159@debbugs.gnu.org, Elijah Gabe =?UTF-8?Q?P=C3=A9rez?= Received: via spool by 79159-submit@debbugs.gnu.org id=B79159.17543760831583 (code B ref 79159); Tue, 05 Aug 2025 06:42:03 +0000 Received: (at 79159) by debbugs.gnu.org; 5 Aug 2025 06:41:23 +0000 Received: from localhost ([127.0.0.1]:53471 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ujBMR-0000PN-AU for submit@debbugs.gnu.org; Tue, 05 Aug 2025 02:41:23 -0400 Received: from mout-y-209.mailbox.org ([91.198.250.237]:50360) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ujBMK-0000Ot-Oj for 79159@debbugs.gnu.org; Tue, 05 Aug 2025 02:41:21 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-y-209.mailbox.org (Postfix) with ESMTPS id 4bx3jJ67Snz9yXX; Tue, 5 Aug 2025 08:41:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; t=1754376068; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FpYaRO6DJx8rp2jnVTWCy2ZhLKTGwxq4EenN7HLY+8A=; b=ctcj5XhOjn7OUh3xeoEX6cxqf/1J5dN3N2J0J9BATWMHEow8mkzkXoWCW/134YzrOrlJVQ 9G4qnIixRxwglBxHm/WkMz8Y/PYoacAzIx97tuDcIMDr7/2ZRbg+cnVloYauN7vEbiytRf JhEUFxZOefTQSC46iDhba7WILUBRW7AXXg0YVJm2sCEtk1xXrWA1aMietlH9JlB0S0sZ12 XbXCmJ1ivTtOmnM4vh8maHDWSW+6At8s8XfzR9gNn2SyY1LyOoVcsO7NUbCsO1psE8oXBR N0pEYNhMqMXdzBHQT9WSmHWoblxNcJoTmtUFIhGOOiMXaa6HTGRX0JyKbVlJuw== From: Juri Linkov In-Reply-To: <86wm7loum2.fsf@gnu.org> Organization: LINKOV.NET References: <871pptcx44.fsf@gmail.com> <86wm7loum2.fsf@gnu.org> Date: Tue, 05 Aug 2025 09:28:30 +0300 Message-ID: <87y0ryqpah.fsf@mail.linkov.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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 (-) > But I won't object to adding a knob to have the behavior you want, if > Juri agrees, and there are no other objections. However, this must be > an opt-in behavior, by default off. Better to make it opt-out because currently display of excluded buffers on the tab-line is too glitchy. Example: 0. emacs -Q 1. M-x global-tab-line-mode RET 2. C-x b foo RET 3. C-x b SPC *bar* RET 4. C-x Now the buffer name " *bar*" is visible on the tab-line. 5. C-x But now " *bar*" suddenly goes away. This is because handling of excluded buffers is hard-coded in many window.el functions. So not showing excluded buffers by default will avoid this snag. From unknown Mon Aug 18 11:28:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79159: [PATCH] Do not display in the tab line tabs that are excluded. Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Aug 2025 11:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 79159 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Juri Linkov Cc: 79159@debbugs.gnu.org, eg642616@gmail.com Received: via spool by 79159-submit@debbugs.gnu.org id=B79159.17543938131213 (code B ref 79159); Tue, 05 Aug 2025 11:37:02 +0000 Received: (at 79159) by debbugs.gnu.org; 5 Aug 2025 11:36:53 +0000 Received: from localhost ([127.0.0.1]:53920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ujFyP-0000JU-EH for submit@debbugs.gnu.org; Tue, 05 Aug 2025 07:36:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47840) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ujFyM-0000JA-IX for 79159@debbugs.gnu.org; Tue, 05 Aug 2025 07:36:51 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ujFyH-0006Ij-6J; Tue, 05 Aug 2025 07:36:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=C23ebzAp58W6W9cC20XP0sDLLKiBl7FiHWNcPHrONlU=; b=WcjBI2CqH1iq0Rqp/2Kv vhuRv9eu+EEtrLddNVqQlGNx2t/FsOO8M+kXW4BQeFZgyKPFEsX93EnjG9EJoSACTog3RaaBnmMiW V7fggiXctx586UqvQcoqpieFJcre96h3B+1jyPEECLsoxhI4II3r3ekVZaMPS/hCgHRh/J+dtsIzZ zAm9x/erTPNBJPj5VGsXMSNG5KbC/UC83CtlfOzyk8UsSGTHkwas+lRVx5os2hyI7QMlOg4DXleDS P4k0zMT6Y5zHq4IyTQL25nnMrawfl5SWjHJWuNAFYkpFjLSAocaWyjidntO8CKVPCOZDAmQOrLm5g leQPWbTlJhRpEA==; Date: Tue, 05 Aug 2025 14:36:42 +0300 Message-Id: <86ldnyuhit.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87y0ryqpah.fsf@mail.linkov.net> (message from Juri Linkov on Tue, 05 Aug 2025 09:28:30 +0300) References: <871pptcx44.fsf@gmail.com> <86wm7loum2.fsf@gnu.org> <87y0ryqpah.fsf@mail.linkov.net> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) 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 (---) > From: Juri Linkov > Cc: Elijah Gabe Pérez , > 79159@debbugs.gnu.org > Date: Tue, 05 Aug 2025 09:28:30 +0300 > > > But I won't object to adding a knob to have the behavior you want, if > > Juri agrees, and there are no other objections. However, this must be > > an opt-in behavior, by default off. > > Better to make it opt-out because currently display of excluded buffers > on the tab-line is too glitchy. Example: > > 0. emacs -Q > 1. M-x global-tab-line-mode RET > 2. C-x b foo RET > 3. C-x b SPC *bar* RET > 4. C-x > Now the buffer name " *bar*" is visible on the tab-line. > 5. C-x > But now " *bar*" suddenly goes away. > > This is because handling of excluded buffers is hard-coded > in many window.el functions. > > So not showing excluded buffers by default will avoid this snag. If there are bugs with handling excluded buffers, I hope we can fix them, instead of leaving them hidden behind a user option. People who will use that option will see those bugs exactly as all of the users see them today, and they _will_ complain. OTOH, since no one has yet complained about those bugs, perhaps leaving this behavior be the default is not such a bad idea? From unknown Mon Aug 18 11:28:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79159: [PATCH] Do not display in the tab line tabs that are excluded. Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Aug 2025 17:47:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 79159 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 79159@debbugs.gnu.org, eg642616@gmail.com Received: via spool by 79159-submit@debbugs.gnu.org id=B79159.175441600919700 (code B ref 79159); Tue, 05 Aug 2025 17:47:03 +0000 Received: (at 79159) by debbugs.gnu.org; 5 Aug 2025 17:46:49 +0000 Received: from localhost ([127.0.0.1]:56873 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ujLkO-00057f-Tq for submit@debbugs.gnu.org; Tue, 05 Aug 2025 13:46:49 -0400 Received: from mout-y-209.mailbox.org ([2001:67c:2050:103:465::209]:46712) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ujLkK-00057B-QY for 79159@debbugs.gnu.org; Tue, 05 Aug 2025 13:46:46 -0400 Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-y-209.mailbox.org (Postfix) with ESMTPS id 4bxLT61WW4zB0Gl; Tue, 5 Aug 2025 19:46:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; t=1754415994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=t9VqTAc0OMBXrOL1Jy5GNOGWexBni8v1ag8MOc2UHZ0=; b=ePelHJTpTJo65R4RI9Vt8nQ+uTNoN0VEsF0qMIPllXswSd7uIeGySz8oYXUiTr3Sj+UItD RmlwRdTes2SXs8G9zNqkLsiqGyRtTpp0eFWLeR36weHBVPchRkmu+7fUE1N5dpOubRx80O aZl8WzZbPMeIhtvAdw+hcna31ze7HRS6XfkusRzl9iahT4IDopIEqc1aTY0EAn4OlUdiNy N9HfKI5IKiCaUdPR6t3GI5lCN2/qVF3O4CbBEN4S38SDS9UYBJU5nBz0xC3ssZK8F35heb ttpkIooPlF/CDJ79gNf9O58BwviVqfMOnc1kS/whUtrZ3tQ7Imqg5yZBgF6MoQ== From: Juri Linkov In-Reply-To: <86ldnyuhit.fsf@gnu.org> Organization: LINKOV.NET References: <871pptcx44.fsf@gmail.com> <86wm7loum2.fsf@gnu.org> <87y0ryqpah.fsf@mail.linkov.net> <86ldnyuhit.fsf@gnu.org> Date: Tue, 05 Aug 2025 20:32:06 +0300 Message-ID: <87y0rxd695.fsf@mail.linkov.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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 (-) >> 1. M-x global-tab-line-mode RET >> 2. C-x b foo RET >> 3. C-x b SPC *bar* RET >> 4. C-x >> Now the buffer name " *bar*" is visible on the tab-line. >> 5. C-x >> But now " *bar*" suddenly goes away. >> >> This is because handling of excluded buffers is hard-coded >> in many window.el functions. >> >> So not showing excluded buffers by default will avoid this snag. > > If there are bugs with handling excluded buffers, I hope we can fix > them, instead of leaving them hidden behind a user option. People who > will use that option will see those bugs exactly as all of the users > see them today, and they _will_ complain. > > OTOH, since no one has yet complained about those bugs, perhaps > leaving this behavior be the default is not such a bad idea? Not bugs, just unexpected inconsistencies. window.el doesn't permit excluded buffers to exist in the window-prev-buffers list that is used for tab-line. No one complained about this problem because it's very difficult to notice it: one moment there is an excluded buffer on the tab-line, and the next moment it disappears. Not showing such buffers by default will fix this inconsistency. From unknown Mon Aug 18 11:28:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79159: [PATCH] Do not display in the tab line tabs that are excluded. Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Aug 2025 19:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 79159 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Juri Linkov Cc: 79159@debbugs.gnu.org, eg642616@gmail.com Received: via spool by 79159-submit@debbugs.gnu.org id=B79159.17544217244308 (code B ref 79159); Tue, 05 Aug 2025 19:23:01 +0000 Received: (at 79159) by debbugs.gnu.org; 5 Aug 2025 19:22:04 +0000 Received: from localhost ([127.0.0.1]:56994 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ujNEZ-00017P-Mk for submit@debbugs.gnu.org; Tue, 05 Aug 2025 15:22:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36120) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ujNEX-00016s-37 for 79159@debbugs.gnu.org; Tue, 05 Aug 2025 15:22:02 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ujNEP-0000he-Ne; Tue, 05 Aug 2025 15:21:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=DbgddZLdbrcqxB09wBsuYF6fwS60g3vMXzQMzL8+Gc0=; b=QVRvGPRD8GBe Eq6WEd/a3JumJRLUMXqLxNDZEZh4prMKysIH9EFhuqX/9cPvm2bfamI2pv2epTSr4hDARVJvOT6YF PzUmPSDvrabVvCR68AqR9e934ldvJYcJGKb1w5muEtg8S5fnTVlRufaNgOeN4AIdVlPX6nTIzR8wM evdF2wFVeOWD5q5HSc+9tWeX/wk2tUgfDE+TckHokS6DkS6BnARQBYEgxTgH5vo1+XbQqMbEYiaCj xDBOu82Z2woRqRCAkMFEbqgty2Mw5Tvan5FEpyhIUIgwfXUNKDj0ljn4AwRGeF5wlColqWBbNCkFw yg0FsTm8JRJDn/2RB/zwEw==; Date: Tue, 05 Aug 2025 22:21:47 +0300 Message-Id: <86v7n1tvzo.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87y0rxd695.fsf@mail.linkov.net> (message from Juri Linkov on Tue, 05 Aug 2025 20:32:06 +0300) References: <871pptcx44.fsf@gmail.com> <86wm7loum2.fsf@gnu.org> <87y0ryqpah.fsf@mail.linkov.net> <86ldnyuhit.fsf@gnu.org> <87y0rxd695.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) 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 (---) > From: Juri Linkov > Cc: eg642616@gmail.com, 79159@debbugs.gnu.org > Date: Tue, 05 Aug 2025 20:32:06 +0300 > > >> 1. M-x global-tab-line-mode RET > >> 2. C-x b foo RET > >> 3. C-x b SPC *bar* RET > >> 4. C-x > >> Now the buffer name " *bar*" is visible on the tab-line. > >> 5. C-x > >> But now " *bar*" suddenly goes away. > >> > >> This is because handling of excluded buffers is hard-coded > >> in many window.el functions. > >> > >> So not showing excluded buffers by default will avoid this snag. > > > > If there are bugs with handling excluded buffers, I hope we can fix > > them, instead of leaving them hidden behind a user option. People who > > will use that option will see those bugs exactly as all of the users > > see them today, and they _will_ complain. > > > > OTOH, since no one has yet complained about those bugs, perhaps > > leaving this behavior be the default is not such a bad idea? > > Not bugs, just unexpected inconsistencies. window.el doesn't > permit excluded buffers to exist in the window-prev-buffers list > that is used for tab-line. No one complained about this problem > because it's very difficult to notice it: one moment there is > an excluded buffer on the tab-line, and the next moment it disappears. > > Not showing such buffers by default will fix this inconsistency. No, it will just sweep the problem under the carpet. Since when are we handling bugs in this manner? If a feature needs work to be finished, let's please invest the effort to do that work. Let's please not have semi-broken features. From unknown Mon Aug 18 11:28:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79159: [PATCH] Do not display in the tab line tabs that are excluded. Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Aug 2025 06:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 79159 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 79159@debbugs.gnu.org, eg642616@gmail.com Received: via spool by 79159-submit@debbugs.gnu.org id=B79159.175446227329528 (code B ref 79159); Wed, 06 Aug 2025 06:38:02 +0000 Received: (at 79159) by debbugs.gnu.org; 6 Aug 2025 06:37:53 +0000 Received: from localhost ([127.0.0.1]:57834 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ujXmb-0007gB-AC for submit@debbugs.gnu.org; Wed, 06 Aug 2025 02:37:53 -0400 Received: from mout-y-111.mailbox.org ([91.198.250.236]:60470) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ujXmY-0007fj-Dq for 79159@debbugs.gnu.org; Wed, 06 Aug 2025 02:37:51 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-y-111.mailbox.org (Postfix) with ESMTPS id 4bxgZs1LsXz9y8D; Wed, 6 Aug 2025 08:37:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; t=1754462261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=fnWoEqK7z1Di81Qn7eqN8QkmKEQNR6mnaGUnZIlDJ0k=; b=YqcF23KUJosz6ANZNET7S9wcB9u249zZaAC8+YruAeMtWiNKnGZFetf1yQDba0gy3Pdd9a n0+W/iCWwkyA7s0t4r7LIPrn9O6j6xBeXsv8pElMEOyHlwvE+OoUIM+3IVLfb2JF4Aikjo ecdGRReTGTPkutZH/ujBzXDopQgdS8FCK1eflaHzYnioIrcF8tP1xhoiGo100KtzxBhQiW Tp00NsAQbLXFiEGGraAEtCOlfkPTXgGRvPKzSL2BfIQDAoJ5qjpoe/kzi+0gZJu3USd1kN GLwU5lAeOPOt9lqeDyn1qZh8CuMP2kD9+nwhOOCuB3lgud7aG/qWi8njloIn4w== From: Juri Linkov In-Reply-To: <86v7n1tvzo.fsf@gnu.org> Organization: LINKOV.NET References: <871pptcx44.fsf@gmail.com> <86wm7loum2.fsf@gnu.org> <87y0ryqpah.fsf@mail.linkov.net> <86ldnyuhit.fsf@gnu.org> <87y0rxd695.fsf@mail.linkov.net> <86v7n1tvzo.fsf@gnu.org> Date: Wed, 06 Aug 2025 09:28:06 +0300 Message-ID: <87tt2lht3x.fsf@mail.linkov.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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 (-) >> >> 1. M-x global-tab-line-mode RET >> >> 2. C-x b foo RET >> >> 3. C-x b SPC *bar* RET >> >> 4. C-x >> >> Now the buffer name " *bar*" is visible on the tab-line. >> >> 5. C-x >> >> But now " *bar*" suddenly goes away. >> >> >> >> This is because handling of excluded buffers is hard-coded >> >> in many window.el functions. >> >> >> >> So not showing excluded buffers by default will avoid this snag. >> > >> > If there are bugs with handling excluded buffers, I hope we can fix >> > them, instead of leaving them hidden behind a user option. People who >> > will use that option will see those bugs exactly as all of the users >> > see them today, and they _will_ complain. >> > >> > OTOH, since no one has yet complained about those bugs, perhaps >> > leaving this behavior be the default is not such a bad idea? >> >> Not bugs, just unexpected inconsistencies. window.el doesn't >> permit excluded buffers to exist in the window-prev-buffers list >> that is used for tab-line. No one complained about this problem >> because it's very difficult to notice it: one moment there is >> an excluded buffer on the tab-line, and the next moment it disappears. >> >> Not showing such buffers by default will fix this inconsistency. > > No, it will just sweep the problem under the carpet. Since when are > we handling bugs in this manner? If a feature needs work to be > finished, let's please invest the effort to do that work. Let's > please not have semi-broken features. Currently there is a bug in tab-line.el, and the proposed patch fixes it. Without activating global-tab-line-mode try the following: 0. emacs -Q 1. C-x b SPC *bar* RET 2. C-x b foo RET 3. C-x It switches to the initial buffer *scratch*, skipping the excluded buffer " *bar*". Without the proposed patch the tab-line is broken, because it displays the excluded buffer, but 'C-x ' can't switch to it. So tab-line.el should follow the logic of window.el and omit excluded buffers as well. From unknown Mon Aug 18 11:28:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79159: [PATCH] Do not display in the tab line tabs that are excluded. Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Aug 2025 12:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 79159 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Juri Linkov Cc: 79159@debbugs.gnu.org, eg642616@gmail.com Received: via spool by 79159-submit@debbugs.gnu.org id=B79159.175448470121372 (code B ref 79159); Wed, 06 Aug 2025 12:52:01 +0000 Received: (at 79159) by debbugs.gnu.org; 6 Aug 2025 12:51:41 +0000 Received: from localhost ([127.0.0.1]:58444 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ujdcK-0005Yd-FM for submit@debbugs.gnu.org; Wed, 06 Aug 2025 08:51:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39812) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ujdcI-0005YQ-0F for 79159@debbugs.gnu.org; Wed, 06 Aug 2025 08:51:38 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ujdcA-0005cM-Ou; Wed, 06 Aug 2025 08:51:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=kwlQQUbEqz4vX3ySQGOh/wJ5NDeN2ihGrK/mPvzPK2U=; b=aQb3RicRhIKm YTVDZLOSaLsQzwiD1DeBgusyGf1HtyQosLXHAwl9OrK7zmnKrwe2dWTwR9cNyI3xA41ok5dOi4Rf1 2rMzZGgBNhaL+INaQQWUpOFUuSDRh7ao9LJZaXB20gKNya6okfHvowTcDUfwo2p/OSlP+Bt5ppj3E Znmt4T+oc7LLfQyHf39hZMMpep/56uHlEZ1CDsXg/dqqHxRw6puqYMHh6BPOVkkVolTOz0C8qU+GC M4RoGFPfRkFmzdCmyOR22O9HtpaEyijQrxIwVIOWmfJ35jwfQIIHFjph7sQr2s2fTbleupR2xiS+E CmXlBRNLBfoNNRxCeK4/cw==; Date: Wed, 06 Aug 2025 15:51:27 +0300 Message-Id: <86cy98txyo.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87tt2lht3x.fsf@mail.linkov.net> (message from Juri Linkov on Wed, 06 Aug 2025 09:28:06 +0300) References: <871pptcx44.fsf@gmail.com> <86wm7loum2.fsf@gnu.org> <87y0ryqpah.fsf@mail.linkov.net> <86ldnyuhit.fsf@gnu.org> <87y0rxd695.fsf@mail.linkov.net> <86v7n1tvzo.fsf@gnu.org> <87tt2lht3x.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) 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 (---) > From: Juri Linkov > Cc: eg642616@gmail.com, 79159@debbugs.gnu.org > Date: Wed, 06 Aug 2025 09:28:06 +0300 > > >> >> 1. M-x global-tab-line-mode RET > >> >> 2. C-x b foo RET > >> >> 3. C-x b SPC *bar* RET > >> >> 4. C-x > >> >> Now the buffer name " *bar*" is visible on the tab-line. > >> >> 5. C-x > >> >> But now " *bar*" suddenly goes away. > >> >> > >> >> This is because handling of excluded buffers is hard-coded > >> >> in many window.el functions. > >> >> > >> >> So not showing excluded buffers by default will avoid this snag. > >> > > >> > If there are bugs with handling excluded buffers, I hope we can fix > >> > them, instead of leaving them hidden behind a user option. People who > >> > will use that option will see those bugs exactly as all of the users > >> > see them today, and they _will_ complain. > >> > > >> > OTOH, since no one has yet complained about those bugs, perhaps > >> > leaving this behavior be the default is not such a bad idea? > >> > >> Not bugs, just unexpected inconsistencies. window.el doesn't > >> permit excluded buffers to exist in the window-prev-buffers list > >> that is used for tab-line. No one complained about this problem > >> because it's very difficult to notice it: one moment there is > >> an excluded buffer on the tab-line, and the next moment it disappears. > >> > >> Not showing such buffers by default will fix this inconsistency. > > > > No, it will just sweep the problem under the carpet. Since when are > > we handling bugs in this manner? If a feature needs work to be > > finished, let's please invest the effort to do that work. Let's > > please not have semi-broken features. > > Currently there is a bug in tab-line.el, and the proposed patch fixes it. > > Without activating global-tab-line-mode try the following: > > 0. emacs -Q > 1. C-x b SPC *bar* RET > 2. C-x b foo RET > 3. C-x > > It switches to the initial buffer *scratch*, > skipping the excluded buffer " *bar*". > > Without the proposed patch the tab-line is broken, > because it displays the excluded buffer, > but 'C-x ' can't switch to it. > > So tab-line.el should follow the logic of window.el > and omit excluded buffers as well. If you consider the above a bug due to the fact that we show excluded buffers, the conclusion is that we should unconditionally avoid showing them, and the user option or a variable which controls this has no place. That assumes that our intent is that excluded buffers should not be shown by any tab-line, and can only be switched to with the likes of "C-x b". It's your call. From unknown Mon Aug 18 11:28:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79159: [PATCH] Do not display in the tab line tabs that are excluded. Resent-From: "Elijah G." Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Aug 2025 04:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 79159 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Juri Linkov Cc: 79159@debbugs.gnu.org, Eli Zaretskii Received: via spool by 79159-submit@debbugs.gnu.org id=B79159.17545404129709 (code B ref 79159); Thu, 07 Aug 2025 04:21:02 +0000 Received: (at 79159) by debbugs.gnu.org; 7 Aug 2025 04:20:12 +0000 Received: from localhost ([127.0.0.1]:32862 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ujs6t-0002WK-8h for submit@debbugs.gnu.org; Thu, 07 Aug 2025 00:20:11 -0400 Received: from mail-ot1-x342.google.com ([2607:f8b0:4864:20::342]:49544) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1ujs6q-0002W2-Mf for 79159@debbugs.gnu.org; Thu, 07 Aug 2025 00:20:09 -0400 Received: by mail-ot1-x342.google.com with SMTP id 46e09a7af769-741c0d47aadso393436a34.3 for <79159@debbugs.gnu.org>; Wed, 06 Aug 2025 21:20:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1754540403; x=1755145203; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=GLS7w4vVzuzmxrlwAqj/0/dVg+KnZLlCJ49cVv/me64=; b=aCcsfK2/lfAhUnHdFQI1RW+4cDdpDc5G4BXZ4ZNtNF/C/ij2Lzo6rSXH00uXJU2wj7 CmSWC3wpPk3o0CuHBbuIZ7BfUw6Ji6cbqrFm8ov+HoXn+lDxS/gwGa0W36Wrs46rOeNe Ogxt96gy1aA7TI1mwJoaBIMDZbRttNgCtZKOY4gfx+06FKrAmkAgVbYTDnxSmu9lad7y myT9+LgwRlydBqfMGxpWMtybdOlz8s632YyUH23bhRLUh/Lpq1c7X2Tdx6GISVIanS5i /d/4Sj03HrDWaN1HVOAxU1mvV831gF5tGWeBzbbTnqqFw0oaw5XeoRzSrYICSRk0bDH/ URxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754540403; x=1755145203; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=GLS7w4vVzuzmxrlwAqj/0/dVg+KnZLlCJ49cVv/me64=; b=nF3ckFCyzjM8zjOqzRAUlw0dYAbax8lNWCDAuWbgk+uaF6bBA6SuQ8efDxA1ns4VKT lo/Q+hq8/BNDWAr1/ps4bplwT2AFTUaPutOYJU0L/f52tg1sU4Wgv/ieSiVlXCKqkH4w bHaoCpHqdI7iH610sWIaAvBEFa3/XbX2ayBrOqWVZgxN6SU1Bvp1Iglxvb/UpI08c9+P Rs5kmX6B+dAux0V31qxr4v8pTxkYe3gJWBCiBKS2dIZ+CVzFrxOS4l1L2QnU32Jwji5S 0ZRu7MOW9UrdTpwmeS5GqVxaFTVzFzbzSPk9sI70a/x6WRTlmymqTxW4fgtPRZN8etIj uplw== X-Forwarded-Encrypted: i=1; AJvYcCV90l4EbiooMklQQB/3pznbmokdwTdkGBN4hHVFMyRehmGIm6Tfg2DNkka4F9lTJbp4kqTrgw==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yy8C+ZgvBiZIvFgVdGszoJ2cJFdSAJx4ZDt11pVpGrHvyQvWNj2 D09HaBori8jHdwQnun3dwIOEwa4m+QbMsc4yuedOq7xUpxYTS+VijRqL8tLTiToL X-Gm-Gg: ASbGncsZFLpD4De6Xq644iQ45t3KtLbSMGcOyIBBKDtzvPC7zzQVuT73ZUJPZiZYKI6 BMNlOhxc0uEwobcEVIrIO7v7m+22wp4mzaAeS4kbLNw+Zh0lgqyND3bHPTGP18MvpXcb7Gy2Uu0 NRMXUQDj+T2G0nRVwzjI0VRsY+9Cu5eIJKTmDV3t3LKj41JoiFTIRN4N7dTs/Mw8Jix/S89K+nM leQO1in9Prns8EdgzN3jD6m45u/aS6kDbd1nRcHW0o80e05/8DO1fZxFx9L0rFs/LyoavnHTWmn /KqvYDn+b3tdpgagGB5w5ENTSAHSfa9DBvwsipkHn81h3Id7Js10I6nvfzbCYoYIASlBh4PlMtT LbHF8pOpHRBWa52wvNrMiL+uZ49J5 X-Google-Smtp-Source: AGHT+IE2KES97Lp/R1Z+neFnPSgv7DqE7W0kACh+1T6EaYO6E/NSedt0seESeOGXW1HyRp1uIm0efQ== X-Received: by 2002:a05:6830:dc7:b0:741:c51c:9e3 with SMTP id 46e09a7af769-74308ee9d2amr4055781a34.23.1754540402645; Wed, 06 Aug 2025 21:20:02 -0700 (PDT) Received: from localhost ([189.215.161.127]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-742f6a3fb1csm1581973a34.37.2025.08.06.21.20.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Aug 2025 21:20:02 -0700 (PDT) From: "Elijah G." In-Reply-To: <87tt2lht3x.fsf@mail.linkov.net> (Juri Linkov's message of "Wed, 06 Aug 2025 09:28:06 +0300") References: <871pptcx44.fsf@gmail.com> <86wm7loum2.fsf@gnu.org> <87y0ryqpah.fsf@mail.linkov.net> <86ldnyuhit.fsf@gnu.org> <87y0rxd695.fsf@mail.linkov.net> <86v7n1tvzo.fsf@gnu.org> <87tt2lht3x.fsf@mail.linkov.net> Date: Wed, 06 Aug 2025 22:19:57 -0600 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.93 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) 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: -0.7 (/) Juri Linkov writes: [...] >> No, it will just sweep the problem under the carpet. Since when are >> we handling bugs in this manner? If a feature needs work to be >> finished, let's please invest the effort to do that work. Let's >> please not have semi-broken features. > > Currently there is a bug in tab-line.el, and the proposed patch fixes > it. > > Without activating global-tab-line-mode try the following: > > 0. emacs -Q > 1. C-x b SPC *bar* RET > 2. C-x b foo RET > 3. C-x > > It switches to the initial buffer *scratch*, > skipping the excluded buffer " *bar*". > > Without the proposed patch the tab-line is broken, > because it displays the excluded buffer, > but 'C-x ' can't switch to it. > > So tab-line.el should follow the logic of window.el > and omit excluded buffers as well. Yes, I've noticed this "bug", i have many buffers excluded, and when (for some reason) they appear in my tab line (or I accidentally switch to them), they are going to end up flooding my tab line, and it will be hard to switch buffers via "C-x |". But i agree this should be an option, maybe disabled by default, since it seems that no one had reported this as a bug before. > > + (or (with-current-buffer b > > + (memq major-mode tab-line-exclude-modes)) > Optimization without using 'with-current-buffer': > (buffer-local-value 'major-mode b) Thanks, i forgot this exists. > > @@ -598,7 +626,9 @@ tab-line-tabs-fixed-window-buffers > > (lambda (buf idx) (puthash buf idx > > index-table)) > > old-buffers) > > index-table)) > > - (new-buffers (sort (tab-line-tabs-window-buffers) > > + (buffer-list (tab-line-displayable-tab-list > > + (funcall tab-line-tabs-fixed-buffer-list-function))) > Please don't hardcode 'tab-line-displayable-tab-list'. > The proper way is to have a predicate user option with two const values: > one is a function that returns all buffers, another that omits excluded > buffers, and a slot for a user-defined custom function. > Maybe the existing 'tab-line-tabs-buffer-list-function' > should be promoted to the user option. I like the idea, but the problem is that `tab-line-tabs-buffer-list-function' is used only for `tab-line-tabs-mode-buffers' and `tab-line-tabs-buffer-groups'. Maybe the function should take an optional argument if it should list only window buffers, so it can be used in 'tab-line-tabs-fixed-window-buffers' and others. -- - E.G via GNU Emacs Android port. From unknown Mon Aug 18 11:28:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79159: [PATCH] Do not display in the tab line tabs that are excluded. Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Aug 2025 06:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 79159 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: "Elijah G." Cc: 79159@debbugs.gnu.org, juri@linkov.net Received: via spool by 79159-submit@debbugs.gnu.org id=B79159.175454649331174 (code B ref 79159); Thu, 07 Aug 2025 06:02:01 +0000 Received: (at 79159) by debbugs.gnu.org; 7 Aug 2025 06:01:33 +0000 Received: from localhost ([127.0.0.1]:33111 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ujtgy-00086i-Mo for submit@debbugs.gnu.org; Thu, 07 Aug 2025 02:01:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46444) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ujtgw-00086S-Fa for 79159@debbugs.gnu.org; Thu, 07 Aug 2025 02:01:31 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ujtgr-0007UI-3h; Thu, 07 Aug 2025 02:01:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ST4D3QIQhf8CWkRilcgTWwHStSwNkHJS/SQKE/ZxzOg=; b=Co4CfHdeojWi sOP0rMGiD7jQ/USqPnQA/LMP8RJsTrmmDlPfGVX1yFZFNP4tWHOeumTuWvq47kZMbBn6ah3tRTu5O k3FekoM1Mj2ccFUEP7+aWuUcLhCXcushbbSdnrRSx3Pa0YOYTKeRTX+5kdlggYfBpJguf4HUKTPoy uMfLWynIb/09VqTDMmhl3+AzGAGqVMDRYgZMAdlx7Jbg+Yjm4Lo2WxUByWylxK/MgZWcr2Ev6siVZ i7ljXMI+LZuut10qKOxSXWxb/9ZtDV6OMksEa6YheK+FxdXumM+vgAdB2rsBFSn8wu7O4jO7oxSZJ 0CZIaFIb1l1QSUYyB47e0Q==; Date: Thu, 07 Aug 2025 09:01:22 +0300 Message-Id: <86zfcbr7pp.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (eg642616@gmail.com) References: <871pptcx44.fsf@gmail.com> <86wm7loum2.fsf@gnu.org> <87y0ryqpah.fsf@mail.linkov.net> <86ldnyuhit.fsf@gnu.org> <87y0rxd695.fsf@mail.linkov.net> <86v7n1tvzo.fsf@gnu.org> <87tt2lht3x.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) 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 (---) > From: "Elijah G." > Cc: Eli Zaretskii , 79159@debbugs.gnu.org > Date: Wed, 06 Aug 2025 22:19:57 -0600 > > Juri Linkov writes: > > > So tab-line.el should follow the logic of window.el > > and omit excluded buffers as well. > > Yes, I've noticed this "bug", i have many buffers excluded, and when (for > some reason) they appear in my tab line (or I accidentally switch to > them), they are going to end up flooding my tab line, and it will be > hard to switch buffers via "C-x |". > > But i agree this should be an option, maybe disabled by default, since > it seems that no one had reported this as a bug before. If Juri thinks the above is a bug that your changes fix, there should not be a user option that reveals the bug. (I apologize for urging you to add an option, because I didn't know Juri will consider the current behavior a bug whose fix is not to show the buffers in tab-line.) Thanks. From unknown Mon Aug 18 11:28:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79159: [PATCH] Do not display in the tab line tabs that are excluded. Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Aug 2025 06:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 79159 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: "Elijah G." Cc: 79159@debbugs.gnu.org, Eli Zaretskii Received: via spool by 79159-submit@debbugs.gnu.org id=B79159.17545486585934 (code B ref 79159); Thu, 07 Aug 2025 06:38:02 +0000 Received: (at 79159) by debbugs.gnu.org; 7 Aug 2025 06:37:38 +0000 Received: from localhost ([127.0.0.1]:33198 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ujuFu-0001Xe-81 for submit@debbugs.gnu.org; Thu, 07 Aug 2025 02:37:38 -0400 Received: from mout-p-201.mailbox.org ([80.241.56.171]:51126) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ujuFr-0001XH-T0 for 79159@debbugs.gnu.org; Thu, 07 Aug 2025 02:37:36 -0400 Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4byHX76CGsz9tC4; Thu, 7 Aug 2025 08:37:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; t=1754548647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6lPjnOmqDUVtZD40TEeg29Lg6f2sPlGW9zUGlYjR6yE=; b=0QncckOLJT3k8eFCgKTARWzq1Itin2u8nx0SUZrbhTKDcN4hzcVHFxsc0hqa4mO5B8G0VZ FPvXKGAQToE7pH7KOZ87pucYOU/4e19Aj/G+aYeht/l3HJAI0YQE6QsTX1wTgX3i9+LVGr TDU7gwDXJrB/g/tJNA9BpGJpsxEvJetdpgluhw6SZOHTbi7a7pQbVlH/Mv+tFVTb1A2Ih8 N2RC7XoHieiS+9Ip6P98Pyjs4F1R/YCAxlfOrlfDESI/E98zABzp+pfJe1KyLTPODi12ua 6MALy+c2hL5qIsIj0XMsvHzZ5BEJfFnYH8hZ+xyTfzpp63h0oweQnEjTFujgSQ== Authentication-Results: outgoing_mbo_mout; dkim=none; spf=pass (outgoing_mbo_mout: domain of juri@linkov.net designates 2001:67c:2050:b231:465::102 as permitted sender) smtp.mailfrom=juri@linkov.net From: Juri Linkov In-Reply-To: Organization: LINKOV.NET References: <871pptcx44.fsf@gmail.com> <86wm7loum2.fsf@gnu.org> <87y0ryqpah.fsf@mail.linkov.net> <86ldnyuhit.fsf@gnu.org> <87y0rxd695.fsf@mail.linkov.net> <86v7n1tvzo.fsf@gnu.org> <87tt2lht3x.fsf@mail.linkov.net> Date: Thu, 07 Aug 2025 09:20:00 +0300 Message-ID: <87ldnvod7f.fsf@mail.linkov.net> MIME-Version: 1.0 Content-Type: text/plain X-Rspamd-Queue-Id: 4byHX76CGsz9tC4 X-Spam-Score: -0.7 (/) 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 (-) >> 1. C-x b SPC *bar* RET >> 2. C-x b foo RET >> 3. C-x >> >> It switches to the initial buffer *scratch*, >> skipping the excluded buffer " *bar*". >> >> Without the proposed patch the tab-line is broken, >> because it displays the excluded buffer, >> but 'C-x ' can't switch to it. >> >> So tab-line.el should follow the logic of window.el >> and omit excluded buffers as well. > > Yes, I've noticed this "bug", i have many buffers excluded, and when (for > some reason) they appear in my tab line (or I accidentally switch to > them), they are going to end up flooding my tab line, and it will be > hard to switch buffers via "C-x |". Do you mean that you customize not only 'tab-line-exclude-buffers', but also 'switch-to-prev-buffer-skip' and 'switch-to-prev-buffer-skip-regexp' to exclude the same buffers for both tab-line and "C-x |"? >> Maybe the existing 'tab-line-tabs-buffer-list-function' >> should be promoted to the user option. > > I like the idea, but the problem is that > `tab-line-tabs-buffer-list-function' is used only for > `tab-line-tabs-mode-buffers' and `tab-line-tabs-buffer-groups'. > > Maybe the function should take an optional argument if it should list > only window buffers, so it can be used in > 'tab-line-tabs-fixed-window-buffers' and others. In fact it's needed only for 'tab-line-tabs-window-buffers' and 'tab-line-tabs-fixed-window-buffers', but not for other, because other such as 'tab-line-tabs-mode-buffers' and 'tab-line-tabs-buffer-groups' have own means to exclude buffers from the tab-line using 'tab-line-tabs-buffer-list-function'. So we could add a similar function e.g. 'tab-line-tabs-window-buffers-function' for 'tab-line-tabs-window-buffers' and 'tab-line-tabs-fixed-window-buffers' only. From unknown Mon Aug 18 11:28:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79159: [PATCH] Do not display in the tab line tabs that are excluded. Resent-From: Elijah Gabe =?UTF-8?Q?P=C3=A9rez?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 Aug 2025 19:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 79159 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Juri Linkov Cc: 79159@debbugs.gnu.org, Eli Zaretskii Received: via spool by 79159-submit@debbugs.gnu.org id=B79159.175468047229357 (code B ref 79159); Fri, 08 Aug 2025 19:15:01 +0000 Received: (at 79159) by debbugs.gnu.org; 8 Aug 2025 19:14:32 +0000 Received: from localhost ([127.0.0.1]:39229 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ukSXv-0007dP-HM for submit@debbugs.gnu.org; Fri, 08 Aug 2025 15:14:32 -0400 Received: from mail-oi1-x241.google.com ([2607:f8b0:4864:20::241]:43254) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1ukSXq-0007d3-GD for 79159@debbugs.gnu.org; Fri, 08 Aug 2025 15:14:29 -0400 Received: by mail-oi1-x241.google.com with SMTP id 5614622812f47-4356e03d195so1597498b6e.0 for <79159@debbugs.gnu.org>; Fri, 08 Aug 2025 12:14:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1754680460; x=1755285260; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=eYLnLCZPtGcQHpLjnWh7/NYeiuWPpRaoxwGw7kD3IY4=; b=kJKCJHLGlK0FmBWpgd783CB8xqsblG4xnUfOAH3Kkug1Nt+WFNujbMK7pmHSKiH9uw TT5TaWzlPk1rSRU17djWbe6wq+w1Q2x+8Oqhp8JydTDkU5rmcI6blPAMRCcLIZhsIany NTnqkgkjqLF6+yqI1GqCbWSu2Xbn0baKOAlO9Mu6WmbIuS2d/2Nc7GTw6ly0Wc6E5t/g WLfWy0nvBzw6K/8wldZK1E8ZD5OFxnNpso8vFCaLilcz/8wKMDD6WizXkYrmdWJGWya1 ZZockHhYR9GWKKckBVa9L5ujTpWZbD83hD79JNUMrAjK+NZRBaWUaV/5+7xurZaUbNGt ILTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754680460; x=1755285260; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=eYLnLCZPtGcQHpLjnWh7/NYeiuWPpRaoxwGw7kD3IY4=; b=BPdLiY8pd7SZLghU4NCDx8X2f3TFpt5+itVwskEocclsvPzNcZD9SIm9jDdBMpETOh Fk41Mv8zAj4eNoqTuh0GkVGW+6CoFAcTHIjQD+FKh2aZfsvwlvDZVUxDY48owYi0tRQp xvjHacxR3F+YhAfbyfxrwY0fEsDKzOuvFdVCS8tJGI/Md/A4Osdn30mQcYZwfuFBnzqg /YX3ajuWLeh6qDNQ6ZPJ0qZrlOlnuVyl0/4hCfJ/Xob24gTmCrgV7ins+imRfx4d1rKq U403AUvok3YVC0xAH5YHNNHEgn9tbBb9yUsEZqCqUJgH/S7UfKR2DOIeZvhwOtBfU4xn P2xA== X-Gm-Message-State: AOJu0YyhbPQJWCzwjD5w+2bTv3Zj+bdct7Yky42hNOs1AgSamJVkYh0j +VgreNyBvhv2RdWxTPJdjV84v+ffCfoZg4+ZXpBT3ZIgSwWWGoeq+KUP X-Gm-Gg: ASbGncsnsKXoHkOFCRHhGs2wNfnZBf776LqzZ5Hf+el3YLpKbFeYVdjnJlRkg7QMac2 s6yjmFRhowAo5isqcUnv+2DZXXgOjH5NsMO9v0DYofXIjBrtCna1Oc1n+tpmwLBu/KaDKq5vTi7 Qt9wlzfzse/hCA3djuZlsKGYfqFyhVgUPTOorLA92aMYWZ6hcJCGeR2QFLC1GJ0JoEvcZEEJeRM NlZ0arW/BqKk0IOdxSHzwY2oIPTgfRCrLJb2rgGgwOO7mBI1DpHpRYD9rSU7T+ukx6sirhWAqZl qD+PDLM1bjd1Q+CHxSA1xgx37Wz6iwdFOjHw1X2VqNrHDQx9vQ/iURVm20GucMGsVj3pgoSghn8 9CS48BX31cMbdmJk= X-Google-Smtp-Source: AGHT+IGvje1zZ4DkQRss0JjndKtwjQj1RzELQywFSj8o5uhOrrm0GCyb+9G0Ix9VaQ+lMyMU2sn4jw== X-Received: by 2002:a05:6808:6a8e:b0:434:126d:407f with SMTP id 5614622812f47-43587d98e53mr5579302b6e.19.1754680460365; Fri, 08 Aug 2025 12:14:20 -0700 (PDT) Received: from fedora ([189.215.161.127]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-30c3a9d071csm269542fac.16.2025.08.08.12.14.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Aug 2025 12:14:19 -0700 (PDT) From: Elijah Gabe =?UTF-8?Q?P=C3=A9rez?= In-Reply-To: <87ldnvod7f.fsf@mail.linkov.net> References: <871pptcx44.fsf@gmail.com> <86wm7loum2.fsf@gnu.org> <87y0ryqpah.fsf@mail.linkov.net> <86ldnyuhit.fsf@gnu.org> <87y0rxd695.fsf@mail.linkov.net> <86v7n1tvzo.fsf@gnu.org> <87tt2lht3x.fsf@mail.linkov.net> <87ldnvod7f.fsf@mail.linkov.net> Date: Fri, 08 Aug 2025 13:14:16 -0600 Message-ID: <87tt2hzkvr.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.3 (/) 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: -0.7 (/) --=-=-= Content-Type: text/plain Juri Linkov writes: >>> 1. C-x b SPC *bar* RET >>> 2. C-x b foo RET >>> 3. C-x >>> >>> It switches to the initial buffer *scratch*, >>> skipping the excluded buffer " *bar*". >>> >>> Without the proposed patch the tab-line is broken, >>> because it displays the excluded buffer, >>> but 'C-x ' can't switch to it. >>> >>> So tab-line.el should follow the logic of window.el >>> and omit excluded buffers as well. >> >> Yes, I've noticed this "bug", i have many buffers excluded, and when (for >> some reason) they appear in my tab line (or I accidentally switch to >> them), they are going to end up flooding my tab line, and it will be >> hard to switch buffers via "C-x |". > > Do you mean that you customize not only 'tab-line-exclude-buffers', > but also 'switch-to-prev-buffer-skip' and 'switch-to-prev-buffer-skip-regexp' > to exclude the same buffers for both tab-line and "C-x |"? No, i don't use 'switch-to-prev-buffer-skip' and 'switch-to-prev-buffer-skip-regexp' because they don't work in tab-line (from what I've tested). >>> Maybe the existing 'tab-line-tabs-buffer-list-function' >>> should be promoted to the user option. >> >> I like the idea, but the problem is that >> `tab-line-tabs-buffer-list-function' is used only for >> `tab-line-tabs-mode-buffers' and `tab-line-tabs-buffer-groups'. >> >> Maybe the function should take an optional argument if it should list >> only window buffers, so it can be used in >> 'tab-line-tabs-fixed-window-buffers' and others. > > In fact it's needed only for 'tab-line-tabs-window-buffers' > and 'tab-line-tabs-fixed-window-buffers', but not for other, > because other such as 'tab-line-tabs-mode-buffers' and > 'tab-line-tabs-buffer-groups' have own means to exclude buffers > from the tab-line using 'tab-line-tabs-buffer-list-function'. > > So we could add a similar function e.g. 'tab-line-tabs-window-buffers-function' > for 'tab-line-tabs-window-buffers' and 'tab-line-tabs-fixed-window-buffers' > only. Here is what I have done, I'm not sure of the result. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-tab-line-hide-excluded-buffers-in-the-tab-line.-Bug-.patch >From c9ae80e5e77f3cdb0cc4ade8197f3827cd2fb9d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?El=C3=ADas=20Gabriel=20P=C3=A9rez?= Date: Fri, 1 Aug 2025 20:14:59 -0600 Subject: [PATCH] tab-line: hide excluded buffers in the tab line. (Bug#79159) * etc/NEWS: Announce changes. * lisp/tab-line.el (tab-line-tabs-window-buffers-filter-function): New variable. (tab-line-tabs-window-buffers-filter-default): New function. (tab-line-tabs-window-buffers-function): New variable. (tab-line-tabs-window-buffers): Move code ... (tab-line-tabs-window-buffers-default): ... to this new function. (tab-line-tabs-fixed-window-buffers): Rework. --- etc/NEWS | 6 ++++++ lisp/tab-line.el | 45 ++++++++++++++++++++++++++++++++++++++------- 2 files changed, 44 insertions(+), 7 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index e12a9dcb127..20182cdd367 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -436,6 +436,12 @@ a buffer. The value must be a condition which is passed to With this user option, if non-nil (the default), the tab close button will change its appearance if the tab buffer has been modified. +--- +*** Excluded buffers are no longer shown in tab-lines of other buffers. +Buffers that match 'tab-line-exclude-buffers' and buffers whose +modes are in 'tab-line-exclude-modes' will not appear in tab-lines +of other buffers. + ** Project --- diff --git a/lisp/tab-line.el b/lisp/tab-line.el index 51675dbbb29..1ddcc2fce6e 100644 --- a/lisp/tab-line.el +++ b/lisp/tab-line.el @@ -565,12 +565,30 @@ tab-line-tabs-buffer-groups sorted-buffers))) (cons group-tab tabs)))) -(defun tab-line-tabs-window-buffers () - "Return a list of tabs that should be displayed in the tab line. -By default returns a list of window buffers, i.e. buffers previously -shown in the same window where the tab line is displayed. -This list can be overridden by changing the default value of the -variable `tab-line-tabs-function'." +(defvar tab-line-exclude-buffers) +(defvar tab-line-exclude-modes) + +(defvar tab-line-tabs-window-buffers-filter-function + #'tab-line-tabs-window-buffers-filter-default + "Filter which buffers should be displayed in the tab line.") + +(defun tab-line-tabs-window-buffers-filter-default (buffers) + "Filter BUFFERS and return non-excluded buffers list." + (seq-remove + (lambda (b) + (or (memq (buffer-local-value 'major-mode b) + tab-line-exclude-modes) + (buffer-match-p tab-line-exclude-buffers b))) + buffers)) + +(defvar tab-line-tabs-window-buffers-function + #'tab-line-tabs-window-buffers-default + "Function for get a list of window buffers. +Used only for `tab-line-tabs-fixed-window-buffers'.") + +(defun tab-line-tabs-window-buffers-default () + "Default function for `tab-line-tabs-window-buffers-function'. +Return a list of buffers that should be displayed in the tab line." (let* ((window (selected-window)) (buffer (window-buffer window)) (next-buffers (seq-remove (lambda (b) (eq b buffer)) @@ -585,6 +603,16 @@ tab-line-tabs-window-buffers (list buffer) next-buffers))) +(defun tab-line-tabs-window-buffers () + "Return a list of tabs that should be displayed in the tab line. +By default returns a list of window buffers, i.e. buffers previously +shown in the same window where the tab line is displayed. +This list can be overridden by changing the default value of the +variable `tab-line-tabs-function'." + (funcall + tab-line-tabs-window-buffers-filter-function + (funcall tab-line-tabs-window-buffers-function))) + (defun tab-line-tabs-fixed-window-buffers () "Like `tab-line-tabs-window-buffers' but keep stable sorting order. This means that switching to a buffer previously shown in the same @@ -598,7 +626,10 @@ tab-line-tabs-fixed-window-buffers (lambda (buf idx) (puthash buf idx index-table)) old-buffers) index-table)) - (new-buffers (sort (tab-line-tabs-window-buffers) + (buffers (funcall + tab-line-tabs-window-buffers-filter-function + (funcall tab-line-tabs-window-buffers-function))) + (new-buffers (sort buffers :in-place t :key (lambda (buffer) (gethash buffer buffer-positions -- 2.50.1 --=-=-= Content-Type: text/plain -- - E.G via Gnus and Org. --=-=-=-- From unknown Mon Aug 18 11:28:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79159: [PATCH] Do not display in the tab line tabs that are excluded. Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Aug 2025 18:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 79159 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Elijah Gabe =?UTF-8?Q?P=C3=A9rez?= Cc: 79159@debbugs.gnu.org, Eli Zaretskii Received: via spool by 79159-submit@debbugs.gnu.org id=B79159.175485129625880 (code B ref 79159); Sun, 10 Aug 2025 18:42:02 +0000 Received: (at 79159) by debbugs.gnu.org; 10 Aug 2025 18:41:36 +0000 Received: from localhost ([127.0.0.1]:45935 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ulAz9-0006jM-QH for submit@debbugs.gnu.org; Sun, 10 Aug 2025 14:41:36 -0400 Received: from mout-p-102.mailbox.org ([80.241.56.152]:38988) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ulAz6-0006j2-0s for 79159@debbugs.gnu.org; Sun, 10 Aug 2025 14:41:33 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4c0RS42xz7z9smW; Sun, 10 Aug 2025 20:41:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; t=1754851284; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=gI3q76PhXI963jQwdrfy8XU83eY3tENJYWkJHFPANtY=; b=lbpKw4VLzjAg8aTvP1tCMGuMhYVz7DLD7dy7eu5++JbsoB3QKyOSD2uiaWq/ftHwLY2a7f HfsOU1qHR7rsO3yYMu0T0oNxkByhU4mdZ8TTpngsFdbMlsjXkibh+PDlaO2fSsWRDVd1/3 sYRbi1euNSYZY/7BQN5h/WaLFtNG/D3CY7OT3ikTPBlt34wEKm70jRezNiHKcEAMjQK50z hysliYOs21DNVq1sVjN3zUDk+xE3Aj+MqzjzsRetY5uANhsYkBoyJA7kPtKtfhSq37AsCy X+7MCB2Bk9lI5z611JqH94oecD06OoEbBZmph4eHC5pJFN+9hN2eCv7UPsvBBg== From: Juri Linkov In-Reply-To: <87tt2hzkvr.fsf@gmail.com> Organization: LINKOV.NET References: <871pptcx44.fsf@gmail.com> <86wm7loum2.fsf@gnu.org> <87y0ryqpah.fsf@mail.linkov.net> <86ldnyuhit.fsf@gnu.org> <87y0rxd695.fsf@mail.linkov.net> <86v7n1tvzo.fsf@gnu.org> <87tt2lht3x.fsf@mail.linkov.net> <87ldnvod7f.fsf@mail.linkov.net> <87tt2hzkvr.fsf@gmail.com> Date: Sun, 10 Aug 2025 21:35:35 +0300 Message-ID: <87ikiv58js.fsf@mail.linkov.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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 (-) > +(defvar tab-line-tabs-window-buffers-filter-function > + #'tab-line-tabs-window-buffers-filter-default > + "Filter which buffers should be displayed in the tab line.") Shouldn't this be defcustom? Then you can add a const 'identity' to allow keeping excluded buffers. > +(defvar tab-line-tabs-window-buffers-function > + #'tab-line-tabs-window-buffers-default > + "Function for get a list of window buffers. > +Used only for `tab-line-tabs-fixed-window-buffers'.") I wonder why do you need another indirection. It should be sufficient to use tab-line-tabs-window-buffers-filter-function in the current implementation of tab-line-tabs-window-buffers, especially with the value 'identity' to keep current behavior. > @@ -598,7 +626,10 @@ tab-line-tabs-fixed-window-buffers > (lambda (buf idx) (puthash buf idx index-table)) > old-buffers) > index-table)) > - (new-buffers (sort (tab-line-tabs-window-buffers) > + (buffers (funcall > + tab-line-tabs-window-buffers-filter-function > + (funcall tab-line-tabs-window-buffers-function))) > + (new-buffers (sort buffers Then the above change is not needed too. From unknown Mon Aug 18 11:28:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79159: [PATCH] Do not display in the tab line tabs that are excluded. Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Aug 2025 02:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 79159 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Juri Linkov Cc: 79159@debbugs.gnu.org, eg642616@gmail.com Received: via spool by 79159-submit@debbugs.gnu.org id=B79159.175487915723653 (code B ref 79159); Mon, 11 Aug 2025 02:26:01 +0000 Received: (at 79159) by debbugs.gnu.org; 11 Aug 2025 02:25:57 +0000 Received: from localhost ([127.0.0.1]:46447 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ulIEX-00069Q-60 for submit@debbugs.gnu.org; Sun, 10 Aug 2025 22:25:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51954) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ulIET-000693-37 for 79159@debbugs.gnu.org; Sun, 10 Aug 2025 22:25:54 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ulIEK-0003Oz-UU; Sun, 10 Aug 2025 22:25:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=pWJVYFf0Lij2ioQPdRl2M6ail3te18SEM6/vDVCf+4U=; b=ZmlgP8ZRAzN/ MUy9lJD/axxaRFUM/EE5aPw89DBa3U1D+gkHHN7zvMXrwGdxXp0mCQeZ7v0zOdUkOyVE6h31ODOSV Nz/Xd3t1ob59Xz94LYhEBNi27MaKBfImifY03zqyzoH2IsBUSJR+xL1nYcwvoBVHwsfJkA4oURZdG 0b7G+p6K+F2vT3AMb9+V9T53jzrVo0IrrdCWsbSCOW/hS8NHCiTauXCL5V2csvH1luBPMiV9gH0zJ 4swbvMBHcxKdEd6l9IYbDL/gkIovrVWgUBd2C5M8HTkKV9+GsgjGlW6d0gT7Fw8W/J+SfUKVUlNrr BdCPo1xhb6dZJZZRh3WHCw==; Date: Mon, 11 Aug 2025 05:25:23 +0300 Message-Id: <864iuek31o.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87ikiv58js.fsf@mail.linkov.net> (message from Juri Linkov on Sun, 10 Aug 2025 21:35:35 +0300) References: <871pptcx44.fsf@gmail.com> <86wm7loum2.fsf@gnu.org> <87y0ryqpah.fsf@mail.linkov.net> <86ldnyuhit.fsf@gnu.org> <87y0rxd695.fsf@mail.linkov.net> <86v7n1tvzo.fsf@gnu.org> <87tt2lht3x.fsf@mail.linkov.net> <87ldnvod7f.fsf@mail.linkov.net> <87tt2hzkvr.fsf@gmail.com> <87ikiv58js.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) 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 (---) > From: Juri Linkov > Cc: 79159@debbugs.gnu.org, Eli Zaretskii > Date: Sun, 10 Aug 2025 21:35:35 +0300 > > > +(defvar tab-line-tabs-window-buffers-filter-function > > + #'tab-line-tabs-window-buffers-filter-default > > + "Filter which buffers should be displayed in the tab line.") > > Shouldn't this be defcustom? Then you can add a const 'identity' > to allow keeping excluded buffers. Didn't you say that keeping them produces buggy behavior? If so, why would we tempt users to produce bugs? From unknown Mon Aug 18 11:28:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79159: [PATCH] Do not display in the tab line tabs that are excluded. Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Aug 2025 06:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 79159 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 79159@debbugs.gnu.org, eg642616@gmail.com Received: via spool by 79159-submit@debbugs.gnu.org id=B79159.175489268232656 (code B ref 79159); Mon, 11 Aug 2025 06:12:01 +0000 Received: (at 79159) by debbugs.gnu.org; 11 Aug 2025 06:11:22 +0000 Received: from localhost ([127.0.0.1]:46793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ulLkg-0008Ud-DB for submit@debbugs.gnu.org; Mon, 11 Aug 2025 02:11:22 -0400 Received: from mout-p-201.mailbox.org ([2001:67c:2050:0:465::201]:50068) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ulLkb-0008UJ-3m for 79159@debbugs.gnu.org; Mon, 11 Aug 2025 02:11:18 -0400 Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4c0klv59f3z9sTb; Mon, 11 Aug 2025 08:11:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; t=1754892667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ChjioPCD9ER+3yOZnSYaiRE2R8dDyh5G1x4ZSQXSYek=; b=z618ufwkJVMJRbSZrWdd7Ss0wHU/S6PR4P4lr9LwFN7Dk9G5g52WYOa4RkyK3OGnReWPYa 1Knx7JqA4qFQXHb56gIfFIIEAr2clxIQUm5/flZMJ6HZhRRmEMlFgFpVYa2fdVZXXrUevF cI/EmUtKlY9UXnIx/1UGYletVfZWSpjWO5Qq6XT+1pgtL792OERmtHBTUg+p5F91fyvAir VJv6PNYc4PKQqfhiIeYmKEJoA7qc3ufnxP8SldiFzhldC1y8mUsWGwThc5buD4WKAn1UzA ITyhDcJTs1Ta3r9A/XuS7E1fJaSVcd4QUoudk00KeG0RANZDm+vFJrZG8J+6Pg== From: Juri Linkov In-Reply-To: <864iuek31o.fsf@gnu.org> Organization: LINKOV.NET References: <871pptcx44.fsf@gmail.com> <86wm7loum2.fsf@gnu.org> <87y0ryqpah.fsf@mail.linkov.net> <86ldnyuhit.fsf@gnu.org> <87y0rxd695.fsf@mail.linkov.net> <86v7n1tvzo.fsf@gnu.org> <87tt2lht3x.fsf@mail.linkov.net> <87ldnvod7f.fsf@mail.linkov.net> <87tt2hzkvr.fsf@gmail.com> <87ikiv58js.fsf@mail.linkov.net> <864iuek31o.fsf@gnu.org> Date: Mon, 11 Aug 2025 09:08:00 +0300 Message-ID: <87y0rqv1a7.fsf@mail.linkov.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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 (-) >> > +(defvar tab-line-tabs-window-buffers-filter-function >> > + #'tab-line-tabs-window-buffers-filter-default >> > + "Filter which buffers should be displayed in the tab line.") >> >> Shouldn't this be defcustom? Then you can add a const 'identity' >> to allow keeping excluded buffers. > > Didn't you say that keeping them produces buggy behavior? If so, why > would we tempt users to produce bugs? It's not so simple. Currently tab-line is disabled on these conditions: (string-match-p "\\` " (buffer-name)) (memq major-mode tab-line-exclude-modes) (buffer-match-p tab-line-exclude-buffers (buffer-name)) (get major-mode 'tab-line-exclude) (buffer-local-value 'tab-line-exclude (current-buffer))) Buggy behavior is produced only on the first condition: when the buffer name begins with a space. So the default predicate should use exactly the same conditions in the filter to hide buffers on the tab-line. And also defcustom should provide another value to get back almost the same behavior as current, with one exception that buffers with names that begin with a space should be hidden too, i.e. the second value should match only one condition: (string-match-p "\\` " (buffer-name)) From unknown Mon Aug 18 11:28:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79159: [PATCH] Do not display in the tab line tabs that are excluded. Resent-From: Elijah Gabe =?UTF-8?Q?P=C3=A9rez?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Aug 2025 04:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 79159 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Juri Linkov Cc: 79159@debbugs.gnu.org, Eli Zaretskii Received: via spool by 79159-submit@debbugs.gnu.org id=B79159.17549729908973 (code B ref 79159); Tue, 12 Aug 2025 04:30:02 +0000 Received: (at 79159) by debbugs.gnu.org; 12 Aug 2025 04:29:50 +0000 Received: from localhost ([127.0.0.1]:51108 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ulgdx-0002Ke-GJ for submit@debbugs.gnu.org; Tue, 12 Aug 2025 00:29:50 -0400 Received: from mail-ot1-x341.google.com ([2607:f8b0:4864:20::341]:49455) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1ulgdt-0002KM-52 for 79159@debbugs.gnu.org; Tue, 12 Aug 2025 00:29:46 -0400 Received: by mail-ot1-x341.google.com with SMTP id 46e09a7af769-741c0d47aadso3542318a34.3 for <79159@debbugs.gnu.org>; Mon, 11 Aug 2025 21:29:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1754972979; x=1755577779; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=OeWjcADIPcqiS51pcZrVkc3YmKFFOuCnwQb/VZs6P2w=; b=nqstpTTUdfxhjR2HJWKtDevLuibInjvfxweb0TYmTFltNtpXyhAxBuK4HPUiwCcnuI w7aKKiQqGnDS2SQhjReadeTn8iQWoWZJScH0+Tehi3W92qlMxllHGUxIqeFoKcrmskGk TymXiR35KWGHUnbMleXWRx1Gm1X9afTlNEjpmgekuQgE7mwV5x/9FTdAI0bL/6Gpu9Q/ rlC/gZf6knKEWVQKiQo8+dZ7k0Eg3aVkBntZUFJrnkkOTmY+mHA8XC5DwrS9vIOk0xna fP6O3hypUFjDFCh3/1bsV6LWSp92/YokAALOBJ+fAH10heS/z7F0iMFXlCaTEGu/O2nN 3WPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754972979; x=1755577779; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=OeWjcADIPcqiS51pcZrVkc3YmKFFOuCnwQb/VZs6P2w=; b=aQ3Efbx/6yITAyY+AZBStkr9iTG/EAQGptVMMF4ZuMA/vTyZwsx6GApuE3H23NSTQr 1ucyY/VesDPScvVN+0/jqqNt7kVZ0oIWCJ4zY/NbkATxt1gi6rvxt1Vqvqx+HrJ1RR/a k6Jbmyk3hWrs7cRR3Nq+oz2FTYOc20DkPGFalBRD1w8WqSkVQaaKyBm4SPRkXMirkbhN 1cjOvSk7WkR9NLB2TtxLy5YY3H9D5tPdy267UEIeO+u5aYNQd5Xjn/LJxwmzQQBvo3Qv s99x1ngBumbxgS9C2f8eN1VMwwbDWZUazkNK4Quq0RYoCHewwG8M5DbUSGbwoFFeNbbq K/fw== X-Forwarded-Encrypted: i=1; AJvYcCWUM4HN2h+sGGtBUxdzuoRP7n1RrN8WM+CmTfnM0uAnoSCXxNB3CQUqs7SujXTQEW8BijfFIA==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yx4rwhgCTotctpnwArMXHDfePjxeY4fmk2tl7Pj8G4RjSNgmJ9L 84/5gzOYXfBe/31J94ZqYn32JC7gbW6NIDE/MihDb0OB/1XGmvfklVkYuyW6ydIN X-Gm-Gg: ASbGncvEF+SeYK4seiPkqx2mM5IKBPvErpHdWgkFHCdHLbQgTca3/sgWTPLvadpMdnE UPnKKRdMkWRFvl+2g1mADu7t42a7Q14byb4w4U73CERV/79eN0QAYFwztCBC2fSalsrerSgvoFt 1gklEDQwVdOt43TeEjfUGF6rS71OE890yM6ewOEzcoTrt4EeCuH/RhhxzFsDRZlsbqwtvbLFMAL rZuwyrM0bzKVxMlODgAcyu+DDrpcFn3ZSK3AzDNK97tAO4cpq9R1mdTDQLNnRU0GK24qbPWpRlD eGHCjU7ibYwxDvhC1FeXU0G0IDo8JmLIyVcnq9FLSe388wvSitZm+mhP3xZxDW3uTJN43nFzZaF WXPOBAbmLlkgCh4s= X-Google-Smtp-Source: AGHT+IFPfDT1EvVheVNQNaZiZjswv5Hgum9nWUBJDbbmV8OJO1kPRmw48EqMKPt3rXt1djiDw06ysw== X-Received: by 2002:a05:6830:61ce:b0:741:bf06:9d44 with SMTP id 46e09a7af769-7436682f33fmr1651605a34.1.1754972978661; Mon, 11 Aug 2025 21:29:38 -0700 (PDT) Received: from fedora ([189.215.161.127]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7436f97fc00sm36484a34.36.2025.08.11.21.29.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Aug 2025 21:29:37 -0700 (PDT) From: Elijah Gabe =?UTF-8?Q?P=C3=A9rez?= In-Reply-To: <87y0rqv1a7.fsf@mail.linkov.net> References: <871pptcx44.fsf@gmail.com> <86wm7loum2.fsf@gnu.org> <87y0ryqpah.fsf@mail.linkov.net> <86ldnyuhit.fsf@gnu.org> <87y0rxd695.fsf@mail.linkov.net> <86v7n1tvzo.fsf@gnu.org> <87tt2lht3x.fsf@mail.linkov.net> <87ldnvod7f.fsf@mail.linkov.net> <87tt2hzkvr.fsf@gmail.com> <87ikiv58js.fsf@mail.linkov.net> <864iuek31o.fsf@gnu.org> <87y0rqv1a7.fsf@mail.linkov.net> Date: Mon, 11 Aug 2025 22:29:36 -0600 Message-ID: <878qjpkvrj.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.3 (/) 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: -0.7 (/) --=-=-= Content-Type: text/plain Juri Linkov writes: >> +(defvar tab-line-tabs-window-buffers-function >> + #'tab-line-tabs-window-buffers-default >> + "Function for get a list of window buffers. >> +Used only for `tab-line-tabs-fixed-window-buffers'.") > > I wonder why do you need another indirection. It should be > sufficient to use tab-line-tabs-window-buffers-filter-function > in the current implementation of tab-line-tabs-window-buffers, > especially with the value 'identity' to keep current behavior. That was to add a simple way to customize the listed buffers in 'tab-line-tabs-fixed-window-buffers', not to be another filter. I've reverted it anyways: --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-tab-line-Allow-to-hide-excluded-buffers-in-the-tab-l.patch >From 80dce7accf3ae369fbc35daf4ad1ceda301ef6d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?El=C3=ADas=20Gabriel=20P=C3=A9rez?= Date: Fri, 1 Aug 2025 20:14:59 -0600 Subject: [PATCH] tab-line: Allow to hide excluded buffers in the tab line. (Bug#79159) * etc/NEWS: Announce changes. * lisp/tab-line.el (tab-line-tabs-window-buffers-filter-function): New user option. (tab-line-tabs-non-excluded): New function. (tab-line-tabs-window-buffers): Update. --- etc/NEWS | 5 +++++ lisp/tab-line.el | 31 ++++++++++++++++++++++++++++--- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index e12a9dcb127..329eb1203a6 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -436,6 +436,11 @@ a buffer. The value must be a condition which is passed to With this user option, if non-nil (the default), the tab close button will change its appearance if the tab buffer has been modified. +--- +*** New user option 'tab-line-tabs-window-buffers-filter-function'. +This user option controls which buffers should appear in the tab line. +By default, this is set to not filter the buffers. + ** Project --- diff --git a/lisp/tab-line.el b/lisp/tab-line.el index 51675dbbb29..4b6f71f7a1f 100644 --- a/lisp/tab-line.el +++ b/lisp/tab-line.el @@ -565,6 +565,29 @@ tab-line-tabs-buffer-groups sorted-buffers))) (cons group-tab tabs)))) +(defcustom tab-line-tabs-window-buffers-filter-function + #'identity + "Filter which buffers should be displayed in the tab line." + :type '(choice function + (const :tag "No filter the buffers" identity) + (const :tag "Show non-excluded buffers only" tab-line-tabs-non-excluded)) + :group 'tab-line) + +(defvar tab-line-exclude-buffers) +(defvar tab-line-exclude-modes) + +(defun tab-line-tabs-non-excluded (buffers) + "Filter BUFFERS and return non-excluded buffers list. +Intended to be used in `tab-line-tabs-window-buffers-filter-function'." + (seq-remove + (lambda (b) + (or (memq (buffer-local-value 'major-mode b) + tab-line-exclude-modes) + (buffer-match-p tab-line-exclude-buffers b) + (get (buffer-local-value 'major-mode b) 'tab-line-exclude) + (buffer-local-value 'tab-line-exclude b))) + buffers)) + (defun tab-line-tabs-window-buffers () "Return a list of tabs that should be displayed in the tab line. By default returns a list of window buffers, i.e. buffers previously @@ -581,9 +604,11 @@ tab-line-tabs-window-buffers (prev-buffers (seq-filter #'buffer-live-p prev-buffers)) ;; Remove next-buffers from prev-buffers (prev-buffers (seq-difference prev-buffers next-buffers))) - (append (reverse prev-buffers) - (list buffer) - next-buffers))) + (funcall + tab-line-tabs-window-buffers-filter-function + (append (reverse prev-buffers) + (list buffer) + next-buffers)))) (defun tab-line-tabs-fixed-window-buffers () "Like `tab-line-tabs-window-buffers' but keep stable sorting order. -- 2.50.1 --=-=-= Content-Type: text/plain >>> > +(defvar tab-line-tabs-window-buffers-filter-function >>> > + #'tab-line-tabs-window-buffers-filter-default >>> > + "Filter which buffers should be displayed in the tab line.") >>> >>> Shouldn't this be defcustom? Then you can add a const 'identity' >>> to allow keeping excluded buffers. >> >> Didn't you say that keeping them produces buggy behavior? If so, why >> would we tempt users to produce bugs? > > It's not so simple. Currently tab-line is disabled on these conditions: > > (string-match-p "\\` " (buffer-name)) > (memq major-mode tab-line-exclude-modes) > (buffer-match-p tab-line-exclude-buffers (buffer-name)) > (get major-mode 'tab-line-exclude) > (buffer-local-value 'tab-line-exclude (current-buffer))) > > Buggy behavior is produced only on the first condition: > when the buffer name begins with a space. > > So the default predicate should use exactly the same conditions > in the filter to hide buffers on the tab-line. > > And also defcustom should provide another value to get back > almost the same behavior as current, with one exception that > buffers with names that begin with a space should be hidden too, > i.e. the second value should match only one condition: > > (string-match-p "\\` " (buffer-name)) >From what I have tested, buffers that start with a space are unlikely to appear on the tab line by default, so i don't think a new value is necessary. -- - E.G via Gnus and Org. --=-=-=-- From unknown Mon Aug 18 11:28:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79159: [PATCH] Do not display in the tab line tabs that are excluded. Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Aug 2025 17:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 79159 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Elijah Gabe =?UTF-8?Q?P=C3=A9rez?= Cc: 79159@debbugs.gnu.org, Eli Zaretskii Received: via spool by 79159-submit@debbugs.gnu.org id=B79159.175501998118798 (code B ref 79159); Tue, 12 Aug 2025 17:33:02 +0000 Received: (at 79159) by debbugs.gnu.org; 12 Aug 2025 17:33:01 +0000 Received: from localhost ([127.0.0.1]:54647 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ulsrs-0004t7-FZ for submit@debbugs.gnu.org; Tue, 12 Aug 2025 13:33:00 -0400 Received: from mout-p-101.mailbox.org ([80.241.56.151]:35260) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ulsrf-0004sX-RB; Tue, 12 Aug 2025 13:32:54 -0400 Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4c1dqq4HRXz9st4; Tue, 12 Aug 2025 19:32:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; t=1755019959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=EDXasNUgOgbn+asIaTN+KW6V3icx+pKpxTMbyDC3Ewo=; b=irTngYYZdNkAsosXtbw0oBsIikewuVBRt33/Qa0fhPrqxBqJvat8g+4fLgsrmUn1jAVV9U 1vBktvetkhokYawWGuwzv8/ckkSe4tJAyz3LeDlwRdnSRDIA67G6mecMCiy9SvFes7OOX6 HHbbaPlR41lYFLiothI+oJzdPU5Voupd0xk9s3Gv1UoQ04JZy9zNAbWFv4wRrE2iHmCZV8 yCMJ0yymbEzhkIVD13AbaYZY6Ilbmm8IvsoSIt15CW06BwFcXEieO/vQ/7t+BdDfh7RRh4 xbhPI0RimaLZIjRABb+aDQ8AVpNM/OSdmOE/kPCaGIT8TtX7IafK9MRGq/UDig== From: Juri Linkov In-Reply-To: <878qjpkvrj.fsf@gmail.com> Organization: LINKOV.NET References: <871pptcx44.fsf@gmail.com> <86wm7loum2.fsf@gnu.org> <87y0ryqpah.fsf@mail.linkov.net> <86ldnyuhit.fsf@gnu.org> <87y0rxd695.fsf@mail.linkov.net> <86v7n1tvzo.fsf@gnu.org> <87tt2lht3x.fsf@mail.linkov.net> <87ldnvod7f.fsf@mail.linkov.net> <87tt2hzkvr.fsf@gmail.com> <87ikiv58js.fsf@mail.linkov.net> <864iuek31o.fsf@gnu.org> <87y0rqv1a7.fsf@mail.linkov.net> <878qjpkvrj.fsf@gmail.com> Date: Tue, 12 Aug 2025 20:31:12 +0300 Message-ID: <87v7msh2fz.fsf@mail.linkov.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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 (-) close 79159 31.0.50 thanks > That was to add a simple way to customize the listed buffers in > 'tab-line-tabs-fixed-window-buffers', not to be another filter. I've > reverted it anyways: Thanks, now pushed (after adding a defcustom version tag).