GNU bug report logs - #64696
30.0.50; indent-to inherits preceding text properties, including 'invisible

Previous Next

Package: emacs;

Reported by: Ihor Radchenko <yantar92 <at> posteo.net>

Date: Tue, 18 Jul 2023 07:59:01 UTC

Severity: normal

Found in version 30.0.50

Full log


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

From: Ihor Radchenko <yantar92 <at> posteo.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: monnier <at> iro.umontreal.ca, 64696 <at> debbugs.gnu.org
Subject: Re: bug#64696: 30.0.50; indent-to inherits preceding text
 properties, including 'invisible
Date: Mon, 31 Jul 2023 07:18:16 +0000
Eli Zaretskii <eliz <at> gnu.org> 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>




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

Previous Next


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