GNU bug report logs -
#55207
29.0.50; tab-bar-format-align-right only works correctly with monospace characters
Previous Next
Reported by: Daniel Semyonov <daniel <at> dsemy.com>
Date: Sun, 1 May 2022 15:51:02 UTC
Severity: normal
Found in version 29.0.50
Done: Daniel Semyonov <daniel <at> dsemy.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
>>>>> Juri Linkov writes:
> I guess you are using global-mode-string with XBM images.
I should've added this to the last message, but this is my tab bar
configuration (just a little bit over engineered):
(init-base-customize display-time-format "%H:%M %d/%m/%y"
display-time-mail-function #'ignore)
(display-time-mode)
(setq global-mode-string
'(:eval
`(""
,(and (boundp 'init-gnus-unread-mail-string)
init-gnus-unread-mail-string)
,(and (boundp 'init-gnus-unread-news-string)
init-gnus-unread-news-string)
,(and (boundp 'init-volume-string)
init-volume-string)
,(and (boundp 'emms-mode-line-string)
emms-mode-line-string)
,(and (boundp 'emms-playing-time-string)
emms-playing-time-string)
" | " ,(string-trim-right display-time-string))))
(init-base-customize tab-bar-format
'( tab-bar-format-tabs tab-bar-format-align-right
tab-bar-format-global))
(tab-bar-mode)
('init-base-customize' is just a convenience macro which calls
'customize-set-variable' under the hood and the value of 'init-*-string' is
a string of the form "x: y " where 'x' is a letter and 'y' is a number or
percentage; 'x:' is replaced with an XBM image using the 'display'
property on GUI frames).
> Could you then try something like this to see what number it
> returns?
I did some further testing, first adding arbitrary text to the
'global-mode-string', then adding more images and finally adding both.
I've attached screen shots of my full Emacs frame with an example of
each test case, taken right after evaluating your provided expression
(so the number is shown in the echo area). The buffer shown in the
images shows the exact changes I made to the 'global-mode-string' in
each test.
I've also attached the envelope and volume icons seen in the screen
shots, just in case they may be useful.
Hopefully this information proves useful, thank you for looking into
this.
[control.png (image/png, attachment)]
[added_text.png (image/png, attachment)]
[added_image.png (image/png, attachment)]
[added_image_and_text.png (image/png, attachment)]
[volume-75.xbm (image/x-xbitmap, attachment)]
[mail.xbm (image/x-xbitmap, attachment)]
This bug report was last modified 3 years and 80 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.