alphapapa / alphapapa/activities.el

Need to display tabs correctly with tab-bar-format-tabs-groups under tab-bar-mode

Đang mở
#107 7 bình luận 0 reaction 1 người được giao Được @alphapapa nhận Xem trên GitHub
bug compatibility
Ngôn ngữ chính
Emacs Lisp
Star
319
Fork
19
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

```activities``` needs to respect ```tab-bar-mode```'s ```tab-bar-tab-group-face-function``` override in the same way it currently respects ```tab-bar-tab-face-function```. The lack of support means that the ```activities-tab``` face is never applied.

A PR coming shortly with the tested fix for this.

Configuration snippet for testing:
```elisp
(setq tab-bar-format
'(
tab-bar-format-tabs-groups ;; this shows groups
;; tab-bar-format-tabs ;; switch to this for plain tabs
tab-bar-separator
activate
tab-bar-format-align-right
tab-bar-format-global
))
```
With groups enabled, you'll have to assign a group to one tab to get the group to appear and for the broken formatting path to be invoked.

You can invoke this to ensure there's at least one group for testing ```(tab-bar-change-tab-group "*default*")```

or call ```M-x tab-group``` to assign a name interactively.

P.S. While reading through the ```tab-bar-mode``` code, it appears there is a bug that, if fixed, might render the PR correction unneeded. Perhaps in Emacs 30 if this is truly a bug and gets reported.
```elisp
(defun tab-bar-tab-group-face-default (tab)
(if (not (or (eq (car tab) 'current-tab)
(funcall tab-bar-tab-group-function tab)))
'tab-bar-tab-ungrouped
(tab-bar-tab-face-default tab)))
```
At the end of the function, ```tab-bar-tab-face-default``` is called and not ```tab-bar-tab-face-function``` so the override is never applied when groups are being formatted. Since the override would have been set to ```activities-tabs--tab-bar-tab-face-function``` the custom face is never applied. Also, to get around this, one can't mix both the tab format and the group format or the tabs get repeated.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.