Subject: Re: bug#64696: 30.0.50; indent-to inherits preceding text properties, including 'invisible

From: Ihor Radchenko <[email-masked]>
Date: Mon, 31 Jul 2023 07:18:16 +0000

Eli Zaretskii <[email-masked]> writes:

>> 1. "When calculating width of a multibyte character in STRING, only the
>>    base leading-code is considered; the validity of the following bytes
>>    is not checked."
>
> Remnant from a very distant past; ignore it.

I see that you updated the docstring in recent commits. Thanks!

(Side note: Is there a way to track commits related to a bug report? I
saw this change by sheer luck.)

>> 4. "... , as are display properties and invisible text"
>> 
>>    What about other properties? Like 'line-prefix. Maybe "all the text
>>    properties are ignored"?
>
> line-prefix doesn't affect the width of the string itself.

Then, there is a bug in `string-pixel-width':

string-pixel-width is an autoloaded and natively compiled function
defined in subr-x.el.

Documentation
Return the width of STRING in pixels.

(string-pixel-width "asd") ;=> 30
(string-pixel-width (propertize "asd" 'line-prefix "123")) ;=> 60

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>