GNU bug report logs - #38523
27.0.50; tab-line faces don't update to reflect selected tab

Previous Next

Package: emacs;

Reported by: "David O'Toole" <deeteeoh1138 <at> gmail.com>

Date: Sun, 8 Dec 2019 06:20:02 UTC

Severity: normal

Tags: fixed

Fixed in version 28.0.50

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 38523 in the body.
You can then email your comments to 38523 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#38523; Package emacs. (Sun, 08 Dec 2019 06:20:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "David O'Toole" <deeteeoh1138 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 08 Dec 2019 06:20:02 GMT) Full text and rfc822 format available.

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

From: "David O'Toole" <deeteeoh1138 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: 27.0.50; tab-line faces don't update to reflect selected tab
Date: Sat, 7 Dec 2019 12:54:02 -0500
[Message part 1 (text/plain, inline)]
The following change seems to make the tab faces update properly after
clicking a tab. But I'm not sure this is the correct way to do it.


> diff --git a/lisp/tab-line.el b/lisp/tab-line.el
> index d080da1867..08fb54bbfb 100644
> --- a/lisp/tab-line.el
> +++ b/lisp/tab-line.el
> @@ -580,12 +580,17 @@ tab-line-select-tab
>           (tab (get-pos-property 1 'tab (car (posn-string posnp))))
>           (buffer (if (bufferp tab) tab (cdr (assq 'buffer tab)))))
>      (if buffer
> -        (tab-line-select-tab-buffer buffer (posn-window posnp))
> +        (progn
> +          (tab-line-select-tab-buffer buffer (posn-window posnp))
> +          (force-mode-line-update t)
> +          (set-window-parameter nil 'tab-line-cache nil)
> +          (setf tab-line-format '(:eval (tab-line-format)))
> +          )
>        (let ((select (cdr (assq 'select tab))))
>          (when (functionp select)
>            (with-selected-window (posn-window posnp)
>              (funcall select)
> -            (force-mode-line-update)))))))
> +            (force-mode-line-update t)))))))
>
>  (defun tab-line-select-tab-buffer (buffer &optional window)
>    (let* ((window-buffer (window-buffer window))
>

On Sat, Dec 7, 2019 at 11:48 AM David O'Toole <deeteeoh1138 <at> gmail.com>
wrote:

> I configured the tab bar and tab line faces (tab-bar-tab and
> tab-line-tab-current) to show the currently selected tab with yellow text.
>
> Although the tab __bar__ faces do update properly to highlight the
> selected tab, the tab __line__ faces don't update; no matter which is
> clicked, the first tab that had been highlighted stays highlighted (or
> sometimes none of them are highlighted.) Also, the close buttons on tab
> line tabs do not work; instead it just switches to that tab's buffer.
>
> My face definitions (in the form of lines from a `custom-set-faces'
> call) are below, perhaps I have made them incorrectly.
>
>  '(tab-bar ((t (:height 0.9 :background "grey25" :foreground "gray70"))))
>  '(tab-bar-tab ((t (:inherit tab-bar :foreground "yellow" :box
> (:line-width 1 :style released-button)))))
>  '(tab-bar-tab-inactive ((t (:inherit tab-bar-tab :background "grey28"
> :foreground "gray80"))))
>  '(tab-line ((t (:background "gray16" :foreground "gray80" :height 0.9))))
>  '(tab-line-tab ((t (:inherit tab-line :box (:line-width 1 :style
> released-button)))))
>  '(tab-line-highlight ((t (:inherit tab-line-tab :background "gray40"))))
>  '(tab-line-tab-current ((t (:inherit tab-line-tab :background "gray35"
> :foreground "yellow"))))
>  '(tab-line-tab-inactive ((t (:inherit tab-line-tab :foreground "gray80"
> :background "grey20"))))
>
>
> In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
>  of 2019-12-07 built on monad
> Repository revision: 959bbf30032c365c9e6f08dc9211d6bab3123f35
> Repository branch: HEAD
> Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
> System Description: Linux Mint 19.1
>
> Recent messages:
> Commands: m, u, t, RET, g, k, S, D, Q; q to quit; h for help
> Global Tab-Line mode enabled
> Winner undo (1 / 69)
> Winner undo (1 / 71)
> Desktop saved in ~/.emacs.d/
> Quit [2 times]
> Desktop saved in ~/.emacs.d/
>
> Configured using:
>  'configure --prefix=/usr/local --with-x-toolkit=gtk3 --with-xwidgets
>  --with-sound=alsa'
>
> Configured features:
> XPM JPEG TIFF GIF PNG RSVG SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY
> GNUTLS LIBXML2 FREETYPE HARFBUZZ XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11
> XDBE XIM MODULES THREADS XWIDGETS PDUMPER LCMS2 GMP
>
> Important settings:
>   value of $LANG: en_US.UTF-8
>   locale-coding-system: utf-8-unix
>
> Major mode: Emacs-Lisp
>
> Minor modes in effect:
>   global-tab-line-mode: t
>   tab-line-mode: t
>   display-battery-mode: t
>   indent-guide-mode: t
>   desktop-save-mode: t
>   recentf-mode: t
>   winner-mode: t
>   display-time-mode: t
>   global-magit-file-mode: t
>   magit-file-mode: t
>   magit-auto-revert-mode: t
>   auto-revert-mode: t
>   global-git-commit-mode: t
>   async-bytecomp-package-mode: t
>   shell-dirtrack-mode: t
>   show-paren-mode: t
>   override-global-mode: t
>   global-eldoc-mode: t
>   eldoc-mode: t
>   electric-indent-mode: t
>   mouse-wheel-mode: t
>   tool-bar-mode: t
>   tab-bar-mode: t
>   menu-bar-mode: t
>   file-name-shadow-mode: t
>   global-font-lock-mode: t
>   font-lock-mode: t
>   blink-cursor-mode: t
>   auto-composition-mode: t
>   auto-encryption-mode: t
>   auto-compression-mode: t
>   line-number-mode: t
>   transient-mark-mode: t
>
> Load-path shadows:
> ~/emacs-config/gunmetal-theme hides ~/mosaic/gunmetal-theme
> ~/emacs-config/inf-snd hides ~/mosaic/inf-snd
>
> Features:
> (shadow sort mail-extr emacsbug sendmail eieio-opt help-fns radix-tree
> cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine
> cc-vars cc-defs misearch multi-isearch em-unix em-term term ehelp
> em-script em-prompt em-ls em-hist em-pred em-glob em-dirs esh-var
> em-cmpl em-basic em-banner em-alias esh-mode eshell esh-cmd esh-ext
> esh-opt esh-proc esh-io esh-arg esh-module esh-groups esh-util
> time-stamp cus-edit tab-line ibuf-ext ibuffer ibuffer-loaddefs mule-util
> org-element avl-tree ol-eww ol-rmail ol-mhe ol-irc ol-info ol-gnus nnir
> gnus-sum url url-proxy url-privacy url-expand url-methods url-history
> mailcap shr url-cookie url-domsuf url-util svg dom gnus-group gnus-undo
> gnus-start gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo
> parse-time iso8601 gnus-spec gnus-int gnus-range gnus-win gnus nnheader
> ol-docview doc-view jka-compr image-mode exif ol-bibtex bibtex ol-bbdb
> ol-w3m vc-git battery cus-start cus-load exwm-systemtray xcb-systemtray
> xcb-xembed exwm-config ido exwm exwm-input xcb-keysyms xcb-xkb
> exwm-manage exwm-floating xcb-cursor xcb-render exwm-layout
> exwm-workspace exwm-core xcb-ewmh xcb-icccm xcb xcb-xproto xcb-types
> xcb-debug gunmetal-theme indent-guide ob-lisp desktop frameset
> sr-speedbar init org-mouse org ob ob-tangle ob-ref ob-lob ob-table
> ob-exp org-macro org-footnote org-src ob-comint org-pcomplete org-list
> org-faces org-entities org-version ob-emacs-lisp ob-core ob-eval
> org-table ol org-keys org-compat org-macs org-loaddefs find-func
> cal-menu calendar cal-loaddefs recentf tree-widget dired-x winner time
> slime-asdf grep slime-fancy slime-trace-dialog slime-fontifying-fu
> slime-package-fu slime-references slime-compiler-notes-tree
> slime-scratch slime-presentations bridge slime-macrostep macrostep
> slime-mdot-fu slime-enclosing-context slime-fuzzy slime-fancy-trace
> slime-fancy-inspector slime-c-p-c slime-editing-commands slime-autodoc
> slime-repl elp slime-parse slime lisp-mnt gud apropos etags fileloop
> generator xref project arc-mode archive-mode noutline outline pp
> hyperspec thingatpt slime-autoloads org-install magit-submodule
> magit-obsolete magit-blame magit-stash magit-reflog magit-bisect
> magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit
> magit-sequence magit-notes magit-worktree magit-tag magit-merge
> magit-branch magit-reset magit-files magit-refs magit-status magit
> magit-repos magit-apply magit-wip magit-log which-func imenu magit-diff
> smerge-mode diff diff-mode magit-core magit-autorevert autorevert
> filenotify magit-margin magit-transient magit-process magit-mode
> transient git-commit magit-git magit-section magit-utils crm log-edit
> message rmc puny dired dired-loaddefs format-spec rfc822 mml mml-sec epa
> epg epg-config gnus-util rmail rmail-loaddefs text-property-search
> time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047
> rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils
> mailheader pcvs-util add-log with-editor async-bytecomp async shell
> server xelf paren use-package use-package-ensure use-package-delight
> use-package-diminish use-package-bind-key bind-key easy-mmode
> use-package-core mosaic jeison dash eieio-compat midi-kbd ccl jack rot13
> disp-table ecasound pcomplete notifications dbus xml spectr rx cell
> cl-extra help-mode eieio-speedbar speedbar sb-image ezimage dframe
> eieio-custom wid-edit eieio-base warnings cl compile nanotag edmacro
> kmacro inf-snd derived ruby-mode smie cmuscheme scheme comint ansi-color
> ring finder-inf pcase powerline advice powerline-separators color
> powerline-themes info package easymenu browse-url url-handlers url-parse
> auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
> password-cache json subr-x map url-vars seq byte-opt gv bytecomp
> byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric uniquify
> ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
> term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
> tabulated-list replace newcomment text-mode elisp-mode lisp-mode
> prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
> select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
> term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
> misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
> cp51932 hebrew greek romanian slovak czech european ethiopic indian
> cyrillic chinese composite charscript charprop case-table epa-hook
> jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs
> button faces cus-face macroexp files text-properties overlay sha1 md5
> base64 format env code-pages mule custom widget hashtable-print-readable
> backquote threads dbusbind inotify lcms2 dynamic-setting
> system-font-setting font-render-setting xwidget-internal move-toolbar
> gtk x-toolkit x multi-tty make-network-process emacs)
>
> Memory information:
> ((conses 16 1110822 155044)
>  (symbols 48 50782 1)
>  (strings 32 158855 6437)
>  (string-bytes 1 5124663)
>  (vectors 16 97223)
>  (vector-slots 8 2332726 255286)
>  (floats 8 32609 140)
>  (intervals 56 148481 1713)
>  (buffers 1000 34))
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38523; Package emacs. (Fri, 30 Oct 2020 15:42:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "David O'Toole" <deeteeoh1138 <at> gmail.com>
Cc: 38523 <at> debbugs.gnu.org, juri <at> linkov.net
Subject: Re: bug#38523: 27.0.50; tab-line faces don't update to reflect
 selected tab
Date: Fri, 30 Oct 2020 16:41:23 +0100
"David O'Toole" <deeteeoh1138 <at> gmail.com> writes:

> The following change seems to make the tab faces update properly after clicking a
> tab. But I'm not sure this is the correct way to do it.

[...]

>  +        (progn
>  +          (tab-line-select-tab-buffer buffer (posn-window posnp))
>  +          (force-mode-line-update t)
>  +          (set-window-parameter nil 'tab-line-cache nil)
>  +          (setf tab-line-format '(:eval (tab-line-format)))

No, I have a feeling that may be too heavy-handed.

>  I configured the tab bar and tab line faces (tab-bar-tab and
>  tab-line-tab-current) to show the currently selected tab with yellow text.
>
>  Although the tab __bar__ faces do update properly to highlight the
>  selected tab, the tab __line__ faces don't update; no matter which is
>  clicked, the first tab that had been highlighted stays highlighted
>  (or sometimes none of them are highlighted.) Also, the close buttons
>  on tab line tabs do not work; instead it just switches to that tab's
>  buffer.

Perhaps Juri has some insight here (added to the Cc).

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38523; Package emacs. (Wed, 23 Dec 2020 21:12:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: David O'Toole <deeteeoh1138 <at> gmail.com>, 38523 <at> debbugs.gnu.org
Subject: Re: bug#38523: 27.0.50; tab-line faces don't update to reflect
 selected tab
Date: Wed, 23 Dec 2020 23:08:30 +0200
>> The following change seems to make the tab faces update properly after clicking a
>> tab. But I'm not sure this is the correct way to do it.
>
> [...]
>
>>  +        (progn
>>  +          (tab-line-select-tab-buffer buffer (posn-window posnp))
>>  +          (force-mode-line-update t)
>>  +          (set-window-parameter nil 'tab-line-cache nil)
>>  +          (setf tab-line-format '(:eval (tab-line-format)))
>
> No, I have a feeling that may be too heavy-handed.
>
>>  I configured the tab bar and tab line faces (tab-bar-tab and
>>  tab-line-tab-current) to show the currently selected tab with yellow text.
>>
>>  Although the tab __bar__ faces do update properly to highlight the
>>  selected tab, the tab __line__ faces don't update; no matter which is
>>  clicked, the first tab that had been highlighted stays highlighted
>>  (or sometimes none of them are highlighted.) Also, the close buttons
>>  on tab line tabs do not work; instead it just switches to that tab's
>>  buffer.
>
> Perhaps Juri has some insight here (added to the Cc).

Sorry for the delay.  Now I pushed to master a patch from emacs-devel
that improves tab-line face calculation logic.

David, could you please confirm if everything works correctly now.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38523; Package emacs. (Wed, 06 Jan 2021 18:11:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: David O'Toole <deeteeoh1138 <at> gmail.com>, 38523 <at> debbugs.gnu.org
Subject: Re: bug#38523: 27.0.50; tab-line faces don't update to reflect
 selected tab
Date: Wed, 06 Jan 2021 19:50:05 +0200
tags 38523 fixed
close 38523 28.0.50
thanks

It seems everything is fixed in this bug report.
If not, then please reopen it.




Added tag(s) fixed. Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Wed, 06 Jan 2021 18:11:04 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.0.50, send any further explanations to 38523 <at> debbugs.gnu.org and "David O'Toole" <deeteeoh1138 <at> gmail.com> Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Wed, 06 Jan 2021 18:11:04 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 04 Feb 2021 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 75 days ago.

Previous Next


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