From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 21 11:04:46 2017 Received: (at submit) by debbugs.gnu.org; 21 Feb 2017 16:04:46 +0000 Received: from localhost ([127.0.0.1]:49089 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgCvl-0004SL-WC for submit@debbugs.gnu.org; Tue, 21 Feb 2017 11:04:46 -0500 Received: from eggs.gnu.org ([208.118.235.92]:38963) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cg6bJ-0001bh-ON for submit@debbugs.gnu.org; Tue, 21 Feb 2017 04:19:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cg6bC-0000GK-Tg for submit@debbugs.gnu.org; Tue, 21 Feb 2017 04:19:08 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:46943) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cg6bC-0000GG-RA for submit@debbugs.gnu.org; Tue, 21 Feb 2017 04:19:06 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58160) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cg6bB-0007e8-3A for bug-gnu-emacs@gnu.org; Tue, 21 Feb 2017 04:19:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cg6b6-0000EW-Us for bug-gnu-emacs@gnu.org; Tue, 21 Feb 2017 04:19:05 -0500 Received: from mail-wr0-f170.google.com ([209.85.128.170]:35450) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cg6b6-0000E7-Kw for bug-gnu-emacs@gnu.org; Tue, 21 Feb 2017 04:19:00 -0500 Received: by mail-wr0-f170.google.com with SMTP id s27so31219445wrb.2 for ; Tue, 21 Feb 2017 01:19:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=EdrVdvkndEsNA2qeuNj//ljNu/4k28sZHrc/cywXD4o=; b=Nz+mcmRBxqJaOd+h2jBS7GliakRHaDeeVNk9EHx1U/waixGfK2++9sq2RMmMaAp6mH vn7E/WfOuD48Z1Tu9suI3yz+/TVhk7K0s2frx+Yeko3BIp0Sn1R2bE9qgtc/0y1oXdks Na6R/y1CWLNG3/vs7FFWgftjttWJI0mjy6Q6x2751ptj4bYquxCkUha62IU3tdj3Pmv7 11GElVTsUujzzXkNE2JlvTrYBrvwbNlpfOULd11+L9L7RgDeK1g2tdV5PzoLxORLt0Wc 3wn1cJTqIyYC30IjV/Shhn8jg/jh7Wn956r6ZY0Wx953xFDNmV2jNGnG/AOEgaCxl84C 4ueQ== X-Gm-Message-State: AMke39mwy7jkCz9gDKCaEhCGc0G4VMykOQSw8E7dzEn/WGMngHSQgby6f64yiS6bOLP/gg== X-Received: by 10.223.128.202 with SMTP id 68mr20930018wrl.92.1487668739217; Tue, 21 Feb 2017 01:18:59 -0800 (PST) Received: from caroline.localdomain (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id g6sm16781537wmc.30.2017.02.21.01.18.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Feb 2017 01:18:58 -0800 (PST) Received: by caroline.localdomain (Postfix, from userid 1000) id F03701200AA; Tue, 21 Feb 2017 10:18:57 +0100 (CET) Date: Tue, 21 Feb 2017 10:18:57 +0100 From: Martin Kletzander To: bug-gnu-emacs@gnu.org Subject: 25.2; ispell doesn't parse hunspell dictionaries properly Message-ID: <20170221091857.GA4096@wheatley> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 21 Feb 2017 11:04:44 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.8 (---) Hello, I have hunspell installed in the system with two default dictionaries. I was trying to setup ispell so that it works properly and I couldn't. So I started looking at the sources for ispell and I found one part that can't work. It may be intentional, but the real problem is that I can't use spellchecker at all. When `emacs -Q` is ran, it is enough to do M-$ with *no additinal settings*. The error message (and following messages for consecutive M-$) are visible below in 'Recent messages'. I could only trace the problem to the ispell.el where the error is printed. The reason for that is probably the fact that `hunspell -D` has this output on my system: SEARCH PATH: .::/usr/share/hunspell:/usr/share/myspell:/usr/share/myspell/dicts:/Library/Spelling:/home/nert/.openoffice.org/3/user/wordbook:.openoffice.org2/user/wordbook:.openoffice.org2.0/user/wordbook: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/openoffice.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): /usr/share/hunspell/cs_CZ /usr/share/hunspell/en_CA /usr/share/hunspell/en_ZA /usr/share/hunspell/en_US /usr/share/hunspell/en_GB /usr/share/hunspell/en_AU /usr/share/myspell/cs_CZ /usr/share/myspell/en_CA /usr/share/myspell/hyph_cs_CZ /usr/share/myspell/en_ZA /usr/share/myspell/en_US /usr/share/myspell/en_GB /usr/share/myspell/en_AU /usr/share/myspell/hyph_en_GB LOADED DICTIONARY: /usr/share/hunspell/en_GB.aff /usr/share/hunspell/en_GB.dic LOADED DICTIONARY: /usr/share/hunspell/cs_CZ.aff /usr/share/hunspell/cs_CZ.dic Hunspell 1.6.0 I tried various additional settings, setting the multi-dic for hunspell, setting default dictionaries and nothing helped. Can't ispell just detect all the .aff files and then automatically use en_GB,cs_CZ as a multi-dictionary for hunspell? That's what I want anyway. Let me know if I can provide any more information and thank you very much in advance for looking into this issue. Martin P.S.: I seem to recall my previous configuration that made this working, but it was probably before lot of emacs and hunspell upgrades. The spellchecking is not working for some time for me, it's just now that I started looking into this issue. P.P.S.: If I have (flyspell-mode) in a 'message-mode-hook and I start emacsclient with a file that automatically starts in message-mode, then emacs crashes due to the default dictionary being nil or something in that regard. In GNU Emacs 25.2.1 (x86_64-pc-linux-gnu) of 2017-02-20 built on caroline System Description: Gentoo Base System release 2.3 Configured using: 'configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --docdir=/usr/share/doc/emacs-25.2_rc1 --htmldir=/usr/share/doc/emacs-25.2_rc1/html --libdir=/usr/lib64 --program-suffix=-emacs-25 --infodir=/usr/share/info/emacs-25 --localstatedir=/var --enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp --with-gameuser=:gamestat --without-compress-install --with-file-notification=inotify --enable-acl --with-dbus --without-modules --with-gpm --without-hesiod --with-kerberos --with-kerberos5 --with-xml2 --without-selinux --with-gnutls --with-wide-int --with-zlib --with-sound=alsa --with-x --without-ns --without-gconf --without-gsettings --with-toolkit-scroll-bars --with-gif --with-jpeg --with-png --with-rsvg --with-tiff --with-xpm --with-imagemagick --with-xft --without-cairo --without-libotf --without-m17n-flt --with-x-toolkit=no GENTOO_PACKAGE=app-editors/emacs-25.2_rc1 'CFLAGS=-O2 -pipe -ggdb -march=native' CPPFLAGS= 'LDFLAGS=-Wl,-O1 -Wl,--as-needed'' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS NOTIFY ACL GNUTLS LIBXML2 FREETYPE XFT ZLIB X11 Important settings: value of $LC_CTYPE: en_GB.utf8 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 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 Recent messages: ispell-find-hunspell-dictionaries: ispell-fhd: Default dict already defined as (en_GB /usr/share/hunspell/en_GB.aff). Not using /usr/share/hunspell/cs_CZ.aff. Starting new Ispell process /usr/bin/hunspell with default dictionary... split-string: Wrong type argument: stringp, nil next-line: End of buffer Starting new Ispell process /usr/bin/hunspell with default dictionary... split-string: Wrong type argument: stringp, nil Starting new Ispell process /usr/bin/hunspell with default dictionary... split-string: Wrong type argument: stringp, nil Starting new Ispell process /usr/bin/hunspell with default dictionary... split-string: Wrong type argument: stringp, nil Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message dired format-spec rfc822 mml mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns help-mode easymenu cl-loaddefs pcase cl-lib mail-prsvr mail-utils ispell term/xterm xterm time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core 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 charscript case-table epa-hook jka-cmpr-hook help simple abbrev 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 dynamic-setting font-render-setting x multi-tty make-network-process emacs) Memory information: ((conses 16 91424 6545) (symbols 48 20210 0) (miscs 40 43 160) (strings 32 15556 4780) (string-bytes 1 446860) (vectors 16 10101) (vector-slots 8 389043 14706) (floats 8 167 358) (intervals 56 258 0) (buffers 976 18) (heap 1024 13197 776)) From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 21 12:23:52 2017 Received: (at 25830) by debbugs.gnu.org; 21 Feb 2017 17:23:52 +0000 Received: from localhost ([127.0.0.1]:49142 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgEAJ-0006Kn-RC for submit@debbugs.gnu.org; Tue, 21 Feb 2017 12:23:52 -0500 Received: from eggs.gnu.org ([208.118.235.92]:44542) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgEAI-0006Kb-0n for 25830@debbugs.gnu.org; Tue, 21 Feb 2017 12:23:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cgEAC-0004bt-6Q for 25830@debbugs.gnu.org; Tue, 21 Feb 2017 12:23:44 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37308) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgEAC-0004bp-3N; Tue, 21 Feb 2017 12:23:44 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2138 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cgEAB-0007Xr-2S; Tue, 21 Feb 2017 12:23:43 -0500 Date: Tue, 21 Feb 2017 19:23:08 +0200 Message-Id: <83k28jo3ur.fsf@gnu.org> From: Eli Zaretskii To: Martin Kletzander In-reply-to: <20170221091857.GA4096@wheatley> (message from Martin Kletzander on Tue, 21 Feb 2017 10:18:57 +0100) Subject: Re: bug#25830: 25.2; ispell doesn't parse hunspell dictionaries properly References: <20170221091857.GA4096@wheatley> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 25830 Cc: 25830@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Tue, 21 Feb 2017 10:18:57 +0100 > From: Martin Kletzander > > I have hunspell installed in the system with two default dictionaries. Please tell more details about the meaning of this. Do you mean you wanted to start Hunspell with 2 dictionaries so that it could spell-check text that mixes 2 different languages? Or did you mean something else? IOW, the "with two default dictionaries" part confuses me. > I was trying to setup ispell so that it works properly and I couldn't. > So I started looking at the sources for ispell and I found one part that > can't work. It may be intentional, but the real problem is that I can't > use spellchecker at all. When `emacs -Q` is ran, it is enough to do M-$ > with *no additinal settings*. The error message (and following messages > for consecutive M-$) are visible below in 'Recent messages'. > > I could only trace the problem to the ispell.el where the error is > printed. The reason for that is probably the fact that `hunspell -D` > has this output on my system: I don't immediately see anything wrong here. Does spell-checking work if you set it up to use just one default dictionary, as usual? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 21 15:25:04 2017 Received: (at 25830) by debbugs.gnu.org; 21 Feb 2017 20:25:04 +0000 Received: from localhost ([127.0.0.1]:49263 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgGzf-0003ti-Nb for submit@debbugs.gnu.org; Tue, 21 Feb 2017 15:25:04 -0500 Received: from mail-wr0-f178.google.com ([209.85.128.178]:35363) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgGzd-0003t8-DI for 25830@debbugs.gnu.org; Tue, 21 Feb 2017 15:25:01 -0500 Received: by mail-wr0-f178.google.com with SMTP id s27so42448738wrb.2 for <25830@debbugs.gnu.org>; Tue, 21 Feb 2017 12:25:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=lI8np73TCVVrTO+yc/0acYA3F4NDkq2ANNastjFPmlU=; b=ZxN6y3mu1WFrn3AkCl2cELDgB3MKkGxtPdlg3l9sCB8/RTOweWjPun0TpsMtdexxT+ SwnlCSBV0/i/h80/xQKV3W319m0oTKG+hFTiqVQOuEsDKukM5GMeQFzekeJB8FToIM/H NJrnoSitVu82fAkSU+hvBCQZ6HiJ3ZqmG7eZGuX8DDYoQsmgNpaG6jPKQwO0D3zlPSvd aOOpX2dAfFuglfoasYTs2iziPlZlkQW3cLes/TkwnZmRsaMP/748QCsFZVXxvftOVvnp 8m2hMWcuxDhCLPIrfmGVY5yLWdvbrSmyotCBC1cpmIec3ftRfEMI6fKBWz9Xc4RyKNqR bMOg== X-Gm-Message-State: AMke39keaOKeeuwNAPnGj0unAPvvlE0f6qA2PgbbreKQTCA1YXKCF0/yPjSgp9r78/1RWg== X-Received: by 10.223.173.109 with SMTP id p100mr20160928wrc.168.1487708695793; Tue, 21 Feb 2017 12:24:55 -0800 (PST) Received: from wheatley.localdomain (cock.kentus.net. [95.82.177.71]) by smtp.gmail.com with ESMTPSA id 136sm18830154wms.32.2017.02.21.12.24.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Feb 2017 12:24:55 -0800 (PST) Received: by wheatley.localdomain (Postfix, from userid 1000) id 140907E0049; Tue, 21 Feb 2017 21:24:54 +0100 (CET) Date: Tue, 21 Feb 2017 21:24:54 +0100 From: Martin Kletzander To: Eli Zaretskii Subject: Re: bug#25830: 25.2; ispell doesn't parse hunspell dictionaries properly Message-ID: <20170221202454.GA30086@wheatley> References: <20170221091857.GA4096@wheatley> <83k28jo3ur.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <83k28jo3ur.fsf@gnu.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 25830 Cc: 25830@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.1 (/) On Tue, Feb 21, 2017 at 07:23:08PM +0200, Eli Zaretskii wrote: >> Date: Tue, 21 Feb 2017 10:18:57 +0100 >> From: Martin Kletzander >> >> I have hunspell installed in the system with two default dictionaries. > >Please tell more details about the meaning of this. Do you mean you >wanted to start Hunspell with 2 dictionaries so that it could >spell-check text that mixes 2 different languages? Or did you mean >something else? IOW, the "with two default dictionaries" part >confuses me. > Sorry, Idon't know spellcheckers that much. Ilooked at hunspell's man page, learned a bit, so I'll try to explain it better this time. I have multiple dictionaries installed. Hunspell finds all of them, but selects *two* of them. According to the man page, that is done according to LC_ALL, LC_MESSAGES, and LANG environment variables. Becuase hunspell selects more of them (which is something I want it to do), it lists both of them as "LOADED DICTIONARY", ispell parses those (actually just lines ending with ".aff") and if it finds more than one, it errors out. >> I was trying to setup ispell so that it works properly and I couldn't. >> So I started looking at the sources for ispell and I found one part that >> can't work. It may be intentional, but the real problem is that I can't >> use spellchecker at all. When `emacs -Q` is ran, it is enough to do M-$ >> with *no additinal settings*. The error message (and following messages >> for consecutive M-$) are visible below in 'Recent messages'. >> >> I could only trace the problem to the ispell.el where the error is >> printed. The reason for that is probably the fact that `hunspell -D` >> has this output on my system: > >I don't immediately see anything wrong here. Does spell-checking work >if you set it up to use just one default dictionary, as usual? > That's another problem. Since the initialization itself fails, it errors out before it checks any set variables. So no matter what I set up, it ends up with the same behaviour. If I remove the second dictionary from my system, however, it works. I tried workaround with a wrapper around hunspell that modifies the output of `hunspell -D` and it works, but that's really ugly. >Thanks. Thank you, Martin From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 21 15:44:48 2017 Received: (at 25830) by debbugs.gnu.org; 21 Feb 2017 20:44:48 +0000 Received: from localhost ([127.0.0.1]:49289 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgHIm-0004Mz-8h for submit@debbugs.gnu.org; Tue, 21 Feb 2017 15:44:48 -0500 Received: from eggs.gnu.org ([208.118.235.92]:43260) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgHIk-0004Mm-HX for 25830@debbugs.gnu.org; Tue, 21 Feb 2017 15:44:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cgHIc-0000sb-6p for 25830@debbugs.gnu.org; Tue, 21 Feb 2017 15:44:41 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:40116) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgHIc-0000sW-39; Tue, 21 Feb 2017 15:44:38 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2579 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cgHIb-0004JL-BP; Tue, 21 Feb 2017 15:44:37 -0500 Date: Tue, 21 Feb 2017 22:44:03 +0200 Message-Id: <83fuj7tgto.fsf@gnu.org> From: Eli Zaretskii To: Martin Kletzander In-reply-to: <20170221202454.GA30086@wheatley> (message from Martin Kletzander on Tue, 21 Feb 2017 21:24:54 +0100) Subject: Re: bug#25830: 25.2; ispell doesn't parse hunspell dictionaries properly References: <20170221091857.GA4096@wheatley> <83k28jo3ur.fsf@gnu.org> <20170221202454.GA30086@wheatley> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 25830 Cc: 25830@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Tue, 21 Feb 2017 21:24:54 +0100 > From: Martin Kletzander > Cc: 25830@debbugs.gnu.org > > I have multiple dictionaries installed. Hunspell finds all of them, but > selects *two* of them. According to the man page, that is done > according to LC_ALL, LC_MESSAGES, and LANG environment variables. What are the values of those environment variables? > Becuase hunspell selects more of them (which is something I want it to > do), it lists both of them as "LOADED DICTIONARY", ispell parses those > (actually just lines ending with ".aff") and if it finds more than one, > it errors out. The way to run Hunspell with more than one dictionary is hinted upon in the doc string of the command ispell-hunspell-add-multi-dic. After you invoke that command and specify the dictionaries you want to use (e.g., in your case "en_GB,cs_CZ"), type this: M-x ispell-change-dictionary RET en_GB,cs_CZ RET Then try spell-checking. It should work with that arrangement. It is possible that you will first need to modify your environment variables to prevent Hunspell from loading more than one dictionary by default. From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 22 05:40:33 2017 Received: (at 25830) by debbugs.gnu.org; 22 Feb 2017 10:40:34 +0000 Received: from localhost ([127.0.0.1]:49643 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgULZ-00015P-Jt for submit@debbugs.gnu.org; Wed, 22 Feb 2017 05:40:33 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:33299) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgULX-00015C-RW for 25830@debbugs.gnu.org; Wed, 22 Feb 2017 05:40:32 -0500 Received: by mail-wr0-f193.google.com with SMTP id s27so950886wrb.0 for <25830@debbugs.gnu.org>; Wed, 22 Feb 2017 02:40:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=0NPSNQbaNXHfmnL0+BGjm/0DvPIF+JqxNrjVNM3gdbg=; b=phDuvpdKgvBg59dFPT585i4QBcn8SMdbMC7MfTv7Ujwl6/qyZklb618Z8Xk0M2z9Ko 8avXT6QCw92ltlwNJyTyZB2WmB26oRkdTiY2E8W+L1sjK3LZggFehAd1peUWvS6fcdew ji3pe0R+Poc48vuVBWc3YvpJWBYwwiblRFoiuLteNgww7kl0bs7nCzo5r5wn2PYS02XO 8Hl3gCcl51hF72ds2KYvZg375TtF3SxTfMZYu+DaYUFu3i3gUo23MikKi2IaTV6dqIs7 +RE4ryWqkSnVrkas/hZsksjqTinAgqevH5J0h4SIWIfnT7eTyAlJ3E7QNksqZdPjbgGP 1xQw== X-Gm-Message-State: AMke39nPYpVU5xZqJ+K1n79oDJ59HHIyEoZenVptIgZPumF+b31VRYHn7R/pDHRQXzX+xA== X-Received: by 10.223.154.210 with SMTP id a76mr21665186wrc.193.1487760026088; Wed, 22 Feb 2017 02:40:26 -0800 (PST) Received: from caroline.localdomain (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id n13sm661781wra.17.2017.02.22.02.40.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Feb 2017 02:40:25 -0800 (PST) Received: by caroline.localdomain (Postfix, from userid 1000) id 625FE120380; Wed, 22 Feb 2017 11:40:25 +0100 (CET) Date: Wed, 22 Feb 2017 11:40:25 +0100 From: Martin Kletzander To: Eli Zaretskii Subject: Re: bug#25830: 25.2; ispell doesn't parse hunspell dictionaries properly Message-ID: <20170222104025.GA3557@wheatley> References: <20170221091857.GA4096@wheatley> <83k28jo3ur.fsf@gnu.org> <20170221202454.GA30086@wheatley> <83fuj7tgto.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <83fuj7tgto.fsf@gnu.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 25830 Cc: 25830@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.1 (/) On Tue, Feb 21, 2017 at 10:44:03PM +0200, Eli Zaretskii wrote: >> Date: Tue, 21 Feb 2017 21:24:54 +0100 >> From: Martin Kletzander >> Cc: 25830@debbugs.gnu.org >> >> I have multiple dictionaries installed. Hunspell finds all of them, but >> selects *two* of them. According to the man page, that is done >> according to LC_ALL, LC_MESSAGES, and LANG environment variables. > >What are the values of those environment variables? > $ locale LANG=en_GB.utf8 LC_CTYPE=en_GB.utf8 LC_NUMERIC="en_GB.utf8" LC_TIME="en_GB.utf8" LC_COLLATE="en_GB.utf8" LC_MONETARY="en_GB.utf8" LC_MESSAGES="en_GB.utf8" LC_PAPER="en_GB.utf8" LC_NAME="en_GB.utf8" LC_ADDRESS="en_GB.utf8" LC_TELEPHONE="en_GB.utf8" LC_MEASUREMENT="en_GB.utf8" LC_IDENTIFICATION="en_GB.utf8" LC_ALL= Honestly, I don't know where it takes the cs_CZ from, *but* if it didn't, I would have to modify it so that it does. Simply because that's what I want it to do by default. >> Becuase hunspell selects more of them (which is something I want it to >> do), it lists both of them as "LOADED DICTIONARY", ispell parses those >> (actually just lines ending with ".aff") and if it finds more than one, >> it errors out. > >The way to run Hunspell with more than one dictionary is hinted upon >in the doc string of the command ispell-hunspell-add-multi-dic. After If I try M-x ispell-change-dictionary RET en_GB,cs_CZ RET I get the same error. >you invoke that command and specify the dictionaries you want to use >(e.g., in your case "en_GB,cs_CZ"), type this: > > M-x ispell-change-dictionary RET en_GB,cs_CZ RET > M-x ispell-change-dictionary RET errors out with the same error. If I run it again, there are no dictionaries loaded, so I cannot use any parameter for it except 'default'. >Then try spell-checking. It should work with that arrangement. It is >possible that you will first need to modify your environment variables >to prevent Hunspell from loading more than one dictionary by default. Why would I need to do that? For me hunspell is working as I want it to, exactly. I honestly think that ispell should accept multiple dictionaries and either behave like a multi-dic by default or just not error out when it parses the second dictionary (less favourable option, though). I would love to add that functionality, but I'm not that familiar with the code, unfortunately =( Thanks, Martin From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 22 11:21:02 2017 Received: (at 25830) by debbugs.gnu.org; 22 Feb 2017 16:21:02 +0000 Received: from localhost ([127.0.0.1]:51364 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgZf4-0002g1-4e for submit@debbugs.gnu.org; Wed, 22 Feb 2017 11:21:02 -0500 Received: from eggs.gnu.org ([208.118.235.92]:50663) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgZf2-0002fO-JS for 25830@debbugs.gnu.org; Wed, 22 Feb 2017 11:21:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cgZeu-0000us-8y for 25830@debbugs.gnu.org; Wed, 22 Feb 2017 11:20:55 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52793) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgZeu-0000un-4x; Wed, 22 Feb 2017 11:20:52 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3182 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cgZet-0006cx-Cf; Wed, 22 Feb 2017 11:20:51 -0500 Date: Wed, 22 Feb 2017 18:20:19 +0200 Message-Id: <83d1eatcxo.fsf@gnu.org> From: Eli Zaretskii To: Martin Kletzander In-reply-to: <20170222104025.GA3557@wheatley> (message from Martin Kletzander on Wed, 22 Feb 2017 11:40:25 +0100) Subject: Re: bug#25830: 25.2; ispell doesn't parse hunspell dictionaries properly References: <20170221091857.GA4096@wheatley> <83k28jo3ur.fsf@gnu.org> <20170221202454.GA30086@wheatley> <83fuj7tgto.fsf@gnu.org> <20170222104025.GA3557@wheatley> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 25830 Cc: 25830@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Wed, 22 Feb 2017 11:40:25 +0100 > From: Martin Kletzander > Cc: 25830@debbugs.gnu.org > > $ locale > LANG=en_GB.utf8 > LC_CTYPE=en_GB.utf8 > LC_NUMERIC="en_GB.utf8" > LC_TIME="en_GB.utf8" > LC_COLLATE="en_GB.utf8" > LC_MONETARY="en_GB.utf8" > LC_MESSAGES="en_GB.utf8" > LC_PAPER="en_GB.utf8" > LC_NAME="en_GB.utf8" > LC_ADDRESS="en_GB.utf8" > LC_TELEPHONE="en_GB.utf8" > LC_MEASUREMENT="en_GB.utf8" > LC_IDENTIFICATION="en_GB.utf8" > LC_ALL= > > Honestly, I don't know where it takes the cs_CZ from, *but* if it > didn't, I would have to modify it so that it does. Simply because > that's what I want it to do by default. Interesting. What version of Hunspell is that? From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 22 11:43:18 2017 Received: (at 25830) by debbugs.gnu.org; 22 Feb 2017 16:43:18 +0000 Received: from localhost ([127.0.0.1]:51397 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cga0c-0003DN-KM for submit@debbugs.gnu.org; Wed, 22 Feb 2017 11:43:18 -0500 Received: from mail-wm0-f50.google.com ([74.125.82.50]:36635) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cga0b-0003DA-Jf for 25830@debbugs.gnu.org; Wed, 22 Feb 2017 11:43:17 -0500 Received: by mail-wm0-f50.google.com with SMTP id v77so3695833wmv.1 for <25830@debbugs.gnu.org>; Wed, 22 Feb 2017 08:43:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=PT4gt6C68l5XiRvjmCPCIkxav/UslwDWKX+87yZPgOo=; b=sX0vWpzhQa5DWqOtGpNjGO6GuSW111uDhm4r7S+R2ANmCqSyg/6EGfkVOMQYOhKd4L g2vCPA/eGRSloYWoXn7ShYVt62EJr8odmJouMVqqOP8g0+H5vWM6dZzffLJrMbjNz/zY 8B5EIamBiIc4KcMCLmLbLSj/wNM+gvI+j5qBr3M++2Ch+choWyc92s3AnraDFRyTKeN5 /p8fXfXcsF1qra5TktVFzsLxnNjpq3zrV7rZkk4/gX+VrBev8d1cwjRhGz0gHEsjr100 umCmfitl1MsxrQNEXZJhanpdzhuY26ZVFJxO4rX/3rTAEbu9cahYRYcOXoPIi/LTRaMB pygw== X-Gm-Message-State: AMke39na9w7CLLkYypmyPFVnruORbvVu74qoHNTkynVM76A2YPNDJjPyf28w0UN55rN6mQ== X-Received: by 10.28.72.193 with SMTP id v184mr3034413wma.105.1487781791925; Wed, 22 Feb 2017 08:43:11 -0800 (PST) Received: from caroline.localdomain (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id y126sm3170491wmg.19.2017.02.22.08.43.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Feb 2017 08:43:11 -0800 (PST) Received: by caroline.localdomain (Postfix, from userid 1000) id 9D67A12007F; Wed, 22 Feb 2017 17:43:10 +0100 (CET) Date: Wed, 22 Feb 2017 17:43:10 +0100 From: Martin Kletzander To: Eli Zaretskii Subject: Re: bug#25830: 25.2; ispell doesn't parse hunspell dictionaries properly Message-ID: <20170222164310.GA3470@wheatley> References: <20170221091857.GA4096@wheatley> <83k28jo3ur.fsf@gnu.org> <20170221202454.GA30086@wheatley> <83fuj7tgto.fsf@gnu.org> <20170222104025.GA3557@wheatley> <83d1eatcxo.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <83d1eatcxo.fsf@gnu.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 25830 Cc: 25830@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) On Wed, Feb 22, 2017 at 06:20:19PM +0200, Eli Zaretskii wrote: >> Date: Wed, 22 Feb 2017 11:40:25 +0100 >> From: Martin Kletzander >> Cc: 25830@debbugs.gnu.org >> >> $ locale >> LANG=en_GB.utf8 >> LC_CTYPE=en_GB.utf8 >> LC_NUMERIC="en_GB.utf8" >> LC_TIME="en_GB.utf8" >> LC_COLLATE="en_GB.utf8" >> LC_MONETARY="en_GB.utf8" >> LC_MESSAGES="en_GB.utf8" >> LC_PAPER="en_GB.utf8" >> LC_NAME="en_GB.utf8" >> LC_ADDRESS="en_GB.utf8" >> LC_TELEPHONE="en_GB.utf8" >> LC_MEASUREMENT="en_GB.utf8" >> LC_IDENTIFICATION="en_GB.utf8" >> LC_ALL= >> >> Honestly, I don't know where it takes the cs_CZ from, *but* if it >> didn't, I would have to modify it so that it does. Simply because >> that's what I want it to do by default. > >Interesting. What version of Hunspell is that? 1.6.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 25 03:25:14 2017 Received: (at 25830) by debbugs.gnu.org; 25 Feb 2017 08:25:14 +0000 Received: from localhost ([127.0.0.1]:55133 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chXfG-0004MC-8F for submit@debbugs.gnu.org; Sat, 25 Feb 2017 03:25:14 -0500 Received: from eggs.gnu.org ([208.118.235.92]:60997) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chXfE-0004Lz-1j for 25830@debbugs.gnu.org; Sat, 25 Feb 2017 03:25:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1chXf5-0001yQ-SK for 25830@debbugs.gnu.org; Sat, 25 Feb 2017 03:25:06 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53031) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1chXf5-0001yM-Os; Sat, 25 Feb 2017 03:25:03 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2883 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1chXf4-0004d3-7A; Sat, 25 Feb 2017 03:25:02 -0500 Date: Sat, 25 Feb 2017 10:24:38 +0200 Message-Id: <83efymsmnt.fsf@gnu.org> From: Eli Zaretskii To: Martin Kletzander In-reply-to: <20170222164310.GA3470@wheatley> (message from Martin Kletzander on Wed, 22 Feb 2017 17:43:10 +0100) Subject: Re: bug#25830: 25.2; ispell doesn't parse hunspell dictionaries properly References: <20170221091857.GA4096@wheatley> <83k28jo3ur.fsf@gnu.org> <20170221202454.GA30086@wheatley> <83fuj7tgto.fsf@gnu.org> <20170222104025.GA3557@wheatley> <83d1eatcxo.fsf@gnu.org> <20170222164310.GA3470@wheatley> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 25830 Cc: 25830@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Wed, 22 Feb 2017 17:43:10 +0100 > From: Martin Kletzander > Cc: 25830@debbugs.gnu.org > > On Wed, Feb 22, 2017 at 06:20:19PM +0200, Eli Zaretskii wrote: > >> Date: Wed, 22 Feb 2017 11:40:25 +0100 > >> From: Martin Kletzander > >> Cc: 25830@debbugs.gnu.org > >> > >> $ locale > >> LANG=en_GB.utf8 > >> LC_CTYPE=en_GB.utf8 > >> LC_NUMERIC="en_GB.utf8" > >> LC_TIME="en_GB.utf8" > >> LC_COLLATE="en_GB.utf8" > >> LC_MONETARY="en_GB.utf8" > >> LC_MESSAGES="en_GB.utf8" > >> LC_PAPER="en_GB.utf8" > >> LC_NAME="en_GB.utf8" > >> LC_ADDRESS="en_GB.utf8" > >> LC_TELEPHONE="en_GB.utf8" > >> LC_MEASUREMENT="en_GB.utf8" > >> LC_IDENTIFICATION="en_GB.utf8" > >> LC_ALL= > >> > >> Honestly, I don't know where it takes the cs_CZ from, *but* if it > >> didn't, I would have to modify it so that it does. Simply because > >> that's what I want it to do by default. > > > >Interesting. What version of Hunspell is that? > > 1.6.0 Thanks. I'll look into invoking ispell-hunspell-add-multi-dic automatically when we find more than one dictionary loaded by Hunspell, as it reports when invoked with the -D option. From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 25 07:15:33 2017 Received: (at 25830) by debbugs.gnu.org; 25 Feb 2017 12:15:33 +0000 Received: from localhost ([127.0.0.1]:55221 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chbG8-0001D3-N1 for submit@debbugs.gnu.org; Sat, 25 Feb 2017 07:15:33 -0500 Received: from mail-wm0-f53.google.com ([74.125.82.53]:38652) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chbG6-0001Cp-Ra for 25830@debbugs.gnu.org; Sat, 25 Feb 2017 07:15:31 -0500 Received: by mail-wm0-f53.google.com with SMTP id r141so32079587wmg.1 for <25830@debbugs.gnu.org>; Sat, 25 Feb 2017 04:15:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=wqZCMnfsHpnwj1LHSMblOJ2AD1SGafcrAVcG47jwdeI=; b=L8m3q8THPEfius1FmYvoPMKXaWhPY/k4BJgRqhkmSonisHs0deqedlhEztz6QoC4lt pqzlKpbMve0V7mQOQX9/SM2LLemMPTwbHbv4ThV1yy07ytYH925tudkDn3kJIN6f05Wk RrWYrSOr8i4gg/+TUX+Fgk1cMg+M61CnM2wCpkEY0OfsQjX3klkNAv5N+z6bzfaqTIIy JvFQMoZUaBiOkouzGIOs0kHsyS5bitI8pz2NA0Let3aV9j6Qfzn9Fq++ZOx9DlZ/gouH cxafN/kOz3GUq3PX4Twrp6snz2JEOf5fxFhz+JdRYzcpF6SNTzLcCAEkBevXVd87ag6a jCZw== X-Gm-Message-State: AMke39l/g0aOKlwsoyHSz2RN/Wcl6G0LqY25Ye+WHMxa2NVUIn8DgRbzV7fqt0Stdl06tQ== X-Received: by 10.28.65.196 with SMTP id o187mr6080155wma.37.1488024924971; Sat, 25 Feb 2017 04:15:24 -0800 (PST) Received: from wheatley.localdomain (cock.kentus.net. [95.82.177.71]) by smtp.gmail.com with ESMTPSA id s18sm6152234wmb.18.2017.02.25.04.15.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 25 Feb 2017 04:15:23 -0800 (PST) Received: by wheatley.localdomain (Postfix, from userid 1000) id 077C77E0049; Sat, 25 Feb 2017 13:15:23 +0100 (CET) Date: Sat, 25 Feb 2017 13:15:23 +0100 From: Martin Kletzander To: Eli Zaretskii Subject: Re: bug#25830: 25.2; ispell doesn't parse hunspell dictionaries properly Message-ID: <20170225121523.GA9164@wheatley> References: <20170221091857.GA4096@wheatley> <83k28jo3ur.fsf@gnu.org> <20170221202454.GA30086@wheatley> <83fuj7tgto.fsf@gnu.org> <20170222104025.GA3557@wheatley> <83d1eatcxo.fsf@gnu.org> <20170222164310.GA3470@wheatley> <83efymsmnt.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <83efymsmnt.fsf@gnu.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 25830 Cc: 25830@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.2 (/) On Sat, Feb 25, 2017 at 10:24:38AM +0200, Eli Zaretskii wrote: >> Date: Wed, 22 Feb 2017 17:43:10 +0100 >> From: Martin Kletzander >> Cc: 25830@debbugs.gnu.org >> >> On Wed, Feb 22, 2017 at 06:20:19PM +0200, Eli Zaretskii wrote: >> >> Date: Wed, 22 Feb 2017 11:40:25 +0100 >> >> From: Martin Kletzander >> >> Cc: 25830@debbugs.gnu.org >> >> >> >> $ locale >> >> LANG=en_GB.utf8 >> >> LC_CTYPE=en_GB.utf8 >> >> LC_NUMERIC="en_GB.utf8" >> >> LC_TIME="en_GB.utf8" >> >> LC_COLLATE="en_GB.utf8" >> >> LC_MONETARY="en_GB.utf8" >> >> LC_MESSAGES="en_GB.utf8" >> >> LC_PAPER="en_GB.utf8" >> >> LC_NAME="en_GB.utf8" >> >> LC_ADDRESS="en_GB.utf8" >> >> LC_TELEPHONE="en_GB.utf8" >> >> LC_MEASUREMENT="en_GB.utf8" >> >> LC_IDENTIFICATION="en_GB.utf8" >> >> LC_ALL= >> >> >> >> Honestly, I don't know where it takes the cs_CZ from, *but* if it >> >> didn't, I would have to modify it so that it does. Simply because >> >> that's what I want it to do by default. >> > >> >Interesting. What version of Hunspell is that? >> >> 1.6.0 > >Thanks. I'll look into invoking ispell-hunspell-add-multi-dic >automatically when we find more than one dictionary loaded by >Hunspell, as it reports when invoked with the -D option. Thank you. Feel free too Cc me on any patch for that, I'll gladly test it out (and learn more about the underlying code). Martin From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 25 07:42:01 2017 Received: (at 25830) by debbugs.gnu.org; 25 Feb 2017 12:42:02 +0000 Received: from localhost ([127.0.0.1]:55238 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chbfl-0003W7-Hf for submit@debbugs.gnu.org; Sat, 25 Feb 2017 07:42:01 -0500 Received: from eggs.gnu.org ([208.118.235.92]:40334) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chbfj-0003Vu-F8 for 25830@debbugs.gnu.org; Sat, 25 Feb 2017 07:41:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1chbfb-0002V0-1R for 25830@debbugs.gnu.org; Sat, 25 Feb 2017 07:41:54 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54737) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1chbfa-0002Uw-Uh; Sat, 25 Feb 2017 07:41:50 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3515 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1chbfa-0002jC-8z; Sat, 25 Feb 2017 07:41:50 -0500 Date: Sat, 25 Feb 2017 14:41:27 +0200 Message-Id: <83tw7iqw7c.fsf@gnu.org> From: Eli Zaretskii To: Martin Kletzander In-reply-to: <20170225121523.GA9164@wheatley> (message from Martin Kletzander on Sat, 25 Feb 2017 13:15:23 +0100) Subject: Re: bug#25830: 25.2; ispell doesn't parse hunspell dictionaries properly References: <20170221091857.GA4096@wheatley> <83k28jo3ur.fsf@gnu.org> <20170221202454.GA30086@wheatley> <83fuj7tgto.fsf@gnu.org> <20170222104025.GA3557@wheatley> <83d1eatcxo.fsf@gnu.org> <20170222164310.GA3470@wheatley> <83efymsmnt.fsf@gnu.org> <20170225121523.GA9164@wheatley> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 25830 Cc: 25830@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Sat, 25 Feb 2017 13:15:23 +0100 > From: Martin Kletzander > Cc: 25830@debbugs.gnu.org > > >Thanks. I'll look into invoking ispell-hunspell-add-multi-dic > >automatically when we find more than one dictionary loaded by > >Hunspell, as it reports when invoked with the -D option. > > Thank you. Feel free too Cc me on any patch for that, I'll gladly test > it out (and learn more about the underlying code). OK, thanks, will do. Btw, do you have a DICTIONARY environment variable defined? If yes, what is its value? From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 25 08:10:13 2017 Received: (at 25830) by debbugs.gnu.org; 25 Feb 2017 13:10:13 +0000 Received: from localhost ([127.0.0.1]:55251 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chc73-00048e-2V for submit@debbugs.gnu.org; Sat, 25 Feb 2017 08:10:13 -0500 Received: from mail-wr0-f175.google.com ([209.85.128.175]:34142) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chc71-00048O-8v for 25830@debbugs.gnu.org; Sat, 25 Feb 2017 08:10:11 -0500 Received: by mail-wr0-f175.google.com with SMTP id o22so22818591wro.1 for <25830@debbugs.gnu.org>; Sat, 25 Feb 2017 05:10:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=mUZmnWy7UD9r+Xaele1UCxfXWg3EaWp8FJkfaseOx3A=; b=WEvz/BokgFYpqGBByXQGDfqXB+nlAzLMNjfefaICDstqxvEjRT/J5jY+U128/UsO/M 3GqW56faX4ZgAtRegJjZguY7dIeu05O5X5xtjs6+QGAC+eUAJw+B8IQinWMKDczn0zAi 59xzvhioEvJ2m6Jc2uJ7opeoovUwXJfTOnxKpHfLUohIxhP4XIumtS7R+8sd3ZwJNhDj Cpu8h2OqwLy3enkTbGe1z/QuX4wf8pdN4UVX7UxbCiWfvMQanbRYPgkJNhAdiEyDslG6 Kx63vPdqIS2nih0Xcqxjm8ah63OTJMGSdRLYoLXE8zVBYDU4onQP06RafCA7jb4231Mh ZN3w== X-Gm-Message-State: AMke39kcvCx0leg7bDbU3/RI3JiLfhjOlAnUvNv/6JlrDqhKaOXtspemuvBxvUchW1uQ/w== X-Received: by 10.223.150.211 with SMTP id u77mr1700060wrb.6.1488028205344; Sat, 25 Feb 2017 05:10:05 -0800 (PST) Received: from wheatley.localdomain (cock.kentus.net. [95.82.177.71]) by smtp.gmail.com with ESMTPSA id v196sm6308841wmv.5.2017.02.25.05.10.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 25 Feb 2017 05:10:03 -0800 (PST) Received: by wheatley.localdomain (Postfix, from userid 1000) id 118EC7E0049; Sat, 25 Feb 2017 14:10:03 +0100 (CET) Date: Sat, 25 Feb 2017 14:10:03 +0100 From: Martin Kletzander To: Eli Zaretskii Subject: Re: bug#25830: 25.2; ispell doesn't parse hunspell dictionaries properly Message-ID: <20170225131003.GB9164@wheatley> References: <20170221091857.GA4096@wheatley> <83k28jo3ur.fsf@gnu.org> <20170221202454.GA30086@wheatley> <83fuj7tgto.fsf@gnu.org> <20170222104025.GA3557@wheatley> <83d1eatcxo.fsf@gnu.org> <20170222164310.GA3470@wheatley> <83efymsmnt.fsf@gnu.org> <20170225121523.GA9164@wheatley> <83tw7iqw7c.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <83tw7iqw7c.fsf@gnu.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Score: -0.4 (/) X-Debbugs-Envelope-To: 25830 Cc: 25830@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) On Sat, Feb 25, 2017 at 02:41:27PM +0200, Eli Zaretskii wrote: >> Date: Sat, 25 Feb 2017 13:15:23 +0100 >> From: Martin Kletzander >> Cc: 25830@debbugs.gnu.org >> >> >Thanks. I'll look into invoking ispell-hunspell-add-multi-dic >> >automatically when we find more than one dictionary loaded by >> >Hunspell, as it reports when invoked with the -D option. >> >> Thank you. Feel free too Cc me on any patch for that, I'll gladly test >> it out (and learn more about the underlying code). > >OK, thanks, will do. > >Btw, do you have a DICTIONARY environment variable defined? If yes, >what is its value? Oh, I have, and it's (not surprisingly) "en_GB,cs_CZ". I'm going to find out where that comes from. From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 27 10:54:59 2017 Received: (at 25830) by debbugs.gnu.org; 27 Feb 2017 15:54:59 +0000 Received: from localhost ([127.0.0.1]:58464 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciNdb-00085m-A0 for submit@debbugs.gnu.org; Mon, 27 Feb 2017 10:54:59 -0500 Received: from eggs.gnu.org ([208.118.235.92]:42412) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciNdZ-00085Y-2L for 25830@debbugs.gnu.org; Mon, 27 Feb 2017 10:54:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ciNdQ-0001vo-35 for 25830@debbugs.gnu.org; Mon, 27 Feb 2017 10:54:52 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59915) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ciNdP-0001vk-VS; Mon, 27 Feb 2017 10:54:48 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2756 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ciNdP-00086v-A5; Mon, 27 Feb 2017 10:54:47 -0500 Date: Mon, 27 Feb 2017 17:54:44 +0200 Message-Id: <83poi3pr23.fsf@gnu.org> From: Eli Zaretskii To: Martin Kletzander In-reply-to: <20170225121523.GA9164@wheatley> (message from Martin Kletzander on Sat, 25 Feb 2017 13:15:23 +0100) Subject: Re: bug#25830: 25.2; ispell doesn't parse hunspell dictionaries properly References: <20170221091857.GA4096@wheatley> <83k28jo3ur.fsf@gnu.org> <20170221202454.GA30086@wheatley> <83fuj7tgto.fsf@gnu.org> <20170222104025.GA3557@wheatley> <83d1eatcxo.fsf@gnu.org> <20170222164310.GA3470@wheatley> <83efymsmnt.fsf@gnu.org> <20170225121523.GA9164@wheatley> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 25830 Cc: 25830@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Sat, 25 Feb 2017 13:15:23 +0100 > From: Martin Kletzander > Cc: 25830@debbugs.gnu.org > > >Thanks. I'll look into invoking ispell-hunspell-add-multi-dic > >automatically when we find more than one dictionary loaded by > >Hunspell, as it reports when invoked with the -D option. > > Thank you. Feel free too Cc me on any patch for that, I'll gladly test > it out (and learn more about the underlying code). Please try the patch below. (If it doesn't apply to your version of ispell.el, tell me which version of Emacs you have, and I will try to produce a compatible patch.) TIA --- lisp/textmodes/ispell.el~0 2017-01-08 06:23:52.000000000 +0200 +++ lisp/textmodes/ispell.el 2017-02-27 17:42:50.340586100 +0200 @@ -829,6 +829,15 @@ (fboundp 'accept-process-output)) "Non-nil means that the OS supports asynchronous processes.") +(defvar ispell-current-dictionary nil + "The name of the current dictionary, or nil for the default. +This is passed to the Ispell process using the `-d' switch and is +used as key in `ispell-local-dictionary-alist' and `ispell-dictionary-alist'.") + +(defvar ispell-current-personal-dictionary nil + "The name of the current personal dictionary, or nil for the default. +This is passed to the Ispell process using the `-p' switch.") + ;; Make ispell.el work better with aspell. (defvar ispell-aspell-dictionary-alist nil @@ -1087,6 +1096,7 @@ (ispell-find-hunspell-dictionaries) (setq ispell-dictionary-alist ispell-hunspell-dictionary-alist)) (or (assoc first-dict ispell-local-dictionary-alist) + (assoc first-dict ispell-hunspell-dictionary-alist) (assoc first-dict ispell-dictionary-alist) (error "Unknown dictionary: %s" first-dict))) (cl-pushnew (list dict '()) ispell-dictionary-alist :test #'equal) @@ -1110,18 +1120,25 @@ "[\n\r]+" t)) hunspell-default-dict - hunspell-default-dict-entry) + hunspell-default-dict-entry + hunspell-multi-dict) (dolist (dict hunspell-found-dicts) (let* ((full-name (file-name-nondirectory dict)) (basename (file-name-sans-extension full-name)) (affix-file (concat dict ".aff"))) (if (string-match "\\.aff$" dict) ;; Found default dictionary - (if hunspell-default-dict - (error "ispell-fhd: Default dict already defined as %s. Not using %s.\n" - hunspell-default-dict dict) - (setq affix-file dict) - (setq hunspell-default-dict (list basename affix-file))) + (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)) ;; Entry has an associated .aff file and no previous value. @@ -1171,7 +1188,12 @@ (cl-pushnew (if (string= dict hunspell-default-dict) hunspell-default-dict-entry (list dict)) - ispell-hunspell-dictionary-alist :test #'equal)))) + ispell-hunspell-dictionary-alist :test #'equal)) + ;; If we found more than one loaded dictionary, set up for using + ;; multiple dictionaries. + (when hunspell-multi-dict + (ispell-hunspell-add-multi-dic hunspell-multi-dict) + (setq ispell-current-dictionary hunspell-multi-dict)))) ;; Set params according to the selected spellchecker @@ -1416,15 +1438,6 @@ ;;; ********************************************************************** -(defvar ispell-current-dictionary nil - "The name of the current dictionary, or nil for the default. -This is passed to the Ispell process using the `-d' switch and is -used as key in `ispell-local-dictionary-alist' and `ispell-dictionary-alist'.") - -(defvar ispell-current-personal-dictionary nil - "The name of the current personal dictionary, or nil for the default. -This is passed to the Ispell process using the `-p' switch.") - (defun ispell-decode-string (str) "Decodes multibyte character strings." (decode-coding-string str (ispell-get-coding-system))) From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 28 16:54:02 2017 Received: (at 25830) by debbugs.gnu.org; 28 Feb 2017 21:54:02 +0000 Received: from localhost ([127.0.0.1]:60645 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cipic-00010E-4z for submit@debbugs.gnu.org; Tue, 28 Feb 2017 16:54:02 -0500 Received: from mail-wr0-f182.google.com ([209.85.128.182]:34037) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cipia-0000zq-KZ for 25830@debbugs.gnu.org; Tue, 28 Feb 2017 16:54:01 -0500 Received: by mail-wr0-f182.google.com with SMTP id l37so17794724wrc.1 for <25830@debbugs.gnu.org>; Tue, 28 Feb 2017 13:54:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=7M4ft4ZJnx3+BMx5WxB7qw2zANzCeVE3jCEclvCx13Q=; b=EGyV7ejHVs8Q0sohUHyamoWWwy8UmwcbNi7ySEy+Zq0gSw9ksDo8Ij+/RhnprFAG6j 6ZoG4/F3hmjrnjBWtUHY+jko7GP9zFSNM1vn1TeT7DG0NuGmteR8qWsBoXJejU9tkFwK owIXk70C44jIDes74EAa5u2fZuZiUiw1SA1px6cJ1rf9tJYQ/2A5zSOOLk8/D5ZvxTLa byGWrkHy6EYA/fBFPrqcd01XAtCT9Y2OhdO2KRLrTReJA/oMkKnEw9DUmuMTtsJ/y6XR M4gIE1Nsta3oD6lurOlwzfSfQraXzf/mViXyIXqWBYniPtBbNvvJkhTpFZKo+xbhnc9A GGNw== X-Gm-Message-State: AMke39mbNJ6ViF+zKEQ8oEOBktZJZ03hn3fonP3PEKH7PQqpoaRbK8DocvhSibC4zPGSVA== X-Received: by 10.223.172.101 with SMTP id v92mr4604180wrc.49.1488318834856; Tue, 28 Feb 2017 13:53:54 -0800 (PST) Received: from wheatley.localdomain (cock.kentus.net. [95.82.177.71]) by smtp.gmail.com with ESMTPSA id s103sm3945057wrc.6.2017.02.28.13.53.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Feb 2017 13:53:53 -0800 (PST) Received: by wheatley.localdomain (Postfix, from userid 1000) id A6FFD7E0049; Tue, 28 Feb 2017 22:53:52 +0100 (CET) Date: Tue, 28 Feb 2017 22:53:52 +0100 From: Martin Kletzander To: Eli Zaretskii Subject: Re: bug#25830: 25.2; ispell doesn't parse hunspell dictionaries properly Message-ID: <20170228215352.GB29225@wheatley> References: <20170221091857.GA4096@wheatley> <83k28jo3ur.fsf@gnu.org> <20170221202454.GA30086@wheatley> <83fuj7tgto.fsf@gnu.org> <20170222104025.GA3557@wheatley> <83d1eatcxo.fsf@gnu.org> <20170222164310.GA3470@wheatley> <83efymsmnt.fsf@gnu.org> <20170225121523.GA9164@wheatley> <83poi3pr23.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <83poi3pr23.fsf@gnu.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 25830 Cc: 25830@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.2 (/) On Mon, Feb 27, 2017 at 05:54:44PM +0200, Eli Zaretskii wrote: >> Date: Sat, 25 Feb 2017 13:15:23 +0100 >> From: Martin Kletzander >> Cc: 25830@debbugs.gnu.org >> >> >Thanks. I'll look into invoking ispell-hunspell-add-multi-dic >> >automatically when we find more than one dictionary loaded by >> >Hunspell, as it reports when invoked with the -D option. >> >> Thank you. Feel free too Cc me on any patch for that, I'll gladly test >> it out (and learn more about the underlying code). > >Please try the patch below. (If it doesn't apply to your version of >ispell.el, tell me which version of Emacs you have, and I will try to >produce a compatible patch.) > Sorry I didn't get to this earlier. One of the hunks didn't apply correctly, so I used the file from master and it applied correctly. So with your patch applied on top of ispell.el from current master, the situation is way better. But I feel like it still doesn't work as expected. Not that anything would be broken, but it uses only the first dictionary found. I have to manually do: (ispell-hunspell-add-multi-dic "en_GB,cs_CZ") (ispell-change-dictionary "en_GB,cs_CZ") I confirmed that both of them needed to be ran. However after that everything works perfectly. So the only reason why I said it doesn't work properly is that I see you running similar code in the patch: (when hunspell-multi-dict (ispell-hunspell-add-multi-dic hunspell-multi-dict) (setq ispell-current-dictionary hunspell-multi-dict)) When it works, I see hunspell is ran with '-d en_GB,cs_CZ', but it would also work if hunspell was ran without '-d', but my guess is that you don't want to do that. Anyway, to find out a bit more, I did some debugging. I'm not sure if it helps or if it makes it more confusing, though. Calling the function returns "en_GB,cs_CZ". When I add some prin1 statements around the 'add-multi-dic' and 'setq' I see it is called before the hunspell is ran and it has the proper values set. However when I check the values from the scratch buffer after it was ran (either manually or by spell-checking a word), it's like it didn't do anything. It behaves like it did all the right things, but in a different scope, even though the variables are not buffer-local or anything. Unsure how to continue or debug this more, I am giving up for today. Let me know if I should debug it a bit more somehow. Have a nice day, Martin From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 05 10:42:36 2017 Received: (at 25830) by debbugs.gnu.org; 5 Mar 2017 15:42:36 +0000 Received: from localhost ([127.0.0.1]:41121 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ckYIu-0006BN-8Y for submit@debbugs.gnu.org; Sun, 05 Mar 2017 10:42:36 -0500 Received: from eggs.gnu.org ([208.118.235.92]:50424) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ckYIr-0006BA-UY for 25830@debbugs.gnu.org; Sun, 05 Mar 2017 10:42:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ckYIi-0002rR-9E for 25830@debbugs.gnu.org; Sun, 05 Mar 2017 10:42:28 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60347) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ckYIi-0002rM-5h; Sun, 05 Mar 2017 10:42:24 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1411 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ckYIh-0007kG-Dw; Sun, 05 Mar 2017 10:42:23 -0500 Date: Sun, 05 Mar 2017 17:42:14 +0200 Message-Id: <83d1dvk9wp.fsf@gnu.org> From: Eli Zaretskii To: Martin Kletzander In-reply-to: <20170228215352.GB29225@wheatley> (message from Martin Kletzander on Tue, 28 Feb 2017 22:53:52 +0100) Subject: Re: bug#25830: 25.2; ispell doesn't parse hunspell dictionaries properly References: <20170221091857.GA4096@wheatley> <83k28jo3ur.fsf@gnu.org> <20170221202454.GA30086@wheatley> <83fuj7tgto.fsf@gnu.org> <20170222104025.GA3557@wheatley> <83d1eatcxo.fsf@gnu.org> <20170222164310.GA3470@wheatley> <83efymsmnt.fsf@gnu.org> <20170225121523.GA9164@wheatley> <83poi3pr23.fsf@gnu.org> <20170228215352.GB29225@wheatley> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 25830 Cc: 25830@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Tue, 28 Feb 2017 22:53:52 +0100 > From: Martin Kletzander > Cc: 25830@debbugs.gnu.org > > >Please try the patch below. (If it doesn't apply to your version of > >ispell.el, tell me which version of Emacs you have, and I will try to > >produce a compatible patch.) > > > > Sorry I didn't get to this earlier. Now it's my turn to apologize for the delay... > One of the hunks didn't apply correctly, so I used the file from > master and it applied correctly. So with your patch applied on top > of ispell.el from current master, the situation is way better. But > I feel like it still doesn't work as expected. Not that anything > would be broken, but it uses only the first dictionary found. You are right, that was the wrong direction to try to solve the problem. Here's another attempt. It should be applied _instead_ of the previous patch, to the original version of ispell.el. Let me know if it works OK for you. Thanks. --- lisp/textmodes/ispell.el~0 2017-01-08 06:23:52.000000000 +0200 +++ lisp/textmodes/ispell.el 2017-03-05 17:21:10.441710400 +0200 @@ -1094,10 +1094,10 @@ (defun ispell-find-hunspell-dictionaries () "Look for installed Hunspell dictionaries. -Will initialize `ispell-hunspell-dictionary-alist' and -`ispell-hunspell-dictionary-alist' after values found -and remove `ispell-dicts-name2locale-equivs-alist' -entries if a specific dictionary was found." +Will initialize `ispell-hunspell-dictionary-alist' according +to dictionaries found, and will remove aliases from the list +in `ispell-dicts-name2locale-equivs-alist' if an explicit +dictionary from that list was found." (let ((hunspell-found-dicts (split-string (with-temp-buffer @@ -1110,18 +1110,27 @@ "[\n\r]+" t)) hunspell-default-dict - hunspell-default-dict-entry) + hunspell-default-dict-entry + hunspell-multi-dict) (dolist (dict hunspell-found-dicts) (let* ((full-name (file-name-nondirectory dict)) (basename (file-name-sans-extension full-name)) (affix-file (concat dict ".aff"))) (if (string-match "\\.aff$" dict) ;; Found default dictionary - (if hunspell-default-dict - (error "ispell-fhd: Default dict already defined as %s. Not using %s.\n" - hunspell-default-dict dict) - (setq affix-file dict) - (setq hunspell-default-dict (list basename affix-file))) + (progn + (if hunspell-default-dict + (setq hunspell-multi-dict + (concat (or hunspell-multi-dict + (car hunspell-default-dict)) + "," basename)) + (setq affix-file dict) + ;; FIXME: The cdr of the list we cons below is never + ;; used. Why do we need a list? + (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)) ;; Entry has an associated .aff file and no previous value. @@ -1161,7 +1170,8 @@ (cl-pushnew (list dict-equiv-key affix-file) ispell-hunspell-dict-paths-alist :test #'equal))))) ;; Parse and set values for default dictionary. - (setq hunspell-default-dict (car hunspell-default-dict)) + (setq hunspell-default-dict (or hunspell-multi-dict + (car hunspell-default-dict))) (setq hunspell-default-dict-entry (ispell-parse-hunspell-affix-file hunspell-default-dict)) ;; Create an alist of found dicts with only names, except for default dict. From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 07 11:52:29 2017 Received: (at 25830) by debbugs.gnu.org; 7 Mar 2017 16:52:29 +0000 Received: from localhost ([127.0.0.1]:44831 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1clILd-0005rE-Eq for submit@debbugs.gnu.org; Tue, 07 Mar 2017 11:52:29 -0500 Received: from eggs.gnu.org ([208.118.235.92]:50966) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1clILc-0005qz-QF for 25830@debbugs.gnu.org; Tue, 07 Mar 2017 11:52:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1clILW-0003Sd-9l for 25830@debbugs.gnu.org; Tue, 07 Mar 2017 11:52:23 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39931) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1clILW-0003SX-6D; Tue, 07 Mar 2017 11:52:22 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4085 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1clILV-0000k7-G9; Tue, 07 Mar 2017 11:52:21 -0500 Date: Tue, 07 Mar 2017 18:51:54 +0200 Message-Id: <83k281ghcl.fsf@gnu.org> From: Eli Zaretskii To: mk@linux.com In-reply-to: <83d1dvk9wp.fsf@gnu.org> (message from Eli Zaretskii on Sun, 05 Mar 2017 17:42:14 +0200) Subject: Re: bug#25830: 25.2; ispell doesn't parse hunspell dictionaries properly References: <20170221091857.GA4096@wheatley> <83k28jo3ur.fsf@gnu.org> <20170221202454.GA30086@wheatley> <83fuj7tgto.fsf@gnu.org> <20170222104025.GA3557@wheatley> <83d1eatcxo.fsf@gnu.org> <20170222164310.GA3470@wheatley> <83efymsmnt.fsf@gnu.org> <20170225121523.GA9164@wheatley> <83poi3pr23.fsf@gnu.org> <20170228215352.GB29225@wheatley> <83d1dvk9wp.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 25830 Cc: 25830@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Ping! (The previous message to you bounced.) > Date: Sun, 05 Mar 2017 17:42:14 +0200 > From: Eli Zaretskii > Cc: 25830@debbugs.gnu.org > > > Date: Tue, 28 Feb 2017 22:53:52 +0100 > > From: Martin Kletzander > > Cc: 25830@debbugs.gnu.org > > > > >Please try the patch below. (If it doesn't apply to your version of > > >ispell.el, tell me which version of Emacs you have, and I will try to > > >produce a compatible patch.) > > > > > > > Sorry I didn't get to this earlier. > > Now it's my turn to apologize for the delay... > > > One of the hunks didn't apply correctly, so I used the file from > > master and it applied correctly. So with your patch applied on top > > of ispell.el from current master, the situation is way better. But > > I feel like it still doesn't work as expected. Not that anything > > would be broken, but it uses only the first dictionary found. > > You are right, that was the wrong direction to try to solve the > problem. > > Here's another attempt. It should be applied _instead_ of the > previous patch, to the original version of ispell.el. Let me know if > it works OK for you. > > Thanks. > > --- lisp/textmodes/ispell.el~0 2017-01-08 06:23:52.000000000 +0200 > +++ lisp/textmodes/ispell.el 2017-03-05 17:21:10.441710400 +0200 > @@ -1094,10 +1094,10 @@ > > (defun ispell-find-hunspell-dictionaries () > "Look for installed Hunspell dictionaries. > -Will initialize `ispell-hunspell-dictionary-alist' and > -`ispell-hunspell-dictionary-alist' after values found > -and remove `ispell-dicts-name2locale-equivs-alist' > -entries if a specific dictionary was found." > +Will initialize `ispell-hunspell-dictionary-alist' according > +to dictionaries found, and will remove aliases from the list > +in `ispell-dicts-name2locale-equivs-alist' if an explicit > +dictionary from that list was found." > (let ((hunspell-found-dicts > (split-string > (with-temp-buffer > @@ -1110,18 +1110,27 @@ > "[\n\r]+" > t)) > hunspell-default-dict > - hunspell-default-dict-entry) > + hunspell-default-dict-entry > + hunspell-multi-dict) > (dolist (dict hunspell-found-dicts) > (let* ((full-name (file-name-nondirectory dict)) > (basename (file-name-sans-extension full-name)) > (affix-file (concat dict ".aff"))) > (if (string-match "\\.aff$" dict) > ;; Found default dictionary > - (if hunspell-default-dict > - (error "ispell-fhd: Default dict already defined as %s. Not using %s.\n" > - hunspell-default-dict dict) > - (setq affix-file dict) > - (setq hunspell-default-dict (list basename affix-file))) > + (progn > + (if hunspell-default-dict > + (setq hunspell-multi-dict > + (concat (or hunspell-multi-dict > + (car hunspell-default-dict)) > + "," basename)) > + (setq affix-file dict) > + ;; FIXME: The cdr of the list we cons below is never > + ;; used. Why do we need a list? > + (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)) > ;; Entry has an associated .aff file and no previous value. > @@ -1161,7 +1170,8 @@ > (cl-pushnew (list dict-equiv-key affix-file) > ispell-hunspell-dict-paths-alist :test #'equal))))) > ;; Parse and set values for default dictionary. > - (setq hunspell-default-dict (car hunspell-default-dict)) > + (setq hunspell-default-dict (or hunspell-multi-dict > + (car hunspell-default-dict))) > (setq hunspell-default-dict-entry > (ispell-parse-hunspell-affix-file hunspell-default-dict)) > ;; Create an alist of found dicts with only names, except for default dict. > > > > From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 25 12:14:20 2017 Received: (at 25830-done) by debbugs.gnu.org; 25 Mar 2017 16:14:20 +0000 Received: from localhost ([127.0.0.1]:44482 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1croKZ-0006jD-NL for submit@debbugs.gnu.org; Sat, 25 Mar 2017 12:14:20 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58176) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1croKY-0006j0-3D for 25830-done@debbugs.gnu.org; Sat, 25 Mar 2017 12:14:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1croKP-0002nJ-OW for 25830-done@debbugs.gnu.org; Sat, 25 Mar 2017 12:14:12 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56139) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1croKP-0002nF-L3; Sat, 25 Mar 2017 12:14:09 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1774 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1croKN-000541-S3; Sat, 25 Mar 2017 12:14:09 -0400 Date: Sat, 25 Mar 2017 19:13:57 +0300 Message-Id: <83inmxbagq.fsf@gnu.org> From: Eli Zaretskii To: mk@linux.com In-reply-to: <83k281ghcl.fsf@gnu.org> (message from Eli Zaretskii on Tue, 07 Mar 2017 18:51:54 +0200) Subject: Re: bug#25830: 25.2; ispell doesn't parse hunspell dictionaries properly References: <20170221091857.GA4096@wheatley> <83k28jo3ur.fsf@gnu.org> <20170221202454.GA30086@wheatley> <83fuj7tgto.fsf@gnu.org> <20170222104025.GA3557@wheatley> <83d1eatcxo.fsf@gnu.org> <20170222164310.GA3470@wheatley> <83efymsmnt.fsf@gnu.org> <20170225121523.GA9164@wheatley> <83poi3pr23.fsf@gnu.org> <20170228215352.GB29225@wheatley> <83d1dvk9wp.fsf@gnu.org> <83k281ghcl.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 25830-done Cc: 25830-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Tue, 07 Mar 2017 18:51:54 +0200 > From: Eli Zaretskii > Cc: 25830@debbugs.gnu.org > > Ping! (The previous message to you bounced.) No further comments, so I pushed the proposed changes, and I'm marking this bug done. Thanks for the feedback. From unknown Sat Jun 21 10:45:01 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 23 Apr 2017 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator