Blog‎ > ‎

Run aspell from Windows Emacs using WSL

posted Sep 7, 2019, 10:45 AM by Juan Jose Garcia-Ripoll   [ updated Sep 7, 2019, 10:46 AM ]
If you have the Windows Subsystem for Linux, you can use its spell checker from Emacs. I have had to resort to this because hunspell.exe does no longer find my dictionaries and Emacs' code for hunspell is broken on Windows.

Step 1: Create a script called aspell.cmd with this content

@echo off
wsl aspell %1 %2 %3 %4 %5 %6 %7

Step 2: In your .emacs file, tell it to use this script for spell checking. Simply enter

(setq ispell-program-name "your/path/to/aspell.cmd")

If you now type M-$ (Esc followed by $ sign) you will enter the ispell mode. However, use of flyspell is more recommended.