From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Gregor Grasselli Newsgroups: gmane.emacs.bugs Subject: bug#33606: 26.1; An error in ispell-find-hunspell-dictionaries breakes spell checking with hunspell Date: Tue, 4 Dec 2018 01:41:09 +0100 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000991662057c27832f" X-Trace: blaine.gmane.org 1543884257 1446 195.159.176.226 (4 Dec 2018 00:44:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 4 Dec 2018 00:44:17 +0000 (UTC) To: 33606@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 04 01:44:13 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gTyor-0000Dv-Kg for geb-bug-gnu-emacs@m.gmane.org; Tue, 04 Dec 2018 01:44:10 +0100 Original-Received: from localhost ([::1]:53506 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gTyqx-0006ha-Jj for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Dec 2018 19:46:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33283) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gTyqn-0006hK-1B for bug-gnu-emacs@gnu.org; Mon, 03 Dec 2018 19:46:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gTyqg-0001f1-KC for bug-gnu-emacs@gnu.org; Mon, 03 Dec 2018 19:46:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55370) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gTyqg-0001eJ-Br for bug-gnu-emacs@gnu.org; Mon, 03 Dec 2018 19:46:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gTyqg-0005u5-4u for bug-gnu-emacs@gnu.org; Mon, 03 Dec 2018 19:46:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Gregor Grasselli Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 04 Dec 2018 00:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 33606 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.154388435422666 (code B ref -1); Tue, 04 Dec 2018 00:46:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Dec 2018 00:45:54 +0000 Original-Received: from localhost ([127.0.0.1]:59628 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gTyqX-0005tU-Ap for submit@debbugs.gnu.org; Mon, 03 Dec 2018 19:45:54 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:49386) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gTylk-0005jy-Vb for submit@debbugs.gnu.org; Mon, 03 Dec 2018 19:40:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gTylc-0001uX-Vv for submit@debbugs.gnu.org; Mon, 03 Dec 2018 19:40:51 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:43020) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gTylb-0001sa-MP for submit@debbugs.gnu.org; Mon, 03 Dec 2018 19:40:48 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58979) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gTylZ-0005Ec-05 for bug-gnu-emacs@gnu.org; Mon, 03 Dec 2018 19:40:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gTylV-0001jv-7C for bug-gnu-emacs@gnu.org; Mon, 03 Dec 2018 19:40:44 -0500 Original-Received: from mail-ua1-x92e.google.com ([2607:f8b0:4864:20::92e]:44240) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gTylU-0001fU-Ev for bug-gnu-emacs@gnu.org; Mon, 03 Dec 2018 19:40:41 -0500 Original-Received: by mail-ua1-x92e.google.com with SMTP id d19so5145002uaq.11 for ; Mon, 03 Dec 2018 16:40:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=3/lJGUW6Wrx+OZ6Vvf3O4O5e/H5ptHgpxRTlwoGGvi8=; b=FR+I2ThEioiET9mP0YDgHKs1coQ3JU0zd5/Nt976Ri/5loBjtN08jEcMCE43kKakev UQLeW0CkD4UMohlmX5Gkgxo7GPfVlX6N9ptP7zBTB1+bkzmPp4WO9ipmPUQ6nfq7ENgd fWukrNrSlY/Q4W/4dydfA5cvtJdmUjyP9KzCM7GinZLI3vr8DZIHO8+EsfSl8bnaMI7e 71c1LqBrrjJfDIjjinCrPgttaFiHByY0HidQ6IzA3sRiQ4s+Ke5r2IpbQ4wUzN0UkUTS QKtU7MTsiaGPp6rAy1HkOGwlOJpvihwK5qYeG5NaAIVI05sCzIC4LOtJwz9cBe0uvGG7 J8og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=3/lJGUW6Wrx+OZ6Vvf3O4O5e/H5ptHgpxRTlwoGGvi8=; b=R5V1aO/iCAlbxep3V1ITl8MV9zc9IYq1n9hlxNFSPZTxcIXpHNjaF8/5a0LaP2xnIE S5gZIG4V127nexVZ2GHGnxQPjHJMtctp/fxXVW1v9v1vvbeWSHKkjmF4bvWQiiBsAQJI AiBx5FX5FQNPZ4dyDVfd9RTyAQUPwfZIyzecgMNIp/a6artpTMEgvCFmtWp8Asd8cOlY BxeWDeAWp+ujTR8gzHjyfTOglMvKpqHQjPi2UgKepy3raULKqT+M1U8nrOTiVx8TldTu rjvpb/a/WY1DTklnDeKeF3qAtxGqqzx2Q27CdnN3oRXc9v9tWW3PDCnMiIaC0QHMXU7Z RDGA== X-Gm-Message-State: AA+aEWaS0CJX/xE2FSBGz1Kq0eaIhEaLAEt0nUXkUQQB9dgAa3OqIXd5 PmMtRsuN8lvmGxW5SWPhCQ1/n+sTQ9YnbbYmwgG0w0Bw9Gs= X-Google-Smtp-Source: AFSGD/WNLmGEpRXRo/L1gQoaPQdkthXpVNyJTOpQfpDKnN+67zfqzro4LQ+Jp0FGGGW2ykZ/+soKWtOR4D6EBYckuw8= X-Received: by 2002:ab0:15ab:: with SMTP id i40mr7831959uae.70.1543884036968; Mon, 03 Dec 2018 16:40:36 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Mailman-Approved-At: Mon, 03 Dec 2018 19:45:52 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:153049 Archived-At: --000000000000991662057c27832f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Evaluating in the scratch buffer: (setq ispell-program-name "hunspell") "hunspell" (require 'ispell) ispell (ispell-find-hunspell-dictionaries) Causes this error: Debugger entered--Lisp error: (wrong-type-argument stringp nil) string-match("," nil 0) split-string(nil "," t) (let ((dict-list (split-string dict-key "," t)) (first-p t) (dict-arg "") otherchars-list) (let ((--dolist-tail-- dict-list)) (while --dolist-tail-- (let ((dict-key (car --dolist-tail--))) (let ((affix-file (car (cdr (assoc dict-key ispell-hunspell-dict-paths-alist))))) (if affix-file nil (error "ispell-phaf: No matching entry for %s in `ispell-hunspell-dict-paths-alist'.\n" dict-key)) (if (and first-p (not (file-exists-p affix-file))) (error "ispell-phaf: File \"%s\" not found.\n" affix-file)) (and first-p (setq first-p nil)) (let ((dict-name (file-name-sans-extension (file-name-nondirectory affix-file))) otherchars-string) (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents affix-file) (setq otherchars-string (save-excursion (goto-char (point-min)) (if (search-forward-regexp "^WORDCHARS +" nil t) (buffer-substring (point) (progn (end-of-line) (point)))))) (if otherchars-string (let* ((otherchars-string (substring otherchars-string 0 (string-match " +" otherchars-string))) (chars-list (append otherchars-string nil))) (setq chars-list (delq 32 chars-list)) (let ((--dolist-tail-- chars-list)) (while --dolist-tail-- (let ((ch (car --dolist-tail--))) (setq otherchars-list (if (member ch otherchars-list) otherchars-list (cons ch otherchars-list))) (setq --dolist-tail-- (cdr --dolist-tail--)))))))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (setq dict-arg (concat dict-arg (if (> (length dict-arg) 0) ",") dict-name)))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (list dict-key "[[:alpha:]]" "[^[:alpha:]]" (if otherchars-list (regexp-opt (mapcar (function char-to-string) otherchars-list)) "") t (list "-d" dict-arg) nil 'utf-8)) ispell-parse-hunspell-affix-file(nil) (setq hunspell-default-dict-entry (ispell-parse-hunspell-affix-file hunspell-default-dict)) (let ((hunspell-found-dicts (split-string (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (ispell-call-process ispell-program-name null-device t nil "-D") (buffer-string)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) "[\n\015]+" t)) hunspell-default-dict hunspell-default-dict-entry hunspell-multi-dict) (let ((--dolist-tail-- hunspell-found-dicts)) (while --dolist-tail-- (let ((dict (car --dolist-tail--))) (let* ((full-name (file-name-nondirectory dict)) (basename (file-name-sans-extension full-name)) (affix-file (concat dict ".aff"))) (if (string-match "\\.aff$" dict) (progn (if hunspell-default-dict (setq hunspell-multi-dict (concat (or hunspell-multi-dict (car hunspell-default-dict)) "," basename)) (setq affix-file dict) (setq hunspell-default-dict (list basename affix-file))) (ispell-print-if-debug "++ ispell-fhd: default dict-entry:%s name:%s basename:%s\n" dict full-name basename)) (if (and (not (assoc basename ispell-hunspell-dict-paths-alist)) (file-exists-p affix-file)) (let ((affix-file (expand-file-name affix-file))) (ispell-print-if-debug "++ ispell-fhd: dict-entry:%s name:%s basename:%s affix-file:%s\n" dict full-name basename affix-file) (setq ispell-hunspell-dict-paths-alist (let* ((va (list basename affix-file))) (if (member va ispell-hunspell-dict-paths-alist) ispell-hunspell-dict-paths-alist (cons va ispell-hunspell-dict-paths-alist))))) (ispell-print-if-debug "-- ispell-fhd: Skipping entry: %s\n" dict)))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (let (newlist) (let ((--dolist-tail-- ispell-dicts-name2locale-equivs-alist)) (while --dolist-tail-- (let ((dict (car --dolist-tail--))) (if (assoc (car dict) ispell-hunspell-dict-paths-alist) (ispell-print-if-debug "-- ispell-fhd: Excluding %s alias. Standalone dict found.\n" (car dict)) (setq newlist (if (member dict newlist) newlist (cons dict newlist)))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (setq ispell-dicts-name2locale-equivs-alist newlist)) (let ((--dolist-tail-- ispell-dicts-name2locale-equivs-alist)) (while --dolist-tail-- (let ((dict-equiv (car --dolist-tail--))) (let ((dict-equiv-key (car dict-equiv)) (dict-equiv-value (car (cdr dict-equiv))) (exclude-aliases (list "esperanto-tex" "francais7" "francais-tex" "norsk7-tex"))) (if (and (assoc dict-equiv-value ispell-hunspell-dict-paths-alist) (not (assoc dict-equiv-key ispell-hunspell-dict-paths-alist)) (not (member dict-equiv-key exclude-aliases))) (let ((affix-file (car (cdr (assoc dict-equiv-value ispell-hunspell-dict-paths-alist))))) (ispell-print-if-debug "++ ispell-fhd: Adding alias %s -> %s.\n" dict-equiv-key affix-file) (setq ispell-hunspell-dict-paths-alist (let* ((va (list dict-equiv-key affix-file))) (if (member va ispell-hunspell-dict-paths-alist) ispell-hunspell-dict-paths-alist (cons va ispell-hunspell-dict-paths-alist))))))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (setq hunspell-default-dict (or ispell-dictionary hunspell-multi-dict (car hunspell-default-dict))) (setq hunspell-default-dict-entry (ispell-parse-hunspell-affix-file hunspell-default-dict)) (setq ispell-hunspell-dictionary-alist (list (cons nil (cdr hunspell-default-dict-entry)))) (let ((--dolist-tail-- (mapcar (function car) ispell-hunspell-dict-paths-alist))) (while --dolist-tail-- (let ((dict (car --dolist-tail--))) (setq ispell-hunspell-dictionary-alist (let* ((va (if (string=3D dict hunspell-default-dict) hunspell-default-dict-entry (list dict)))) (if (member va ispell-hunspell-dictionary-alist) ispell-hunspell-dictionary-alist (cons va ispell-hunspell-dictionary-alist)))) (setq --dolist-tail-- (cdr --dolist-tail--)))))) ispell-find-hunspell-dictionaries() eval((ispell-find-hunspell-dictionaries) nil) elisp--eval-last-sexp(t) eval-last-sexp(t) eval-print-last-sexp(nil) funcall-interactively(eval-print-last-sexp nil) call-interactively(eval-print-last-sexp nil nil) command-execute(eval-print-last-sexp) The output of hunspell -D is: SEARCH PATH: .::/home/gregor/.config/libreoffice/4/user/wordbook::/usr/share/hunspell:/u= sr/share/myspell:/usr/share/myspell/dicts:/Library/Spelling:/home/gregor/. openoffice.org/3/user/wordbook:/home/gregor/.openoffice.org2/user/wordbook:= /home/gregor/.openoffice.org2.0/user/wordbook:/home/gregor/Library/Spelling= :/opt/openoffice.org/basis3.0/share/dict/ooo:/usr/lib/openoffice.org/basis3= .0/share/dict/ooo:/opt/openoffice.org2.4/share/dict/ooo:/usr/lib/openoffice= .org2.4/share/dict/ooo:/opt/openoffice.org2.3/share/dict/ooo:/usr/lib/openo= ffice.org2.3/share/dict/ooo:/opt/openoffice.org2.2/share/dict/ooo:/usr/lib/= openoffice.org2.2/share/dict/ooo:/opt/openoffice.org2.1/share/dict/ooo:/usr= /lib/openoffice.org2.1/share/dict/ooo:/opt/openoffice.org2.0/share/dict/ooo= :/usr/lib/openoffice.org2.0/share/dict/ooo AVAILABLE DICTIONARIES (path is not mandatory for -d option): /home/gregor/.config/libreoffice/4/user/wordbook/standard /usr/share/hunspell/en_PH /usr/share/hunspell/en_US-large /usr/share/hunspell/en_US /usr/share/myspell/dicts/en_PH /usr/share/myspell/dicts/en_US-large /usr/share/myspell/dicts/en_US /home/gregor/Library/Spelling/en_GB /home/gregor/Library/Spelling/sl_SI Which causes the error since none of the listed dictionary files ends in .aff, which causes the hunspell-default-dict to be nil on line 1179 in ispell.el, which causes the error in the next sexp. The consequences of this error are that spell checking does not work with hunspell and it is not possible to set a dictionary via ispell-change-dictionary. The quick and dirty fix of changing the line to (setq hunspell-default-dict (or "british" hunspell-multi-dict (car hunspell-default-dict))) (added "british" to the or) the problem goes away, and spell checking works as expected. hunspell version: $ hunspell --version @(#) International Ispell Version 3.2.06 (but really Hunspell 1.7.0) Copyright (C) 2002-2014 L=C3=A1szl=C3=B3 N=C3=A9meth. License: MPL/GPL/LGPL= . Based on OpenOffice.org's Myspell library. Myspell's copyright (C) Kevin Hendricks, 2001-2002, License: BSD. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, to the extent permitted by law. In GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2018-07-05 built on juergen Windowing system distributor 'The X.Org Foundation', version 11.0.12003000 Recent messages: Checking 105 files in /usr/share/emacs/26.1/lisp/obsolete... Checking for load-path shadows...done Mark set [2 times] Auto-saving...done Mark set Sending... Mark set [2 times] Sending via mail... Sending...done Making completion list... Configured using: 'configure --prefix=3D/usr --sysconfdir=3D/etc --libexecdir=3D/usr/lib --localstatedir=3D/var --with-x-toolkit=3Dgtk3 --with-xft --with-modules 'CFLAGS=3D-march=3Dx86-64 -mtune=3Dgeneric -O2 -pipe -fstack-protector-str= ong -fno-plt' CPPFLAGS=3D-D_FORTIFY_SOURCE=3D2 LDFLAGS=3D-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 MODULES THREADS LIBSYSTEMD LCMS2 Important settings: value of $LANG: en_GB.utf8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t 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 blink-cursor-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: (mailalias mailclient browse-url qp cus-edit cus-start cus-load wid-edit pp shadow sort mail-extr emacsbug message rmc puny seq dired dired-loaddefs format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils help-mode easymenu cl-print byte-opt bytecomp byte-compile cconv debug ispell easy-mmode cl-macs gv subr-x cl-loaddefs cl-lib jka-compr elec-pair time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame 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 minibuffer 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 dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 144202 35741) (symbols 48 22905 5) (miscs 40 134 517) (strings 32 35096 3840) (string-bytes 1 960874) (vectors 16 22356) (vector-slots 8 1236476 199416) (floats 8 69 414) (intervals 56 2733 16) (buffers 992 17)) --000000000000991662057c27832f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Evaluat= ing in the scratch buffer:

(setq ispell-program-name "hunspell&= quot;)
"hunspell"

(require 'ispell)
ispell
(ispell-find-hunspell-dictionaries)

Causes this error:

Debu= gger entered--Lisp error: (wrong-type-argument stringp nil)
=C2=A0 strin= g-match("," nil 0)
=C2=A0 split-string(nil "," t)=C2=A0 (let ((dict-list (split-string dict-key "," t)) (first-p = t) (dict-arg "") otherchars-list) (let ((--dolist-tail-- dict-lis= t)) (while --dolist-tail-- (let ((dict-key (car --dolist-tail--))) (let ((a= ffix-file (car (cdr (assoc dict-key ispell-hunspell-dict-paths-alist))))) (= if affix-file nil (error "ispell-phaf: No matching entry for %s in `is= pell-hunspell-dict-paths-alist'.\n" dict-key)) (if (and first-p (n= ot (file-exists-p affix-file))) (error "ispell-phaf: File \"%s\&q= uot; not found.\n" affix-file)) (and first-p (setq first-p nil)) (let = ((dict-name (file-name-sans-extension (file-name-nondirectory affix-file)))= otherchars-string) (let ((temp-buffer (generate-new-buffer " *temp*&q= uot;))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (prog= n (insert-file-contents affix-file) (setq otherchars-string (save-excursion= (goto-char (point-min)) (if (search-forward-regexp "^WORDCHARS +"= ; nil t) (buffer-substring (point) (progn (end-of-line) (point)))))) (if ot= herchars-string (let* ((otherchars-string (substring otherchars-string 0 (s= tring-match " +" otherchars-string))) (chars-list (append otherch= ars-string nil))) (setq chars-list (delq 32 chars-list)) (let ((--dolist-ta= il-- chars-list)) (while --dolist-tail-- (let ((ch (car --dolist-tail--))) = (setq otherchars-list (if (member ch otherchars-list) otherchars-list (cons= ch otherchars-list))) (setq --dolist-tail-- (cdr --dolist-tail--)))))))) (= and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (setq dict-arg = (concat dict-arg (if (> (length dict-arg) 0) ",") dict-name)))= ) (setq --dolist-tail-- (cdr --dolist-tail--))))) (list dict-key "[[:a= lpha:]]" "[^[:alpha:]]" (if otherchars-list (regexp-opt (map= car (function char-to-string) otherchars-list)) "") t (list "= ;-d" dict-arg) nil 'utf-8))
=C2=A0 ispell-parse-hunspell-affix-= file(nil)
=C2=A0 (setq hunspell-default-dict-entry (ispell-parse-hunspel= l-affix-file hunspell-default-dict))
=C2=A0 (let ((hunspell-found-dicts = (split-string (let ((temp-buffer (generate-new-buffer " *temp*"))= ) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (isp= ell-call-process ispell-program-name null-device t nil "-D") (buf= fer-string)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) &= quot;[\n\015]+" t)) hunspell-default-dict hunspell-default-dict-entry = hunspell-multi-dict) (let ((--dolist-tail-- hunspell-found-dicts)) (while -= -dolist-tail-- (let ((dict (car --dolist-tail--))) (let* ((full-name (file-= name-nondirectory dict)) (basename (file-name-sans-extension full-name)) (a= ffix-file (concat dict ".aff"))) (if (string-match "\\.aff$&= quot; dict) (progn (if hunspell-default-dict (setq hunspell-multi-dict (con= cat (or hunspell-multi-dict (car hunspell-default-dict)) "," base= name)) (setq affix-file dict) (setq hunspell-default-dict (list basename af= fix-file))) (ispell-print-if-debug "++ ispell-fhd: default dict-entry:= %s name:%s basename:%s\n" dict full-name basename)) (if (and (not (ass= oc basename ispell-hunspell-dict-paths-alist)) (file-exists-p affix-file)) = (let ((affix-file (expand-file-name affix-file))) (ispell-print-if-debug &q= uot;++ ispell-fhd: dict-entry:%s name:%s basename:%s affix-file:%s\n" = dict full-name basename affix-file) (setq ispell-hunspell-dict-paths-alist = (let* ((va (list basename affix-file))) (if (member va ispell-hunspell-dict= -paths-alist) ispell-hunspell-dict-paths-alist (cons va ispell-hunspell-dic= t-paths-alist))))) (ispell-print-if-debug "-- ispell-fhd: Skipping ent= ry: %s\n" dict)))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (le= t (newlist) (let ((--dolist-tail-- ispell-dicts-name2locale-equivs-alist)) = (while --dolist-tail-- (let ((dict (car --dolist-tail--))) (if (assoc (car = dict) ispell-hunspell-dict-paths-alist) (ispell-print-if-debug "-- isp= ell-fhd: Excluding %s alias.=C2=A0 Standalone dict found.\n" (car dict= )) (setq newlist (if (member dict newlist) newlist (cons dict newlist)))) (= setq --dolist-tail-- (cdr --dolist-tail--))))) (setq ispell-dicts-name2loca= le-equivs-alist newlist)) (let ((--dolist-tail-- ispell-dicts-name2locale-e= quivs-alist)) (while --dolist-tail-- (let ((dict-equiv (car --dolist-tail--= ))) (let ((dict-equiv-key (car dict-equiv)) (dict-equiv-value (car (cdr dic= t-equiv))) (exclude-aliases (list "esperanto-tex" "francais7= " "francais-tex" "norsk7-tex"))) (if (and (assoc d= ict-equiv-value ispell-hunspell-dict-paths-alist) (not (assoc dict-equiv-ke= y ispell-hunspell-dict-paths-alist)) (not (member dict-equiv-key exclude-al= iases))) (let ((affix-file (car (cdr (assoc dict-equiv-value ispell-hunspel= l-dict-paths-alist))))) (ispell-print-if-debug "++ ispell-fhd: Adding = alias %s -> %s.\n" dict-equiv-key affix-file) (setq ispell-hunspell= -dict-paths-alist (let* ((va (list dict-equiv-key affix-file))) (if (member= va ispell-hunspell-dict-paths-alist) ispell-hunspell-dict-paths-alist (con= s va ispell-hunspell-dict-paths-alist))))))) (setq --dolist-tail-- (cdr --d= olist-tail--))))) (setq hunspell-default-dict (or ispell-dictionary hunspel= l-multi-dict (car hunspell-default-dict))) (setq hunspell-default-dict-entr= y (ispell-parse-hunspell-affix-file hunspell-default-dict)) (setq ispell-hu= nspell-dictionary-alist (list (cons nil (cdr hunspell-default-dict-entry)))= ) (let ((--dolist-tail-- (mapcar (function car) ispell-hunspell-dict-paths-= alist))) (while --dolist-tail-- (let ((dict (car --dolist-tail--))) (setq i= spell-hunspell-dictionary-alist (let* ((va (if (string=3D dict hunspell-def= ault-dict) hunspell-default-dict-entry (list dict)))) (if (member va ispell= -hunspell-dictionary-alist) ispell-hunspell-dictionary-alist (cons va ispel= l-hunspell-dictionary-alist)))) (setq --dolist-tail-- (cdr --dolist-tail--)= )))))
=C2=A0 ispell-find-hunspell-dictionaries()
=C2=A0 eval((ispell-= find-hunspell-dictionaries) nil)
=C2=A0 elisp--eval-last-sexp(t)
=C2= =A0 eval-last-sexp(t)
=C2=A0 eval-print-last-sexp(nil)
=C2=A0 funcall= -interactively(eval-print-last-sexp nil)
=C2=A0 call-interactively(eval-= print-last-sexp nil nil)
=C2=A0 command-execute(eval-print-last-sexp)

The output of hunspell -D is:

SEARCH PATH:
.::/home/greg= or/.config/libreoffice/4/user/wordbook::/usr/share/hunspell:/usr/share/mysp= ell:/usr/share/myspell/dicts:/Library/Spelling:/home/gregor/.openoffice.org/3/user/wordb= ook:/home/gregor/.openoffice.org2/user/wordbook:/home/gregor/.openoffice.or= g2.0/user/wordbook:/home/gregor/Library/Spelling:/opt/openoffice.org/basis3= .0/share/dict/ooo:/usr/lib/openoffice.org/basis3.0/share/dict/ooo:/opt/open= office.org2.4/share/dict/ooo:/usr/lib/openoffice.org2.4/share/dict/ooo:/opt= /openoffice.org2.3/share/dict/ooo:/usr/lib/openoffice.org2.3/share/dict/ooo= :/opt/openoffice.org2.2/share/dict/ooo:/usr/lib/openoffice.org2.2/share/dic= t/ooo:/opt/openoffice.org2.1/share/dict/ooo:/usr/lib/openoffice.org2.1/shar= e/dict/ooo:/opt/openoffice.org2.0/share/dict/ooo:/usr/lib/openoffice.org2.0= /share/dict/ooo
AVAILABLE DICTIONARIES (path is not mandatory for -d= option):
/home/gregor/.config/libreoffice/4/user/wordbook/standard
/= usr/share/hunspell/en_PH
/usr/share/hunspell/en_US-large
/usr/share/h= unspell/en_US
/usr/share/myspell/dicts/en_PH
/usr/share/myspell/dicts= /en_US-large
/usr/share/myspell/dicts/en_US
/home/gregor/Library/Spel= ling/en_GB
/home/gregor/Library/Spelling/sl_SI


Which causes t= he error since none of the listed dictionary files ends in
.aff, which c= auses the hunspell-default-dict to be nil on line 1179 in
ispell.el, whi= ch causes the error in the next sexp. The consequences of
this error are= that spell checking does not work with hunspell and it is
not possible = to set a dictionary via ispell-change-dictionary.

The quick and dirt= y fix of changing the line to

(setq hunspell-default-dict (or "= ;british"
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 = =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 hunspell-multi-dict
=C2=A0= =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 (car hunspell-default-dict)))

(added "bri= tish" to the or) the problem goes away, and spell checking works
=
as expected.

hunspel= l version:
$ hunspell --version
@(#) International Ispell Vers= ion 3.2.06 (but really Hunspell 1.7.0)


Copyright (C) 2002-2014 L= =C3=A1szl=C3=B3 N=C3=A9meth. License: MPL/GPL/LGPL.

Based on OpenOff= ice.org's Myspell library.
Myspell's copyright (C) Kevin Hendric= ks, 2001-2002, License: BSD.

This is free software; see the source f= or copying conditions.=C2=A0 There is NO
warranty; not even for MERCHANT= ABILITY or FITNESS FOR A PARTICULAR PURPOSE,
to the extent permitted by = law.


In GNU Emacs 26.1 (build 1, x86_64-p= c-linux-gnu, GTK+ Version 3.22.30)
=C2=A0of 2018-07-05 built on juergen<= br>Windowing system distributor 'The X.Org Foundation', version 11.= 0.12003000
Recent messages:
Checking 105 files in /usr/share/emacs/26= .1/lisp/obsolete...
Checking for load-path shadows...done
Mark set [2= times]
Auto-saving...done
Mark set
Sending...
Mark set [2 time= s]
Sending via mail...
Sending...done
Making completion list...
Configured using:
=C2=A0'configure --prefix=3D/usr --sysconfdir= =3D/etc --libexecdir=3D/usr/lib
=C2=A0--localstatedir=3D/var --with-x-to= olkit=3Dgtk3 --with-xft --with-modules
=C2=A0'CFLAGS=3D-march=3Dx86-= 64 -mtune=3Dgeneric -O2 -pipe -fstack-protector-strong
=C2=A0-fno-plt= 9; CPPFLAGS=3D-D_FORTIFY_SOURCE=3D2
=C2=A0LDFLAGS=3D-Wl,-O1,--sort-commo= n,--as-needed,-z,relro,-z,now'

Configured features:
XPM JPEG = TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
ACL GNUTLS= LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS
GTK3 X11 = MODULES THREADS LIBSYSTEMD LCMS2

Important settings:
=C2=A0 value= of $LANG: en_GB.utf8
=C2=A0 locale-coding-system: utf-8-unix

Maj= or mode: Lisp Interaction

Minor modes in effect:
=C2=A0 tooltip-m= ode: t
=C2=A0 global-eldoc-mode: t
=C2=A0 eldoc-mode: t
=C2=A0 ele= ctric-indent-mode: t
=C2=A0 mouse-wheel-mode: t
=C2=A0 tool-bar-mode:= t
=C2=A0 menu-bar-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 = global-font-lock-mode: t
=C2=A0 font-lock-mode: t
=C2=A0 blink-cursor= -mode: t
=C2=A0 auto-composition-mode: t
=C2=A0 auto-encryption-mode:= t
=C2=A0 auto-compression-mode: t
=C2=A0 line-number-mode: t
=C2= =A0 transient-mark-mode: t

Load-path shadows:
None found.

= Features:
(mailalias mailclient browse-url qp cus-edit cus-start cus-loa= d wid-edit
pp shadow sort mail-extr emacsbug message rmc puny seq dired<= br>dired-loaddefs format-spec rfc822 mml mml-sec password-cache epa derived=
epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies
mm= -encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2= 047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils help-mode
easymenu = cl-print byte-opt bytecomp byte-compile cconv debug ispell
easy-mmode cl= -macs gv subr-x cl-loaddefs cl-lib jka-compr elec-pair
time-date mule-ut= il tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type m= wheel term/x-win x-win term/common-win x-dnd tool-bar
dnd fontset image = regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode= lisp-mode prog-mode register page menu-bar
rfn-eshadow isearch timer se= lect scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/= tty-colors frame cl-generic cham georgian
utf-8-lang misc-lang vietnames= e tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew gree= k romanian slovak czech european
ethiopic indian cyrillic chinese compos= ite charscript charprop
case-table epa-hook jka-cmpr-hook help simple ab= brev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-f= ace macroexp files
text-properties overlay sha1 md5 base64 format env co= de-pages mule
custom widget hashtable-print-readable backquote dbusbind = inotify lcms2
dynamic-setting system-font-setting font-render-setting mo= ve-toolbar gtk
x-toolkit x multi-tty make-network-process emacs)

= Memory information:
((conses 16 144202 35741)
=C2=A0(symbols 48 22905= 5)
=C2=A0(miscs 40 134 517)
=C2=A0(strings 32 35096 3840)
=C2=A0(= string-bytes 1 960874)
=C2=A0(vectors 16 22356)
=C2=A0(vector-slots 8= 1236476 199416)
=C2=A0(floats 8 69 414)
=C2=A0(intervals 56 2733 16)=
=C2=A0(buffers 992 17))

--000000000000991662057c27832f--