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 wrote: > Ship Mints 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 . > Support Org development at , > or support my work at >