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 <yanta...@posteo.net> wrote: > Ship Mints <shipmi...@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> >