bug#47456: 27.1; emacs hangs using aspell in auctex

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#47456: 27.1; emacs hangs using aspell in auctex

Emacs - Bugs mailing list

 

 

In Emacs 27.1 on Windows with auctex 13.0.4, I have installed aspell as described in

https://emacs.stackexchange.com/a/45752 and it works, except

in .tex files.

 

When I M-x ispell-buffer emacs hangs after a few moments and it doesn't

become active before I press C-g and skips the spelling.

The same happens for flyspell.

 

It seems to work if line 4084 of ispell.el is commented:

      ;;     (ispell-send-string "+\n")    ; set ispell mode to tex

 

 

In GNU Emacs 27.1 (build 1, x86_64-w64-mingw32)

of 2020-08-21 built on CIRROCUMULUS

Repository revision: 86d8d76aa36037184db0b2897c434cdaab1a9ae8

Repository branch: HEAD

Windowing system distributor 'Microsoft Corp.', version 10.0.17134

System Description: Microsoft Windows 10 Enterprise (v10.0.1803.17134.2087)

 

Recent messages:

Auto-saving...

Sending...

Sending via mail...

Save this mail sending choice? (y or n) y

Saving file c:/Users/brel/AppData/Roaming/.emacs...

Wrote c:/Users/brel/AppData/Roaming/.emacs

Sending...done

Undo [14 times]

user-error: No further undo information

apply: Command attempted to use minibuffer while in minibuffer

 

Configured using:

'configure --without-dbus --host=x86_64-w64-mingw32

--without-compress-install 'CFLAGS=-O2 -static''

 

Configured features:

XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY W32NOTIFY ACL GNUTLS LIBXML2

HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS MODULES THREADS JSON PDUMPER LCMS2 GMP

 

Important settings:

  value of $LANG: DAN

  locale-coding-system: cp1252

 

Major mode: BibTeX

 

Minor modes in effect:

  shell-dirtrack-mode: t

  save-place-mode: t

  delete-selection-mode: t

  show-paren-mode: t

  recentf-mode: t

  global-auto-revert-mode: t

  cua-mode: t

  TeX-PDF-mode: t

  TeX-source-correlate-mode: t

  tooltip-mode: t

  global-eldoc-mode: t

  electric-indent-mode: t

  mouse-wheel-mode: t

  tool-bar-mode: t

  menu-bar-mode: t

  file-name-shadow-mode: t

  global-font-lock-mode: t

  font-lock-mode: t

  auto-composition-mode: t

  auto-encryption-mode: t

  auto-compression-mode: t

  line-number-mode: t

  transient-mark-mode: t

 

Load-path shadows:

None found.

 

Features:

(shell pcomplete cus-edit mailalias mailclient qp ispell latex

easy-mmode edmacro kmacro latex-flymake flymake-proc flymake compile

comint ansi-color ring warnings thingatpt tex-ispell tex-style bibtex

help-mode pp shadow sort mail-extr emacsbug message rmc puny dired

dired-loaddefs format-spec rfc822 mml mml-sec epa derived epg epg-config

gnus-util rmail rmail-loaddefs text-property-search time-date mm-decode

mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader

sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils

saveplace delsel paren recentf tree-widget wid-edit autorevert

filenotify cua-base cus-start cus-load server tex-mik tex crm advice

texmathp finder-inf info tex-site package easymenu browse-url

url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs

eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv

bytecomp byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric

uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp

disp-table term/w32-win w32-win w32-vars term/common-win tool-bar dnd

fontset image regexp-opt fringe tabulated-list replace newcomment

text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar

rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock

syntax facemenu font-core term/tty-colors frame minibuffer cl-generic

cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao

korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech

european ethiopic indian cyrillic chinese composite charscript charprop

case-table epa-hook jka-cmpr-hook help simple abbrev obarray

cl-preloaded nadvice loaddefs button faces cus-face macroexp files

text-properties overlay sha1 md5 base64 format env code-pages mule

custom widget hashtable-print-readable backquote threads w32notify w32

lcms2 multi-tty make-network-process emacs)

 

Memory information:

((conses 16 157647 22674)

(symbols 48 14604 1)

(strings 32 48447 2455)

(string-bytes 1 1396927)

(vectors 16 27704)

(vector-slots 8 1010205 201054)

(floats 8 53 204)

(intervals 56 928 11)

(buffers 1000 16))

Reply | Threaded
Open this post in threaded view
|

bug#47456: 27.1; emacs hangs using aspell in auctex

Eli Zaretskii
> Date: Sun, 28 Mar 2021 21:57:06 +0000
> Accept-Language: da-DK, en-US
> From:  Brian Elmegaard via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[hidden email]>
>
> In Emacs 27.1 on Windows with auctex 13.0.4, I have installed aspell as described in
> https://emacs.stackexchange.com/a/45752 and it works, except
> in .tex files.
>  
> When I M-x ispell-buffer emacs hangs after a few moments and it doesn't
> become active before I press C-g and skips the spelling.
> The same happens for flyspell.
>  
> It seems to work if line 4084 of ispell.el is commented:
>       ;;     (ispell-send-string "+\n")    ; set ispell mode to tex

It doesn't hang here with Hunspell.

Does the above work if you invoke Aspell from the cmd prompt?  IOW,
how do we know the problem isn't in the port of Aspell you are using?
The fact that C-g interrupts the hang could mean that Emacs waits for
Aspell.



Reply | Threaded
Open this post in threaded view
|

bug#47456: 27.1; emacs hangs using aspell in auctex

Eli Zaretskii
[Please use Reply All to keep the bug address on the CC list.]

> From: Brian Elmegaard <[hidden email]>
> Date: Mon, 29 Mar 2021 06:56:11 +0000
>
> Thanks for the quick reply, Eli.
>
> I confirm that invoking \msys64\mingw64\bin\aspell.exe -c file.tex works.
>
> Does this answer your question?

Not really.  Emacs invokes "aspell -a -m", not -c.  See
ispell-start-process for the details.  What happens in that case if
you send the line containing just "+" and a newline to the speller?

And which version of Aspell are you using?



Reply | Threaded
Open this post in threaded view
|

bug#47456: 27.1; emacs hangs using aspell in auctex

Eli Zaretskii
> From: Brian Elmegaard <[hidden email]>
> CC: "[hidden email]" <[hidden email]>
> Date: Mon, 29 Mar 2021 23:24:07 +0000
>
> I think it is correct that it is aspell that gives trouble.
> Hunspell works. Thank you.

Thanks.

Could it be that a recent Aspell release deprecated the "+" command?
If you tell me the version of Aspell you have, I can check.  Try
invoking Aspell from the shell prompt like this:

  aspell -vv

then tell what this produces.



Reply | Threaded
Open this post in threaded view
|

bug#47456: 27.1; emacs hangs using aspell in auctex

Eli Zaretskii
> From: Brian Elmegaard <[hidden email]>
> CC: "[hidden email]" <[hidden email]>
> Date: Tue, 30 Mar 2021 07:50:32 +0000
> Accept-Language: da-DK, en-US
>
> I am not sure where the mistake is. I include a few comments below.
>
> *Aspell*
> It gives:
> >\msys64\mingw64\bin\aspell -vv
> @(#) International Ispell Version 3.1.20 (but really Aspell 0.60.7)

I don't see any incompatibilities related to the "+" command in the
Aspell docs.

> But in emacs, this did not work. Neither with ispell-buffer, nor with the same command line in eshell.

You mean, Aspell didn't work?  Because I thought you said Hunspell did
work in Emacs.



Reply | Threaded
Open this post in threaded view
|

bug#47456: 27.1; emacs hangs using aspell in auctex

Emacs - Bugs mailing list
No, I meant that hunspell 1.7 only worked in emacs if I set the DICTIONARY environment variable.

I tried the following in eshell.

Without DICTIONARY set in .emacs I get an error:
------------
Welcome to the Emacs shell

c:/Users/brel/Documents $ (ispell-find-hunspell-dictionaries)
Can't find Hunspell dictionary with a .aff affix file
c:/Users/brel/Documents $ setenv DICTIONARY en_US
en_US
c:/Users/brel/Documents $ (ispell-find-hunspell-dictionaries)
Can't find Hunspell dictionary with a .aff affix file
-------------------------------

With DICTIONARY set in .emacs it works:
------------
Welcome to the Emacs shell

c:/Users/brel/Documents $ (ispell-find-hunspell-dictionaries)
c:/Users/brel/Documents $ getenv DICTIONARY
en_US
c:/Users/brel/Documents $ (ispell-find-hunspell-dictionaries)
-------------------------------

There is a comment about hunspell 1.7 in ispell.el on line 1122 in (defun ispell-find-hunspell-dictionaries ().
                                 ;; Hunspell 1.7.0 (and later?) won't
                                 ;; show LOADED DICTIONARY unless
                                 ;; there's at least one file argument
                                 ;; on the command line.  So we feed
                                 ;; it with the null device.

Maybe this is related?

Brian



-----Original Message-----
From: Eli Zaretskii <[hidden email]>
Sent: 30. marts 2021 10:28
To: Brian Elmegaard <[hidden email]>
Cc: [hidden email]
Subject: Re: bug#47456: 27.1; emacs hangs using aspell in auctex

> From: Brian Elmegaard <[hidden email]>
> CC: "[hidden email]" <[hidden email]>
> Date: Tue, 30 Mar 2021 07:50:32 +0000
> Accept-Language: da-DK, en-US
>
> I am not sure where the mistake is. I include a few comments below.
>
> *Aspell*
> It gives:
> >\msys64\mingw64\bin\aspell -vv
> @(#) International Ispell Version 3.1.20 (but really Aspell 0.60.7)

I don't see any incompatibilities related to the "+" command in the Aspell docs.

> But in emacs, this did not work. Neither with ispell-buffer, nor with the same command line in eshell.

You mean, Aspell didn't work?  Because I thought you said Hunspell did work in Emacs.



Reply | Threaded
Open this post in threaded view
|

bug#47456: 27.1; emacs hangs using aspell in auctex

Eli Zaretskii
> From: Brian Elmegaard <[hidden email]>
> CC: "[hidden email]" <[hidden email]>
> Date: Tue, 30 Mar 2021 09:35:48 +0000
>
> No, I meant that hunspell 1.7 only worked in emacs if I set the DICTIONARY environment variable.
>
> I tried the following in eshell.
>
> Without DICTIONARY set in .emacs I get an error:
> ------------
> Welcome to the Emacs shell
>
> c:/Users/brel/Documents $ (ispell-find-hunspell-dictionaries)
> Can't find Hunspell dictionary with a .aff affix file
> c:/Users/brel/Documents $ setenv DICTIONARY en_US
> en_US
> c:/Users/brel/Documents $ (ispell-find-hunspell-dictionaries)
> Can't find Hunspell dictionary with a .aff affix file
> -------------------------------

What does the following produce when you type it from the cmd prompt?

  hunspell -D -a nul



Reply | Threaded
Open this post in threaded view
|

bug#47456: 27.1; emacs hangs using aspell in auctex

Emacs - Bugs mailing list
Without DICTIONARY set I get:
SEARCH PATH:
.;c:/msys64/mingw64/bin/;c:/msys64/mingw64/share/hunspell;c:/msys64/mingw64/share/myspell;c:/msys64/mingw64/share/myspell/dicts;c:/msys64;%USERPROFILE%/Application Data/OpenOffice.org 2/user/wordbook;c:/msys64/mingw64/share/dict/ooo;
AVAILABLE DICTIONARIES (path is not mandatory for -d option):
c:/msys64/mingw64/share/hunspell/en_AG
c:/msys64/mingw64/share/hunspell/en_AU-large
c:/msys64/mingw64/share/hunspell/en_AU
c:/msys64/mingw64/share/hunspell/en_BS
c:/msys64/mingw64/share/hunspell/en_BW
c:/msys64/mingw64/share/hunspell/en_BZ
c:/msys64/mingw64/share/hunspell/en_CA
c:/msys64/mingw64/share/hunspell/en_DK
c:/msys64/mingw64/share/hunspell/en_GB
c:/msys64/mingw64/share/hunspell/en_GH
c:/msys64/mingw64/share/hunspell/en_HK
c:/msys64/mingw64/share/hunspell/en_IE
c:/msys64/mingw64/share/hunspell/en_IN
c:/msys64/mingw64/share/hunspell/en_JM
c:/msys64/mingw64/share/hunspell/en_NA
c:/msys64/mingw64/share/hunspell/en_NG
c:/msys64/mingw64/share/hunspell/en_NZ
c:/msys64/mingw64/share/hunspell/en_PH
c:/msys64/mingw64/share/hunspell/en_SG
c:/msys64/mingw64/share/hunspell/en_TT
c:/msys64/mingw64/share/hunspell/en_US-large
c:/msys64/mingw64/share/hunspell/en_US
c:/msys64/mingw64/share/hunspell/en_ZA
c:/msys64/mingw64/share/hunspell/en_ZW
c:/msys64/mingw64/share/myspell/dicts/en_AG
c:/msys64/mingw64/share/myspell/dicts/en_AU-large
c:/msys64/mingw64/share/myspell/dicts/en_AU
c:/msys64/mingw64/share/myspell/dicts/en_BS
c:/msys64/mingw64/share/myspell/dicts/en_BW
c:/msys64/mingw64/share/myspell/dicts/en_BZ
c:/msys64/mingw64/share/myspell/dicts/en_CA
c:/msys64/mingw64/share/myspell/dicts/en_DK
c:/msys64/mingw64/share/myspell/dicts/en_GB
c:/msys64/mingw64/share/myspell/dicts/en_GH
c:/msys64/mingw64/share/myspell/dicts/en_HK
c:/msys64/mingw64/share/myspell/dicts/en_IE
c:/msys64/mingw64/share/myspell/dicts/en_IN
c:/msys64/mingw64/share/myspell/dicts/en_JM
c:/msys64/mingw64/share/myspell/dicts/en_NA
c:/msys64/mingw64/share/myspell/dicts/en_NG
c:/msys64/mingw64/share/myspell/dicts/en_NZ
c:/msys64/mingw64/share/myspell/dicts/en_PH
c:/msys64/mingw64/share/myspell/dicts/en_SG
c:/msys64/mingw64/share/myspell/dicts/en_TT
c:/msys64/mingw64/share/myspell/dicts/en_US-large
c:/msys64/mingw64/share/myspell/dicts/en_US
c:/msys64/mingw64/share/myspell/dicts/en_ZA
c:/msys64/mingw64/share/myspell/dicts/en_ZW
Can't open affix or dictionary files for dictionary named "default".

With DICTIONARY set or if using -d en_US, the dictionary is loaded:
@(#) International Ispell Version 3.2.06 (but really Hunspell 1.7.0)
SEARCH PATH:
.;c:/msys64/mingw64/bin/;c:/msys64/mingw64/share/hunspell;c:/msys64/mingw64/share/myspell;c:/msys64/mingw64/share/myspell/dicts;c:/msys64;%USERPROFILE%/Application Data/OpenOffice.org 2/user/wordbook;c:/msys64/mingw64/share/dict/ooo;
AVAILABLE DICTIONARIES (path is not mandatory for -d option):
c:/msys64/mingw64/share/hunspell/en_AG
c:/msys64/mingw64/share/hunspell/en_AU-large
c:/msys64/mingw64/share/hunspell/en_AU
c:/msys64/mingw64/share/hunspell/en_BS
c:/msys64/mingw64/share/hunspell/en_BW
c:/msys64/mingw64/share/hunspell/en_BZ
c:/msys64/mingw64/share/hunspell/en_CA
c:/msys64/mingw64/share/hunspell/en_DK
c:/msys64/mingw64/share/hunspell/en_GB
c:/msys64/mingw64/share/hunspell/en_GH
c:/msys64/mingw64/share/hunspell/en_HK
c:/msys64/mingw64/share/hunspell/en_IE
c:/msys64/mingw64/share/hunspell/en_IN
c:/msys64/mingw64/share/hunspell/en_JM
c:/msys64/mingw64/share/hunspell/en_NA
c:/msys64/mingw64/share/hunspell/en_NG
c:/msys64/mingw64/share/hunspell/en_NZ
c:/msys64/mingw64/share/hunspell/en_PH
c:/msys64/mingw64/share/hunspell/en_SG
c:/msys64/mingw64/share/hunspell/en_TT
c:/msys64/mingw64/share/hunspell/en_US-large
c:/msys64/mingw64/share/hunspell/en_US
c:/msys64/mingw64/share/hunspell/en_ZA
c:/msys64/mingw64/share/hunspell/en_ZW
c:/msys64/mingw64/share/myspell/dicts/en_AG
c:/msys64/mingw64/share/myspell/dicts/en_AU-large
c:/msys64/mingw64/share/myspell/dicts/en_AU
c:/msys64/mingw64/share/myspell/dicts/en_BS
c:/msys64/mingw64/share/myspell/dicts/en_BW
c:/msys64/mingw64/share/myspell/dicts/en_BZ
c:/msys64/mingw64/share/myspell/dicts/en_CA
c:/msys64/mingw64/share/myspell/dicts/en_DK
c:/msys64/mingw64/share/myspell/dicts/en_GB
c:/msys64/mingw64/share/myspell/dicts/en_GH
c:/msys64/mingw64/share/myspell/dicts/en_HK
c:/msys64/mingw64/share/myspell/dicts/en_IE
c:/msys64/mingw64/share/myspell/dicts/en_IN
c:/msys64/mingw64/share/myspell/dicts/en_JM
c:/msys64/mingw64/share/myspell/dicts/en_NA
c:/msys64/mingw64/share/myspell/dicts/en_NG
c:/msys64/mingw64/share/myspell/dicts/en_NZ
c:/msys64/mingw64/share/myspell/dicts/en_PH
c:/msys64/mingw64/share/myspell/dicts/en_SG
c:/msys64/mingw64/share/myspell/dicts/en_TT
c:/msys64/mingw64/share/myspell/dicts/en_US-large
c:/msys64/mingw64/share/myspell/dicts/en_US
c:/msys64/mingw64/share/myspell/dicts/en_ZA
c:/msys64/mingw64/share/myspell/dicts/en_ZW
LOADED DICTIONARY:
c:/msys64/mingw64/share/hunspell/en_US.aff
c:/msys64/mingw64/share/hunspell/en_US.dic

-----Original Message-----
From: Eli Zaretskii <[hidden email]>
Sent: 30. marts 2021 14:33
To: Brian Elmegaard <[hidden email]>
Cc: [hidden email]
Subject: Re: bug#47456: 27.1; emacs hangs using aspell in auctex

> From: Brian Elmegaard <[hidden email]>
> CC: "[hidden email]" <[hidden email]>
> Date: Tue, 30 Mar 2021 09:35:48 +0000
>
> No, I meant that hunspell 1.7 only worked in emacs if I set the DICTIONARY environment variable.
>
> I tried the following in eshell.
>
> Without DICTIONARY set in .emacs I get an error:
> ------------
> Welcome to the Emacs shell
>
> c:/Users/brel/Documents $ (ispell-find-hunspell-dictionaries)
> Can't find Hunspell dictionary with a .aff affix file
> c:/Users/brel/Documents $ setenv DICTIONARY en_US en_US
> c:/Users/brel/Documents $ (ispell-find-hunspell-dictionaries)
> Can't find Hunspell dictionary with a .aff affix file
> -------------------------------

What does the following produce when you type it from the cmd prompt?

  hunspell -D -a nul



Reply | Threaded
Open this post in threaded view
|

bug#47456: 27.1; emacs hangs using aspell in auctex

Eli Zaretskii
> From: Brian Elmegaard <[hidden email]>
> CC: "[hidden email]" <[hidden email]>
> Date: Tue, 30 Mar 2021 12:50:59 +0000
>
> Without DICTIONARY set I get:
> SEARCH PATH:
> .;c:/msys64/mingw64/bin/;c:/msys64/mingw64/share/hunspell;c:/msys64/mingw64/share/myspell;c:/msys64/mingw64/share/myspell/dicts;c:/msys64;%USERPROFILE%/Application Data/OpenOffice.org 2/user/wordbook;c:/msys64/mingw64/share/dict/ooo;
> AVAILABLE DICTIONARIES (path is not mandatory for -d option):
> c:/msys64/mingw64/share/hunspell/en_AG
> c:/msys64/mingw64/share/hunspell/en_AU-large
> c:/msys64/mingw64/share/hunspell/en_AU
> c:/msys64/mingw64/share/hunspell/en_BS
> c:/msys64/mingw64/share/hunspell/en_BW
> c:/msys64/mingw64/share/hunspell/en_BZ
> c:/msys64/mingw64/share/hunspell/en_CA
> c:/msys64/mingw64/share/hunspell/en_DK
> c:/msys64/mingw64/share/hunspell/en_GB
> c:/msys64/mingw64/share/hunspell/en_GH
> c:/msys64/mingw64/share/hunspell/en_HK
> c:/msys64/mingw64/share/hunspell/en_IE
> c:/msys64/mingw64/share/hunspell/en_IN
> c:/msys64/mingw64/share/hunspell/en_JM
> c:/msys64/mingw64/share/hunspell/en_NA
> c:/msys64/mingw64/share/hunspell/en_NG
> c:/msys64/mingw64/share/hunspell/en_NZ
> c:/msys64/mingw64/share/hunspell/en_PH
> c:/msys64/mingw64/share/hunspell/en_SG
> c:/msys64/mingw64/share/hunspell/en_TT
> c:/msys64/mingw64/share/hunspell/en_US-large
> c:/msys64/mingw64/share/hunspell/en_US
> c:/msys64/mingw64/share/hunspell/en_ZA
> c:/msys64/mingw64/share/hunspell/en_ZW
> c:/msys64/mingw64/share/myspell/dicts/en_AG
> c:/msys64/mingw64/share/myspell/dicts/en_AU-large
> c:/msys64/mingw64/share/myspell/dicts/en_AU
> c:/msys64/mingw64/share/myspell/dicts/en_BS
> c:/msys64/mingw64/share/myspell/dicts/en_BW
> c:/msys64/mingw64/share/myspell/dicts/en_BZ
> c:/msys64/mingw64/share/myspell/dicts/en_CA
> c:/msys64/mingw64/share/myspell/dicts/en_DK
> c:/msys64/mingw64/share/myspell/dicts/en_GB
> c:/msys64/mingw64/share/myspell/dicts/en_GH
> c:/msys64/mingw64/share/myspell/dicts/en_HK
> c:/msys64/mingw64/share/myspell/dicts/en_IE
> c:/msys64/mingw64/share/myspell/dicts/en_IN
> c:/msys64/mingw64/share/myspell/dicts/en_JM
> c:/msys64/mingw64/share/myspell/dicts/en_NA
> c:/msys64/mingw64/share/myspell/dicts/en_NG
> c:/msys64/mingw64/share/myspell/dicts/en_NZ
> c:/msys64/mingw64/share/myspell/dicts/en_PH
> c:/msys64/mingw64/share/myspell/dicts/en_SG
> c:/msys64/mingw64/share/myspell/dicts/en_TT
> c:/msys64/mingw64/share/myspell/dicts/en_US-large
> c:/msys64/mingw64/share/myspell/dicts/en_US
> c:/msys64/mingw64/share/myspell/dicts/en_ZA
> c:/msys64/mingw64/share/myspell/dicts/en_ZW
> Can't open affix or dictionary files for dictionary named "default".
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
That's your problem, right there.  By default, Hunspell looks for a
dictionary called "default".  If you always use the en_US dictionary
by default, simply copy en_US.dic to default.dic and en_US.aff to
default.aff (in the same directory), and then the problem will go
away.

Another measure that I would recommend is to copy en_US.* into the
corresponding ENU.* files.  That is because Windows locale names are
different from Posix ones: what is called en_US on Posix platforms is
called ENU on Windows.  When Hunspell is run by Emacs, Emacs by
default instructs it to load the dictionary that corresponds to the
locale, or "default" if the locale-specific name fails, and so ENU.dic
will also work.



Reply | Threaded
Open this post in threaded view
|

bug#47456: 27.1; emacs hangs using aspell in auctex

Emacs - Bugs mailing list
Thank you for the effort, Eli.
This does work.

Do you see this as a bug in either MSYS hunspell, ispell.el or just a small task for the user to do when updating the dictionaries?
I see that the hunspell on sourceforge does have a default.dic included.

(setenv "DICTIONARY" "en_US")
seems to be a solution that would work also?

Brian

-----Original Message-----
From: Eli Zaretskii <[hidden email]>
Sent: 30. marts 2021 15:02
To: Brian Elmegaard <[hidden email]>
Cc: [hidden email]
Subject: Re: bug#47456: 27.1; emacs hangs using aspell in auctex

> From: Brian Elmegaard <[hidden email]>
> CC: "[hidden email]" <[hidden email]>
> Date: Tue, 30 Mar 2021 12:50:59 +0000
>
> Without DICTIONARY set I get:
> SEARCH PATH:
> .;c:/msys64/mingw64/bin/;c:/msys64/mingw64/share/hunspell;c:/msys64/mi
> ngw64/share/myspell;c:/msys64/mingw64/share/myspell/dicts;c:/msys64;%U
> SERPROFILE%/Application Data/OpenOffice.org
> 2/user/wordbook;c:/msys64/mingw64/share/dict/ooo;
> AVAILABLE DICTIONARIES (path is not mandatory for -d option):
> c:/msys64/mingw64/share/hunspell/en_AG
> c:/msys64/mingw64/share/hunspell/en_AU-large
> c:/msys64/mingw64/share/hunspell/en_AU
> c:/msys64/mingw64/share/hunspell/en_BS
> c:/msys64/mingw64/share/hunspell/en_BW
> c:/msys64/mingw64/share/hunspell/en_BZ
> c:/msys64/mingw64/share/hunspell/en_CA
> c:/msys64/mingw64/share/hunspell/en_DK
> c:/msys64/mingw64/share/hunspell/en_GB
> c:/msys64/mingw64/share/hunspell/en_GH
> c:/msys64/mingw64/share/hunspell/en_HK
> c:/msys64/mingw64/share/hunspell/en_IE
> c:/msys64/mingw64/share/hunspell/en_IN
> c:/msys64/mingw64/share/hunspell/en_JM
> c:/msys64/mingw64/share/hunspell/en_NA
> c:/msys64/mingw64/share/hunspell/en_NG
> c:/msys64/mingw64/share/hunspell/en_NZ
> c:/msys64/mingw64/share/hunspell/en_PH
> c:/msys64/mingw64/share/hunspell/en_SG
> c:/msys64/mingw64/share/hunspell/en_TT
> c:/msys64/mingw64/share/hunspell/en_US-large
> c:/msys64/mingw64/share/hunspell/en_US
> c:/msys64/mingw64/share/hunspell/en_ZA
> c:/msys64/mingw64/share/hunspell/en_ZW
> c:/msys64/mingw64/share/myspell/dicts/en_AG
> c:/msys64/mingw64/share/myspell/dicts/en_AU-large
> c:/msys64/mingw64/share/myspell/dicts/en_AU
> c:/msys64/mingw64/share/myspell/dicts/en_BS
> c:/msys64/mingw64/share/myspell/dicts/en_BW
> c:/msys64/mingw64/share/myspell/dicts/en_BZ
> c:/msys64/mingw64/share/myspell/dicts/en_CA
> c:/msys64/mingw64/share/myspell/dicts/en_DK
> c:/msys64/mingw64/share/myspell/dicts/en_GB
> c:/msys64/mingw64/share/myspell/dicts/en_GH
> c:/msys64/mingw64/share/myspell/dicts/en_HK
> c:/msys64/mingw64/share/myspell/dicts/en_IE
> c:/msys64/mingw64/share/myspell/dicts/en_IN
> c:/msys64/mingw64/share/myspell/dicts/en_JM
> c:/msys64/mingw64/share/myspell/dicts/en_NA
> c:/msys64/mingw64/share/myspell/dicts/en_NG
> c:/msys64/mingw64/share/myspell/dicts/en_NZ
> c:/msys64/mingw64/share/myspell/dicts/en_PH
> c:/msys64/mingw64/share/myspell/dicts/en_SG
> c:/msys64/mingw64/share/myspell/dicts/en_TT
> c:/msys64/mingw64/share/myspell/dicts/en_US-large
> c:/msys64/mingw64/share/myspell/dicts/en_US
> c:/msys64/mingw64/share/myspell/dicts/en_ZA
> c:/msys64/mingw64/share/myspell/dicts/en_ZW
> Can't open affix or dictionary files for dictionary named "default".
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
That's your problem, right there.  By default, Hunspell looks for a dictionary called "default".  If you always use the en_US dictionary by default, simply copy en_US.dic to default.dic and en_US.aff to default.aff (in the same directory), and then the problem will go away.

Another measure that I would recommend is to copy en_US.* into the corresponding ENU.* files.  That is because Windows locale names are different from Posix ones: what is called en_US on Posix platforms is called ENU on Windows.  When Hunspell is run by Emacs, Emacs by default instructs it to load the dictionary that corresponds to the locale, or "default" if the locale-specific name fails, and so ENU.dic will also work.



Reply | Threaded
Open this post in threaded view
|

bug#47456: 27.1; emacs hangs using aspell in auctex

Eli Zaretskii
> From: Brian Elmegaard <[hidden email]>
> CC: "[hidden email]" <[hidden email]>
> Date: Tue, 30 Mar 2021 13:27:30 +0000
>
> Thank you for the effort, Eli.
> This does work.

OK, so do we still have problems in this bug report, or can it be
closed?

> Do you see this as a bug in either MSYS hunspell, ispell.el or just a small task for the user to do when updating the dictionaries?

I see this as a local Hunspell configuration issue.

> I see that the hunspell on sourceforge does have a default.dic included.

Good for them!

> (setenv "DICTIONARY" "en_US")
> seems to be a solution that would work also?

Yes, of course.



Reply | Threaded
Open this post in threaded view
|

bug#47456: 27.1; emacs hangs using aspell in auctex

Eli Zaretskii
> From: Brian Elmegaard <[hidden email]>
> Date: Tue, 30 Mar 2021 14:08:33 +0000
>
> Thank you. I think this was not a bug after all and it should be closed.

Thanks, closing.