Subject: Re: bug#68849: 30.0.50; font-lock does not flush fontification after calling open-line

From: Ihor Radchenko <[email-masked]>
Date: Sun, 04 Feb 2024 13:33:48 +0000

Stefan Monnier <[email-masked]> writes:

>> I am not 100% sure if is Emacs bug, but my preliminary testing showed
>> anomalies in `jit-lock-after-change' -
>> (put-text-property jit-lock-start jit-lock-end 'fontified nil) somehow
>> did not apply the text properties. I suspect that I missed something
>> though.
>
> AFAICT the `put-text-property` works fine :-)
> The problem is that your `org-fontify-extend-region` does not spread the
> change to the "next line".
>
> When `font-lock-extend-after-change-region-function` is nil, Emacs does
> that for you.  Quoting `font-lock-extend-jit-lock-region-after-change`:
> ...

Thanks for the pointer!
Fixed, on bugfix.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=1abff3859

> I still hope you can change Org mode so it uses
> `font-lock-extend-region-functions` instead of
> `font-lock-extend-after-change-region-function`.

I am not taking on any major changes in the existing Org fontification
as it needs to be rewritten completely.

-- 
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>