bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#47118: 28.0.50; [PATCH] lisp/tab-line.el: Add face for group-tab


From: Gabriel
Subject: bug#47118: 28.0.50; [PATCH] lisp/tab-line.el: Add face for group-tab
Date: Fri, 12 Mar 2021 23:35:40 -0300

The problem:
When tab-line mode is enabled and configured to group buffers, a group
tab is added as the first tab. This is not a regular tab that displays a
buffer, but rather a tab to indicate the group. The face used for this
group-tab is the same of an inactive tab, which makes harder to
differentiate betweem a group tab and a regular tab that can be selected
to display a buffer.

How to reproduce:
1. emacs -Q
2. Configure tab groups by project:
(setq-default tab-line-tabs-buffer-group-function
              (lambda (b) (with-current-buffer b (vc-root-dir)))
              tab-line-tabs-function 'tab-line-tabs-buffer-groups)
3. Enable tab-line mode:
(global-tab-line-mode 1)
4. Open file from a project handled by some vc backend (e.g.: git)
5. The tab group will be displayed as the first tab with a common face

PNG image

The proposed solution:
Add a new face for group tabs that can be configured via
'tab-line-tab-face-functions', similar to how
'tab-line-tab-face-special' works.

How to test:
1. emacs -Q
2. Apply the patch
3. Configure tab groups by project and group face:
(setq-default tab-line-tabs-buffer-group-function
          (lambda (b) (with-current-buffer b (vc-root-dir)))
          tab-line-tabs-function 'tab-line-tabs-buffer-groups
          tab-line-tab-face-functions '(tab-line-tab-face-group))
4. Enable tab-line-mode:
(global-tab-line-mode 1)
5. Open file from a project handled by some vc backend (e.g.: git)
6. The tab group will be displayed with a different face

Attachment: 0001-lisp-tab-line.el-Add-face-for-group-tab.patch
Description: Text Data

PNG image

I am not sure what is the appropriate default value for the proposed new
face. Feel free to modify it, if necessary.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]