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


Message #17 received at 79159 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Elijah Gabe Pérez <eg642616 <at> gmail.com>
Cc: 79159 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#79159: [PATCH] Do not display in the tab line tabs that are
 excluded.
Date: Tue, 05 Aug 2025 09:31:34 +0300
> +         (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.




This bug report was last modified 5 days ago.

Previous Next


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