bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#34272: 26.1.91 M-x flyspell-mode


From: Tak Kunihiro
Subject: bug#34272: 26.1.91 M-x flyspell-mode
Date: Sat, 09 Feb 2019 18:48:31 +0900 (JST)

>> I traced `ispell-find-hunspell-dictionaries' using Edebug.  I have an
>> impression, problem is something to do with initialization on
>> `hunspell-default-dict'.  The output is shown below.
> 
> hunspell-default-dict is computed in this function,
> ispell-find-hunspell-dictionaries.  It starts as nil, and then the
> function iterates through the list of dictionaries produced by the
> command "hunspell -D nul", looking for a dictionary name that ends
> with a ".aff".  Here's the relevant portion of the code:
> 
>   (let ((hunspell-found-dicts
>        (split-string
>         (with-temp-buffer
>           (ispell-call-process ispell-program-name
>                                null-device
>                                t
>                                nil
>                                  ;; 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.
>                                "-D" null-device)
>           (buffer-string))
>         "[\n\r]+"
>         t))


I think that I found issue.  In my environment, `ispell-call-process'
returns empty string with `null-device'.

Output with and without `null-device' is shown below.



* With `null-device'

(with-temp-buffer
  (ispell-call-process ispell-program-name
                                       null-device
                                       t
                                       nil
                       ;; 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.
                                       "-D" null-device)
  (buffer-string))                      ; => ""


* Without `null-device',

(with-temp-buffer
  (ispell-call-process ispell-program-name
                                       null-device
                                       t
                                       nil
                       ;; 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.
                                       "-D")
  (buffer-string))                      ; => see below

"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_ZW
c:/msys64/mingw64/share/myspell/dicts/en_AG
...
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
Hunspell 1.6.2
"






reply via email to

[Prev in Thread] Current Thread [Next in Thread]