Subject: bug#47937: 27.1; Invisible text property updated only for a portion of buffer

From: Arthur Miller <[email-masked]>
Date: Wed, 21 Apr 2021 20:40:31 +0200

Eli Zaretskii <[email-masked]> writes:

>> From: Arthur Miller <[email-masked]>
>> Date: Wed, 21 Apr 2021 20:14:04 +0200
>> 
>> load and eval attached file: ob-hide-markers.el
>> 
>> open attached test.org file and switch to it's buffer.
>> 
>> M-x org-babel-hide-markers-mode
>> 
>> Expected all babel source block markers should be hidden, in entire
>> buffer. 
>> 
>> For me, when scrolled down, after few screen pages, for me after ~ 3½
>> screen pages, block markers are for some reason not processed.
>
> They are not processed because there's no invisible property there.

Why does it work on visible portion of the buffer, but not on the rest?
Or why does it work if I scroll through the buffer first? Is it some
optimization kicking in, that does not add 'invisible text property for
text that isn't on the screen?

> So something is wrong here with the code that puts that property on
> the text you want to conceal.

I am using put-text-property for entire buffer, and entire test file is
machine generated, so all lines should work same.

> IOW, this problem has nothing to do with display or the invisible
> property itself.

Agree, I know. Problem is that part of buffer does not get invisible
property added. But if buffer is scrolled through, than all parts that
have been on the screen, get's the property updated. Seems to me.