Rudolf Adamkovič <salu...@me.com> writes: > Upon further investigation, Org frequently starts and kills the > spellchecker when the document contains `LocalWords' comments. > > 1. Start Emacs > > emacs -Q > > 2. Configure Flyspell > > (add-hook 'text-mode-hook #'flyspell-mode) > (add-hook 'prog-mode-hook #'flyspell-prog-mode) > > 3. Create a new Org file > > # LocalWords: xyz > > Hello there! > > 4. Export the file to HTML > > Expected: > > No Ispell process started on export. > > Actual: > > A new Ispell process started on export.
Confirmed. This is because `org-html-final-function' uses `mhtml-mode' to indent the resulting html file. `mhtml-mode' unconditionally runs `prog-mode-hook' thus starting Ispell. We may try `delay-mode-hooks' around `set-auto-mode', but it is not honoured by `mhtml-mode'. I guess we can report this as Emacs bug. > P.S. I also see Org starting Ispell over and over when holding down > `C-v' in a long document that contains lots of scattered `LocalWords' > comments. This sounds like a normal Ispell behaviour. -- Ihor Radchenko // yantar92, Org mode contributor, 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>