[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#64696: 30.0.50; indent-to inherits preceding text properties, includ
From: |
Eli Zaretskii |
Subject: |
bug#64696: 30.0.50; indent-to inherits preceding text properties, including 'invisible |
Date: |
Tue, 18 Jul 2023 14:23:25 +0300 |
> From: Ihor Radchenko <yantar92@posteo.net>
> Date: Tue, 18 Jul 2023 07:58:11 +0000
>
> (progn
> (switch-to-buffer (get-buffer-create "*Test*"))
> (erase-buffer)
> (insert "Test case with char before point hidden<point> :more text:")
> (search-backward ">")
> (forward-char)
> (with-silent-modifications (put-text-property (1- (point)) (point)
> 'invisible t))
> (let ((indent-tabs-mode nil)) (indent-to 100)))
>
> The text is inserted and then indented as expected when 'invisible
> property is not applied:
>
> -------------
> Test case with char before point hidden<point>
> <point> :more text:
> -------------
>
> However, after un-commenting `put-text-property' line, no indentation is
> done "visually" because Finsert_char is called with INHERIT argument Qt.
Isn't that in general TRT? When you indent text, you _want_ to
inherit the text properties, right?
Whether the inherited properties should also include the invisible
property could be subject to discussion, but it isn't 100% clear to me
that it should always be excluded.
In any case, I think you can bind text-property-default-nonsticky
around the indent-to call to control this, right? Or use the
rear-sticky text property.
Adding Stefan, in case he has some comments.
- bug#64696: 30.0.50; indent-to inherits preceding text properties, including 'invisible, Ihor Radchenko, 2023/07/18
- bug#64696: 30.0.50; indent-to inherits preceding text properties, including 'invisible,
Eli Zaretskii <=
- bug#64696: 30.0.50; indent-to inherits preceding text properties, including 'invisible, Ihor Radchenko, 2023/07/18
- bug#64696: 30.0.50; indent-to inherits preceding text properties, including 'invisible, Eli Zaretskii, 2023/07/18
- bug#64696: 30.0.50; indent-to inherits preceding text properties, including 'invisible, Ihor Radchenko, 2023/07/18
- bug#64696: 30.0.50; indent-to inherits preceding text properties, including 'invisible, Eli Zaretskii, 2023/07/18
- bug#64696: 30.0.50; indent-to inherits preceding text properties, including 'invisible, Ihor Radchenko, 2023/07/18
- bug#64696: 30.0.50; indent-to inherits preceding text properties, including 'invisible, Eli Zaretskii, 2023/07/18
- bug#64696: 30.0.50; indent-to inherits preceding text properties, including 'invisible, Ihor Radchenko, 2023/07/19
- bug#64696: 30.0.50; indent-to inherits preceding text properties, including 'invisible, Eli Zaretskii, 2023/07/19
- bug#64696: 30.0.50; indent-to inherits preceding text properties, including 'invisible, Ihor Radchenko, 2023/07/20
- bug#64696: 30.0.50; indent-to inherits preceding text properties, including 'invisible, Ihor Radchenko, 2023/07/21