GNU bug report logs - #56874
28.1.50; tab-bar-format-align-right should probably use string-width

Previous Next

Package: emacs;

Reported by: Adam Porter <adam <at> alphapapa.net>

Date: Mon, 1 Aug 2022 16:50:02 UTC

Severity: minor

Tags: moreinfo

Found in version 28.1.50

Fixed in version 29.0.50

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Adam Porter <adam <at> alphapapa.net>
To: Juri Linkov <juri <at> linkov.net>
Cc: 56874 <at> debbugs.gnu.org
Subject: bug#56874: 28.1.50; tab-bar-format-align-right should probably use string-width
Date: Fri, 5 Aug 2022 15:32:35 -0500
Hi Juri,

On 8/1/22 13:13, Juri Linkov wrote:

> Please check Emacs 29 where tab-bar-format-align-right
> contains a better improvement:
> 
>    (string-pixel-width (propertize rest 'face 'tab-bar))
> 
> Does this work in your case as well?

I don't have an Emacs 29 build readily accessible, but I see that Emacs 
28 has the function `shr-string-pixel-width', which I'm guessing is 
similar.  So I tried using that function, and it is an improvement, but 
not quite correct: rather than wrapping onto a new line, the string 
appears on the same line as the rest of the tab-bar, but it is not 
right-aligned as it should be.

If it would help you reproduce the problem to test whether Emacs 29 
already has a fix, all that seems to be necessary is to set the tab-bar 
face to, e.g. ":height 1.2", and add a string of some length (e.g. about 
20) to the global-mode-string, and see whether it wraps onto a new line 
and whether it's right-aligned.  If it seems correct on Emacs 29, then 
I'd guess it's already solved.

Thanks,
Adam




This bug report was last modified 2 years and 290 days ago.

Previous Next


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