5

I put the following in the beginning of the Org file:

* :noexport:
Local Variables:
ispell-local-dictionary: "american"
End:
#+EXPORT_EXCLUDE_TAGS: noexport

And I start flyspell via a hook:

(add-hook 'org-mode-hook 'turn-on-flyspell)

But Ispell always uses the default dictionary instead of the american.

I also tried Org's language tag, but it does not seem to have any effect on Flyspell.

#+LANGUAGE:  en

How to define the Ispell language in the Org file?

Update

When I set the variable from within a :noexport: taged heading the variable will not be set:

* :noexport:
-*- ispell-local-dictionary: "american" -*-

But when I set the variable before the :noexport: tag the variable gets set:

-*- ispell-local-dictionary: "american" -*-
* :noexport:

Is this the intended behavior? And if so, how can I change it?

Dieter.Wilhelm
  • 1,836
  • 14
  • 25
ceving
  • 1,308
  • 1
  • 14
  • 28
  • I'd also like to see some automatic hook for this. For the time being, I work around it by having a key binding for switching flyspell languages and re-evaluating the buffer. See the [comment "Change dictionaries" by Florian Diesch in the Emacs Wiki on Flyspell](https://www.emacswiki.org/emacs/FlySpell). – JacksGT Jun 14 '17 at 07:31
  • 2
    This question has been answered [here](https://emacs.stackexchange.com/questions/2236/prevent-org-mode-from-swallowing-file-local-variables) – loris Jul 13 '17 at 08:03

0 Answers0