GNU bug report logs -
#59208
29.0.50; tab-bar-auto-width plus display space cpu spin
Previous Next
Reported by: Aaron Jensen <aaronjensen <at> gmail.com>
Date: Sat, 12 Nov 2022 07:33:01 UTC
Severity: normal
Fixed in version 29.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 59208 in the body.
You can then email your comments to 59208 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59208
; Package
emacs
.
(Sat, 12 Nov 2022 07:33:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Aaron Jensen <aaronjensen <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 12 Nov 2022 07:33:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
My tab-bar-tab-name-format-function causes 100% cpu spin as of
ca3763af5c. Disabling tab-bar-auto-width fixes it.
To repro: emacs -Q -l repro.el
repro.el:
(defun aj/tab-bar-tab-name-format (tab i)
(propertize
(propertize " " 'display '(space :width (8)))
'face (funcall tab-bar-tab-face-function tab)))
(setq tab-bar-tab-name-format-function #'aj/tab-bar-tab-name-format)
(tab-bar-mode)
In GNU Emacs 29.0.50 (build 1, aarch64-apple-darwin21.6.0, NS
appkit-2113.60 Version 12.6 (Build 21G115)) of 2022-09-28 built on
aaron-m1.local
Windowing system distributor 'Apple', version 10.3.2113
System Description: macOS 12.6.1
Configured using:
'configure --disable-dependency-tracking --disable-silent-rules
--enable-locallisppath=/opt/homebrew/share/emacs/site-lisp
--infodir=/opt/homebrew/Cellar/emacs-plus <at> 29/29.0.50/share/info/emacs
--prefix=/opt/homebrew/Cellar/emacs-plus <at> 29/29.0.50 --with-xml2
--with-gnutls --with-native-compilation --without-compress-install
--without-dbus --without-imagemagick --with-modules --with-rsvg
--with-ns --disable-ns-self-contained 'CFLAGS=-Os -w -pipe
-mmacosx-version-min=12
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk
-DFD_SETSIZE=10000 -DDARWIN_UNLIMITED_SELECT'
'CPPFLAGS=-I/opt/homebrew/opt/zlib/include
-I/opt/homebrew/opt/jpeg/include -I/opt/homebrew/opt/icu4c/include
-I/opt/homebrew/opt/openssl <at> 1.1/include
-I/opt/homebrew/opt/readline/include -isystem/opt/homebrew/include
-F/opt/homebrew/Frameworks
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk'
'LDFLAGS=-L/opt/homebrew/opt/zlib/lib -L/opt/homebrew/opt/jpeg/lib
-L/opt/homebrew/opt/icu4c/lib -L/opt/homebrew/opt/openssl <at> 1.1/lib
-L/opt/homebrew/opt/readline/lib -L/opt/homebrew/lib
-F/opt/homebrew/Frameworks -Wl,-headerpad_max_install_names
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk''
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59208
; Package
emacs
.
(Sat, 12 Nov 2022 18:45:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 59208 <at> debbugs.gnu.org (full text, mbox):
> My tab-bar-tab-name-format-function causes 100% cpu spin as of
> ca3763af5c. Disabling tab-bar-auto-width fixes it.
>
> To repro: emacs -Q -l repro.el
>
> repro.el:
>
> (defun aj/tab-bar-tab-name-format (tab i)
> (propertize
> (propertize " " 'display '(space :width (8)))
> 'face (funcall tab-bar-tab-face-function tab)))
>
> (setq tab-bar-tab-name-format-function #'aj/tab-bar-tab-name-format)
>
> (tab-bar-mode)
Thanks for the bug report. Since with
(propertize " " 'display '(space :width (8)))
the tab width can't grow more than 8 pixels,
a possible fix would be on every iteration
that adds more spaces to the tab name
to check if the tab width remains the same.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59208
; Package
emacs
.
(Sat, 12 Nov 2022 19:40:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 59208 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Apologies for top posting, on my phone. I should note that my actual tab
function has text as well (the tab name) and then I add a space at the end.
The spaces are just visual padding.
Aaron
On Sat, Nov 12 2022 at 1:33 PM, Juri Linkov <juri <at> linkov.net> wrote:
> My tab-bar-tab-name-format-function causes 100% cpu spin as of ca3763af5c.
> Disabling tab-bar-auto-width fixes it.
>
> >
>
> To repro: emacs -Q -l repro.el
>
> >
>
> repro.el:
>
> >
>
> (defun aj/tab-bar-tab-name-format (tab i)
> (propertize
> (propertize " " 'display '(space :width (8)))
> 'face (funcall tab-bar-tab-face-function tab)))
>
> >
>
> (setq tab-bar-tab-name-format-function #'aj/tab-bar-tab-name-format)
>
> >
>
> (tab-bar-mode)
>
> Thanks for the bug report. Since with
> (propertize " " 'display '(space :width (8))) the tab width can't grow
> more than 8 pixels,
> a possible fix would be on every iteration
> that adds more spaces to the tab name
> to check if the tab width remains the same.
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59208
; Package
emacs
.
(Sun, 13 Nov 2022 18:19:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 59208 <at> debbugs.gnu.org (full text, mbox):
close 59208 29.0.50
thanks
> I should note that my actual tab function has text as well (the tab
> name) and then I add a space at the end. The spaces are just visual
> padding.
I didn't try with text, I tried only with spaces as in your test case:
> (defun aj/tab-bar-tab-name-format (tab i)
> (propertize
> (propertize " " 'display '(space :width (8)))
> 'face (funcall tab-bar-tab-face-function tab)))
But I believe that all cases should be fixed now
by the commit 443bd35e86.
bug marked as fixed in version 29.0.50, send any further explanations to
59208 <at> debbugs.gnu.org and Aaron Jensen <aaronjensen <at> gmail.com>
Request was from
Juri Linkov <juri <at> linkov.net>
to
control <at> debbugs.gnu.org
.
(Sun, 13 Nov 2022 18:19:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59208
; Package
emacs
.
(Sun, 13 Nov 2022 19:18:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 59208 <at> debbugs.gnu.org (full text, mbox):
On Sun, Nov 13, 2022 at 1:18 PM Juri Linkov <juri <at> linkov.net> wrote:
>
> close 59208 29.0.50
> thanks
>
> > I should note that my actual tab function has text as well (the tab
> > name) and then I add a space at the end. The spaces are just visual
> > padding.
>
> I didn't try with text, I tried only with spaces as in your test case:
>
> > (defun aj/tab-bar-tab-name-format (tab i)
> > (propertize
> > (propertize " " 'display '(space :width (8)))
> > 'face (funcall tab-bar-tab-face-function tab)))
>
> But I believe that all cases should be fixed now
> by the commit 443bd35e86.
Thanks, confirmed.
As an aside, auto-width doesn't work very well when using a
variable-pitch font for your tab bar. Specifically, for me it doesn't
take up the full width when I have enough tabs that would fill that
width.
Aaron
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59208
; Package
emacs
.
(Mon, 14 Nov 2022 07:55:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 59208 <at> debbugs.gnu.org (full text, mbox):
>> But I believe that all cases should be fixed now
>> by the commit 443bd35e86.
>
> Thanks, confirmed.
>
> As an aside, auto-width doesn't work very well when using a
> variable-pitch font for your tab bar. Specifically, for me it doesn't
> take up the full width when I have enough tabs that would fill that
> width.
Sorry, I don't understand the problem. It doesn't take up the full width
of the tab bar? Does it fill the whole tab bar when you customize
tab-bar-auto-width-max to nil?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59208
; Package
emacs
.
(Mon, 14 Nov 2022 14:51:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 59208 <at> debbugs.gnu.org (full text, mbox):
On Mon, Nov 14, 2022 at 2:54 AM Juri Linkov <juri <at> linkov.net> wrote:
>
> >> But I believe that all cases should be fixed now
> >> by the commit 443bd35e86.
> >
> > Thanks, confirmed.
> >
> > As an aside, auto-width doesn't work very well when using a
> > variable-pitch font for your tab bar. Specifically, for me it doesn't
> > take up the full width when I have enough tabs that would fill that
> > width.
>
> Sorry, I don't understand the problem. It doesn't take up the full width
> of the tab bar? Does it fill the whole tab bar when you customize
> tab-bar-auto-width-max to nil?
No, it does not. It's not computing the overall width of the window
correctly or something like that: https://share.cleanshot.com/otuZj4
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59208
; Package
emacs
.
(Mon, 14 Nov 2022 17:39:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 59208 <at> debbugs.gnu.org (full text, mbox):
>> > As an aside, auto-width doesn't work very well when using a
>> > variable-pitch font for your tab bar. Specifically, for me it doesn't
>> > take up the full width when I have enough tabs that would fill that
>> > width.
>>
>> Sorry, I don't understand the problem. It doesn't take up the full width
>> of the tab bar? Does it fill the whole tab bar when you customize
>> tab-bar-auto-width-max to nil?
>
> No, it does not. It's not computing the overall width of the window
> correctly or something like that: https://share.cleanshot.com/otuZj4
Could you show the minimal tab function that reproduces the problem.
Is it more like this?
(defun aj/tab-bar-tab-name-format (tab i)
(propertize
(concat (alist-get 'name tab)
(propertize " " 'display '(space :width (8))))
'face (funcall tab-bar-tab-face-function tab)))
(setq tab-bar-tab-name-format-function #'aj/tab-bar-tab-name-format)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59208
; Package
emacs
.
(Mon, 14 Nov 2022 18:12:01 GMT)
Full text and
rfc822 format available.
Message #31 received at 59208 <at> debbugs.gnu.org (full text, mbox):
On Mon, Nov 14, 2022 at 12:38 PM Juri Linkov <juri <at> linkov.net> wrote:
>
> >> > As an aside, auto-width doesn't work very well when using a
> >> > variable-pitch font for your tab bar. Specifically, for me it doesn't
> >> > take up the full width when I have enough tabs that would fill that
> >> > width.
> >>
> >> Sorry, I don't understand the problem. It doesn't take up the full width
> >> of the tab bar? Does it fill the whole tab bar when you customize
> >> tab-bar-auto-width-max to nil?
> >
> > No, it does not. It's not computing the overall width of the window
> > correctly or something like that: https://share.cleanshot.com/otuZj4
>
> Could you show the minimal tab function that reproduces the problem.
> Is it more like this?
>
> (defun aj/tab-bar-tab-name-format (tab i)
> (propertize
> (concat (alist-get 'name tab)
> (propertize " " 'display '(space :width (8))))
> 'face (funcall tab-bar-tab-face-function tab)))
>
> (setq tab-bar-tab-name-format-function #'aj/tab-bar-tab-name-format)
It happens with the default. The issue is the variable pitch font.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 13 Dec 2022 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 187 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.