Ship Mints <shipmi...@gmail.com> writes:

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

Thanks!

Do you have other examples where the new predicate could be useful apart
from eglot? For eglot specifically, one can do a much simpler test -
check for `buffer-file-name'.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
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>

Reply via email to