JV <[email protected]> writes: >> Ihor Radchenko wrote: > >>> Try opening the attached file and scrolling. >>> The performance is severely degraded with your patch. > > Revised. The current revision spends 20% longer in > font-lock-fontify-region for indented list items as it does for > headlines when benchmarked in a continuous loop. I can't notice any > difference in real use. > > I will await your thoughts on the few items below before sending an > updated patch. > >>> We should not remove existing groups. >>> Not because it is a good thing to have them, but because >>> third-party code may rely on the current behavior. >> >> One can't depend on match groups in the current version: group >> numbering differs based on which way the pattern matches. This is >> the reason we're patching this function. > > Awaiting your thoughts here. > >>> Also, :package-version should be added to defface I think. > > I gather :package-version should be 10. If this is not correct, please > let me know. > >>>> (defface org-hide >>>> - '((((background light)) (:foreground "white")) >>>> + '((default :inherit org-structure) >>>> + (((background light)) (:foreground "white")) >>>> (((background dark)) (:foreground "black"))) > >>> I think we also need (t) to apply default there. > > This appears ok to me, and works as expected. Have I missed something?
I haven't followed this closely, but in my experience it's a bad idea to use font-lock as a means of tagging structural information. This is because, during buffer modifications, font lock runs on its own schedule, and will often be "behind" what you expected. For identifying structural elements, a direct approach like org-element provides is much more robust. If the issue is attaching faces to alter/impact style, that's a different issue, but for "structural tagging", font lock is non-ideal. Apologies if I'm misreading (some of) the intent here.
