MSYS2-packages
MSYS2-packages copied to clipboard
[BUG] aspell broken
Describe the bug
aspell does not work, neither in the msys nor in the mingw-w64 ports
Steps to Reproduce the Problem
- Install aspell with 'pacman -S aspell aspell-en'
- Select right language 'export LANG=en_US'
- Execute 'aspell -t -m -a -B'
Expected behavior: aspell should wait for the user to input words and return either empty lines or alternatives. Instead, it either crashes with the message ".cset" could not be opened for reading or does not exist.lib/aspell-0.60/ Aborted (core dumped)" or, in the mingw port it crashes with "Error: Unknown mode "tex""
Additional Context: Operating System, Screenshots
- OS: Windows 10 Pro version 1909 64bit
- uname 'MSYS_NT-10.0-18363 DESKTOP-3A8AAJ0 3.1.6-340.x86_64 2020-07-17 05:52 UTC x86_64 Msys'
This sounds like an old issue, see, for example https://lists.gnu.org/archive/html/help-emacs-windows/2017-04/msg00017.html.
I should have remarked that mingw-w64-x84_64-aspell works in default mode
$ aspell -m -a -B
@(#) International Ispell Version 3.1.20 (but really Aspell 0.60.7)
hello
& hello 30 0: huello, hel¾, hallo, hall¾, heleo, hele¾, helio, holl¾, hielo, huelo, huella, huelle, ello, halo, helÚ, hilo, bello, mello, pello, sello, vello, holeo, halla, halle, hallÚ, helea, helee, heleÚ, hollÚ, hulla
It fails, however, when run using the 'tex' filter.
In the case of the msys port, it always fails when trying to spell words
$ aspell -m -a -B
.cset" could not be opened for reading or does not exist.lib/aspell-0.60/
Aborted (core dumped)
But it works when asking trivial questions, such as "filters", or "dicts"
Just for the record...
To avoid this issue I adopted a workaround found on the WEB.
Added this command
$ cat .emacs.d/aspell.cmd
@echo off
wsl aspell %1 %2 %3 %4 %5 %6 %7
and this line to init.el
(setq ispell-program-name "~/.emacs.d/aspell.cmd")
As you know, builds from master of Emacs need to add C:\msys64\mingw64\bin
to the PATH. To avoid to add a system wide PATH (it would be visible from WSL with some unwanted effect) I changed the way to start Emacs creating a link (.lnk
) with this target:
C:\msys64\usr\bin\env.exe PATH="/mingw64/bin:$PATH" HOME=/c/Users/utente/AppData/Roaming PRELOAD_WINSOCK=1 /c/myApps/Emacs/bin/runemacs.exe
I adopted this work around since March 2020.
Now, after some recent MSYS2 updates the above does not work any more. Indeed when I try to spell check a buffer I get an ~/.emacs.d/aspell.cmd exited with code 1
message. It resulted that removing the string PATH="/mingw64/bin:$PATH"
(ALL it!) then it works again (but Emacs do not fully load the graphics...). So I returned to the old way to add that path to the system wide PATH.
I tried also an Emacs build from March Git source, and it has the same issue!
Aspell works well although in TeX mode by using --filter-path
option. For example, in my environment (with mingw-w64-x86_64-aspell
), the following works correctly:
$ aspell check --filter-path=/mingw64/lib/aspell-0.60 --mode=tex something.tex
I am very sorry for being not familiar with MSYS2 nor Aspell. But I hope my comment helps you developers/maintainers.
Thanks,
I have what looks like the same problem: installed aspell 0.60.8 and english dictionaries using pacman aspell works as long as I don't try to specify a mode. The two commands
aspell check --filter-path=c:\msys64\mingw64\lib\aspell-0.60 -H outline.html
aspell check --filter-path=c:\msys64\mingw64\lib\aspell-0.60 -t hwk3.tex
result in Error: Unknown mode: "html" or Error: Unknown mode: "tex"
"aspell dump filters" shows a list of filters including tex and html
"aspell dump modes" returns nothing
The folder c:\msys64\mingw64\lib\aspell-0.60 contains files called tex.amf and html.amf Those files look like mode files, e.g. tex.amf contains
MODE tex
ASPELL >=0.60
MAGIC /0:256:^[ \t]*\\documentclass\[[^\[\]]*\]\{[^\{\}]*\}/tex
DESCRIPTION mode for checking TeX/LaTeX documents
FILTER url
FILTER tex
In emacs flyspell-mode works in org-files but causes emacs to freeze on latex or html files. At first I thought this was an emacs problem but it looks like the problem is that aspell does not find the mode files even when told where they are?
Hi,
I had to update Aspell after the native WIN32 port (v0.50) was no longer supported by Emacs (used to work lika a charm on older Emacs versions).
I upgraded Aspell to v0.60.8 installed as a package of MSYS2/MINGw64 (on an x86 Win10 64-bit machine).
Now, Aspell crashes when inwoked from emacs on LaTeX files. After some internet search and some tests, I would like to report that I observe exactly the same behaviour as reported by Sigurd-Angenent and would like to second the request for a solution.
I came to the conclusion that my skills are far too limited to address the issue by myself... so, any support would be welcome.
Thanks!