This could be added to the org-mode documentation as a hint for those who use native fontification. Should I send a patch for that or trivial enough you'd do it, if you agree?

On Sat, Jan 18, 2025 at 6:54 AM Ship Mints <shipmints@gmail.com> wrote:
For the record, this is what I've recommended and what I will use:

  (defun my/XXX-mode-hook ()
    (when (or buffer-file-name
              (not (string-prefix-p " " (buffer-name))))
      ;; do something expensive
      ))

On Sat, Jan 18, 2025 at 6:36 AM Ihor Radchenko <yantar92@posteo.net> wrote:
Ship Mints <shipmints@gmail.com> writes:

> Yes, could do, and nothing needed by org-mode or markdown-mode. Could also
> test for buffer-file-name nil. Or test both. Let's recommend that simpler
> approach and I will rescind my markdown PR in favor of this simpler
> suggestion.

Well. Org or markdown should name the buffers according to the
convention :) Org does it though. So, we should be good.

Closing the patch request.
Canceled.

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