Greetings, org-mode maintainers,
I've become an occasional contributor over on the Emacs side. I thought I'd give an org-mode contribution a try.
I've added the predicate function org-src-is-fontify-buffer-p which can be used in a prog-mode hook to avoid resource-intensive features such as eglot
inside a fontification buffer. This short example should make it clear.
(defun my/emacs-lisp-hook ()
(unless (and (featurep 'org) (org-src-is-fontify-buffer-p))
(eglot-ensure)))
I made a similar patch, submitted via a github pull request, to the markdown-mode maintainers for the same functionality in their fontification buffers.
The patch was tested against today's main. I hope you find this useful. Let me know your feedback.
Thanks for org-mode,
-Stephane Marks
P.S. I am on record with the FSF.