GNU bug report logs - #79159
[PATCH] Do not display in the tab line tabs that are excluded.

Previous Next

Package: emacs;

Reported by: Elijah Gabe Pérez <eg642616 <at> gmail.com>

Date: Sat, 2 Aug 2025 20:02:02 UTC

Severity: normal

Tags: patch

Fixed in version 31.0.50

Done: Juri Linkov <juri <at> linkov.net>

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: "Elijah G." <eg642616 <at> gmail.com>
Cc: 79159 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: bug#79159: [PATCH] Do not display in the tab line tabs that are excluded.
Date: Thu, 07 Aug 2025 09:20:00 +0300
>> 1. C-x b SPC *bar* RET
>> 2. C-x b foo RET
>> 3. C-x <left>
>>
>> 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 <left>' 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 <left>|<right>".

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 <left>|<right>"?

>> 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.




This bug report was last modified 4 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.