1

I'm trying to get Norwegian spell checking working in Emacs, and I'm having trouble with the Norwegian dictionary.

System

  • Ubuntu 17.04
  • GNU Emacs 25.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.31) of 2017-02-05 (installed with Nix)
  • Also tried with GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of 2017-03-29, modified by Debian (installed with Apt-get)
  • Spacemacs v.0.200.9

I use the Spacemacs layer spell-checking for spell checking. This "just works" for text in English.

Things I've tried

  1. Activate the Spacemacs layer spell-checking. Spell checking English text now "just works".
  2. I M-x ispell-change-dictionary and pick norsk from the menu suggestions. This shows up in *Messages*:

    Local Ispell dictionary set to norsk
    Starting new Ispell process /usr/bin/aspell with norsk dictionary...
    Error in post-command-hook (flyspell-post-command-hook): (error "Error: The file \"/usr/lib/aspell/norsk\" can not be opened for reading.")
    
  3. I check the folder, finding filenames not matching:

    $ ls /usr/lib/aspell | grep no
    no.dat
    no.multi
    no_phonet.dat
    norwegian.alias
    
  4. The documentation for the ispell minor mode recommends installing Ispell. I install the Norwegian ispell dictionary, same error as above.

  5. Another answer recommends installing hunspell. I install the Norwegian hunspell dictionary, same error as above.
  6. I also installed the Norwegian aspell dictionary. Same error as above.

Any suggestions? Any relevant information I can provide?

7
  • I suspect the issue fom the post-command hook. Do other dictionaries works?
    – DJJ
    May 20, 2017 at 11:53
  • English checking works as expected. I'll try a few others and report back.
    – Teodor
    May 20, 2017 at 11:56
  • After installing the German Aspell dictionary (sudo apt install aspell-de), spell checking for German works.
    – Teodor
    May 20, 2017 at 12:06
  • I don't know where the problem comes from. I installed aspell-no and got the same result. I'm tempted to change the name of the files?
    – DJJ
    May 20, 2017 at 12:23
  • I haven't tried that (yet). Should the possible options to select from the ispell-change-dictionary match the contents of /usr/lib/aspell or a different system folder?
    – Teodor
    May 20, 2017 at 12:24

1 Answer 1

1

The trouble seems to be with ispell. I managed to get around it by using hunspell instead.

  1. Install Hunspell and its Norwegian dictionary

    sudo apt install hunspell hunspell-no
    
  2. Configure Emacs to use Hunspell for spell checking

    • Set the variable Ispell program name to hunspell
  3. Use the Norwegian dictionary

    • M-x ispell-change-dictionary then nb_NO

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.