Ihor Radchenko writes: > "Christopher M. Miles" writes: > >> I'm the developer of Org mode package "org-link-beautify" >> https://repo.or.cz/org-link-beautify.git . The package main theory >> is to use org-link-parameters `:activate-func` to do link file preview >> with generating thumbnail images or file content etc. >> >> But I found it's slow one some big Org file and slow on small Org file >> when previewing has a lot. >> ... >> I can see the `org-mode` invoked `org-set-font-lock-defaults` soon when >> `org-mode` enabled. I hope the link `:activate-func` function can be >> called only on link elements which is VISIBLE (means unfolded subtrees >> or similar). So org-mode don't need to render all buffer links at >> beginning soon. Instead render them as needed as unfolded. (Maybe I read >> source code without fully understand the code. If so, correct me, >> thanks.) > > Emacs fontification, by default, only requests fontification of the text > visible on screen. That's what LIMIT argument to `font-lock-keywords' > MATCHER function is for. Org mode obeys LIMIT. > > If you are seeing fontification being requested for invisible part of > buffer or parts of buffer outside screen, it is likely caused by some > third-party package forcing the fontification. > > As usual, try emacs -Q + minimal set of loaded packages and see if you > can reproduce the problem. Ihor, Thanks for answering. Learned new stuff. -- [ stardiviner ] I try to make every word tell the meaning that I want to express without misunderstanding. Blog: https://stardiviner.github.io/ IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3