Sometimes it is possible to add commands to the start of an org-mode buffer to customize it.

I would like flyspell to run and stay active with pt_PT dictionary on a specific file whenever I open it. This is an org-mode file opened with emacs.

How can I do that?

  • See file-local variables and also ispell-local-dictionary: "If non-nil, the dictionary to be used for Ispell commands in this buffer. The value must be a string dictionary name, or nil, which means use the global setting in 'ispell-dictionary'. Dictionary names are defined in 'ispell-local-dictionary-alist' and 'ispell-dictionary-alist'. Setting 'ispell-local-dictionary' to a value has the same effect as calling 'ispell-change-dictionary' with that value. This variable is automatically set when defined in the file with either 'ispell-dictionary-keyword' or the Local Variable syntax." – lawlist Nov 14 '15 at 15:49
  • See also flyspell-default-dictionary: "A string that is the name of the default dictionary. This is passed to the 'ispell-change-dictionary' when flyspell is started. If the variable 'ispell-local-dictionary' or 'ispell-dictionary' is non-nil when flyspell is started, the value of that variable is used instead of 'flyspell-default-dictionary' to select the default dictionary. Otherwise, if 'flyspell-default-dictionary' is nil, it means to use Ispell's ultimate default dictionary." – lawlist Nov 14 '15 at 15:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.