# aspell with emacs 26.1 on ms windows

After updating emacs to version 26.1 on a windows machine, I get the following error message from flyspell:

Error enabling Flyspell mode:
(c:/Program Files (x86)/Aspell/bin/aspell.exe release 0.60 or greater is required)


The problem is, even after installing a windows binary of aspell 0.6 from here, it still doesn't work because apparently

The Aspell 0.60 library is binary compatible with the Aspell 0.50 library.
For this reason I chose _not_ to increment the major version number (so-name) of the shared library by default [...]


Has anybody else had this problem already? Are emacs users relying on aspell on windows, or rather using alternatives like hunspell?

• I personally use hunspell on windows. – InHarmsWay Jun 7 '18 at 18:37
• Do you build it yourself, or is there a good source of recent windows binaries? – B_old Jun 8 '18 at 8:11
• I did not compile myself, I believe I got it from sourceforge.net/projects/hunspell – InHarmsWay Jun 8 '18 at 8:16

Yes, hunspell is THE spell-checker to use with emacs 26.1, as there's no windows binary of aspell 0.6 for the time being, and no one can foretell when there will be one. I tried hunspell this morning with emacs 26.1 on Windows 10 and it ran perfectly well. You will find some very useful tips on how to configure your .emacs file for hunspell here. Have a nice day !

• I get error Error: ispell-check-version: Wrong type argument: stringp, nil – Didier A. Aug 18 '18 at 6:15

You can install aspell or hunspell with https://www.msys2.org/. MSYS2 has native binaries for aspell available which are compatible with Emacs 26.1. Note you can also install emacs using MSYS2 as well.

After installing, MSYS2 MinGW 64-bit should be in your start menu. Launch that, which brings up a terminal, and search for packages using pacman -Ss aspell.

There are several options. I ended up using the following two packages to install aspell and an English dictionary:

pacman -S mingw64/mingw-w64-x86_64-aspell
pacman -S mingw64/mingw-w64-x86_64-aspell-en


Now you can enter which aspell in the same terminal to find it's location. It'll probably be in C:\msys64\mingw64\bin.

Add that path to your "Path" environmental variable.

In your emacs config set (setq ispell-program-name "aspell").

If everything is setup correctly you should be able to enable flyspell-mode without getting an error like the following in your message buffer:

Error enabling Flyspell mode:
(Searching for program No such file or directory aspell)


All the above also applies to hunspell. Hunspell even provides instructions on their github page for building from source using MSYS2 on Windows.

• This is a nice and straight-forward solution to use aspell without hurting your current configuration at all. – Dean Seo Dec 6 '18 at 3:15
• An excellent post that shows a real understanding of the issues--and it works too! – devcom Mar 29 '19 at 4:02

I avoid installing MSYS on Windows 10 because one can download Ubuntu from the MS store and use ispell and emacs inside the Ubuntu application (sudo apt-get install ispell). You have still access to the Windows files under the mount point /mnt/c.

• Please consider elaborating your answer to point how how it answers the question. – Drew Feb 4 '19 at 15:09

Win32/Win64 binaries for aspell-0.60.6.1 have always existed. You can obtain a standalone fully working with Emacs version of aspell-0.60.6.1 from Cygwin. Basically, all you need from Cygwin are the following files:

bin\aspell.exe

bin\cygaspell-15.dll

bin\cyggcc_s-seh-1.dll

bin\cygiconv-2.dll

bin\cygintl-8.dll

bin\cygncursesw-10.dll

bin\cygstdc++-6.dll

bin\cygwin1.dll

lib\aspell-0.60

share\doc\ aspell + aspell-LANG (Optional)

share\info\ files aspell.info.gz and dir

share\man\man1\aspell.1.gz


My windows 10, init.el is setup as follows:

;;; Use Aspell for spell checking

(setq-default ispell-program-name "C:/Emacs/bin/aspell.exe")

;; Custom hotkeys for spell checking in emacs.

(global-unset-key (kbd "M-\$"))  ;unbind emacs default key for ispell-word

(global-set-key (kbd "<f7>") 'ispell-word)

(global-set-key (kbd "C-<f7>") 'flyspell-mode)

;;; Specify which dictionary to use at startup (english, ...). Uncomment one of the following lines:

;(setq ispell-dictionary "english")


I have tested flyspell with Aspell 0.60 and Emacs 26.1 yesterday. All I can say is that feature is slow and not working well. In my opinion not recommended because there are alternative faster Windows native programs. Despite the fact having fine tuned Emacs installation in windows 10 for several versions, I do think this program is not for me. For those using LaTeX source, TeXStudio is the recommended solution in Windows (and even in Linux).

• You do not provide any link or resources to the binaries. It looks like you compiled it yourself for windows. – Welgriv Apr 16 at 15:21

To complete others answers, Install hunspell instead aspell this way:

1. Download the hunspell win32 binairy here, look for hunspell-1.3.2-3-w32-bin.zip (ex: ctrl+F hunspell)
2. Unzip it within a given repository path\to\my\repo (a smart one can be C:\Program Files (x86)\hunspell)
3. Add this to your emacs init file : (setq-default ispell-program-name "C:/Program Files (x86)/hunspell/bin/hunspell.exe") note that the \ have change into /.

If you need more details, specially using other dictionaries, follow these instructions as previously mentioned, but beware there is NO need to add hunspell to your windows PATH.