From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitri Paduchikh Newsgroups: gmane.emacs.bugs Subject: bug#24435: 25.1; Problem using Hunspell Date: Wed, 14 Sep 2016 20:33:53 +0500 Message-ID: <8760pyzeam.fsf@gmail.com> References: <87a8fazkaf.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1473867514 6294 195.159.176.226 (14 Sep 2016 15:38:34 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 14 Sep 2016 15:38:34 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 24435@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Sep 14 17:38:29 2016 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 1bkCGO-00086v-5f for geb-bug-gnu-emacs@m.gmane.org; Wed, 14 Sep 2016 17:38:16 +0200 Original-Received: from localhost ([::1]:56889 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkCGM-0006BQ-7C for geb-bug-gnu-emacs@m.gmane.org; Wed, 14 Sep 2016 11:38:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53846) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkCDL-0003ih-0h for bug-gnu-emacs@gnu.org; Wed, 14 Sep 2016 11:35:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bkCDG-0002Y7-Fn for bug-gnu-emacs@gnu.org; Wed, 14 Sep 2016 11:35:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33735) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkCDG-0002Y1-CI for bug-gnu-emacs@gnu.org; Wed, 14 Sep 2016 11:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bkCDF-0007w7-W8 for bug-gnu-emacs@gnu.org; Wed, 14 Sep 2016 11:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitri Paduchikh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 14 Sep 2016 15:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24435 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24435-submit@debbugs.gnu.org id=B24435.147386724330435 (code B ref 24435); Wed, 14 Sep 2016 15:35:01 +0000 Original-Received: (at 24435) by debbugs.gnu.org; 14 Sep 2016 15:34:03 +0000 Original-Received: from localhost ([127.0.0.1]:59680 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bkCCI-0007up-Oo for submit@debbugs.gnu.org; Wed, 14 Sep 2016 11:34:02 -0400 Original-Received: from mail-lf0-f47.google.com ([209.85.215.47]:34750) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bkCCH-0007uL-J9 for 24435@debbugs.gnu.org; Wed, 14 Sep 2016 11:34:02 -0400 Original-Received: by mail-lf0-f47.google.com with SMTP id u14so13120407lfd.1 for <24435@debbugs.gnu.org>; Wed, 14 Sep 2016 08:34:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=3mvHLRKIPo9AONy9kyDig/0d2kQMX6DmoOqyNgY61Z0=; b=EE1HCmHLEPz2cSqWM5yFF0CcjA/HW0gWeZoo4HJc0hwyEvxHPVkNFGXLPIQwj2h6Bm QhPu7RHSl4L7aj6xr2ohWId48oMldrd3co7vrAul5s/D9+C1cO9K6AR4oJLputUBnX3V MOQPdKYc9PR21mUEYKR8f5vWdJYCz/kwX1+WP3k4kp2J4aBTqo/D5ZpFV+cU6uExl3ZY uPFj6AUR9cVne1de99caeGsDCP9cBZ/iIe5FumTmi4AbJPXqC7V+s9G1WIixN/i7TJgw 7pmSm1+cZLQBTHraPqoLamSPffMRw+M0NFMLFkmT0RzPjx9Axf4c7lYVs8/DgJN+W/hY Elog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=3mvHLRKIPo9AONy9kyDig/0d2kQMX6DmoOqyNgY61Z0=; b=djUkibSRMEB0QZwfktg3JVTsFvgcleJsJUUruZT7uCPu8lOwrCqzX3jVtdVtEi3K+7 mpoxDKSG8Cbg63EcCSBiAmh5+iMq1MfQZ47wpyMP/HEjz1FZTEtbMFwlhmjEeM9uizcu BedktipAc56muJfcu4WOPfPJq5c0DwiqxcvXjLEkAID55u280VMWzNm7t7+4tCbPkmxP 0Sy+eI7TNbIvSEUjiwoOBBooMd6Ysns71HIHV99ey9qwtrFTjEfxT7Trh6Me/JMIg2i3 aCH5uIhwvfLLU9NbbDyHqhRf5I8usS6dvRGlpqLnh1pxJ4pdrPsDTZjnTsFhIzx5F69X Q1qQ== X-Gm-Message-State: AE9vXwPpZpXtjrL1iFkszuTU6UTgiLwyEuWUvGtXlvoJBXc4HULBAxLTe/Ka/CxMPCCE0Q== X-Received: by 10.25.218.6 with SMTP id r6mr1529903lfg.111.1473867235631; Wed, 14 Sep 2016 08:33:55 -0700 (PDT) Original-Received: from gmail.com ([46.48.49.226]) by smtp.gmail.com with ESMTPSA id g3sm5101306lji.1.2016.09.14.08.33.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 Sep 2016 08:33:54 -0700 (PDT) In-Reply-To: (Noam Postavsky's message of "Wed, 14 Sep 2016 09:46:56 -0400") 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:123292 Archived-At: Hello, Noam Postavsky wrote: > On Wed, Sep 14, 2016 at 9:24 AM, Dmitri Paduchikh = wrote: >> Hello, >> >> Judging from ispell.el it should work with Hunspell, so I tried to use >> it. But attempts to check a word produce the following error message. >> >> | Starting new Ispell process hunspell with ru_RU dictionary... >> | hunspell release 3.1.12 or greater is required (ispell-check-version) >> >> The latest version of Hunspell is 1.4.1 as can be seen here: >> https://github.com/hunspell/hunspell/releases >> >> As I understand, the problem arises because ispell-check-version finds >> version information using regexp >> >> "(but really Hunspell \\([0-9]+\\.[0-9\\.-]+\\)?)" >> >> The output of hunspell -vv does not match it, hence the results. >> >> $ hunspell -vv < /dev/null >> Hunspell 1.4.0 > I guess older Hunspell versions printed a different string. Does it > work if you change the regexp to > "\\(?:(but really \\)?Hunspell \\([0-9]+\\.[0-9\\.-]+\\)?)?" Sadly, it does not. The immediate cause of this error message is that regexp for ispell-program-version matches the Hunspell output. Then the corresponding check for Ispell version produces this error. The change shown below makes the version check pass, but another problem appears: | Starting new Ispell process hunspell with ru_RU dictionary... | ispell-phaf: No matching entry for ru_RU in =E2=80=98ispell-hunspell-dict= -paths-alist=E2=80=99. | (ispell-parse-hunspell-affix-file) It seems that Hunspell itself does not have any difficulty locating the dictionary. $ hunspell -a -d ru_RU Hunspell 1.4.0 =D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=B0=D0=B0 & =D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=B0=D0=B0 3 0: =D0=BF=D1=80= =D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=B0, =D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80= =D0=BA=D0=B0=D0=BC, =D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=B0=D1=85 Below is the change I made to work arround the version check. --- orig/ispell.el 2016-06-29 23:52:37.000000000 +0500 +++ ispell.el 2016-09-14 20:01:50.529079147 +0500 @@ -881,7 +881,7 @@ ;; Get relevant version strings. Only xx.yy.... format works well (let (case-fold-search) (setq ispell-program-version - (and (search-forward-regexp "\\([0-9]+\\.[0-9\\.]+\\)" nil t) + (and (search-forward-regexp "\\bIspell Version \\([0-9]+\\.[0-9\\.]= +\\)" nil t) (match-string 1))) =20 ;; Make sure these variables are (re-)initialized to the default value @@ -897,7 +897,7 @@ (match-string 1))) (setq ispell-really-hunspell (and (search-forward-regexp - "(but really Hunspell \\([0-9]+\\.[0-9\\.-]+\\)?)" + "\\bHunspell \\([0-9]+\\.[0-9-.]+\\)?" nil t) (match-string 1))))) =20 @@ -907,12 +907,13 @@ (ispell-minver "3.1.12") (hunspell8-minver "1.1.6")) =20 - (if (ispell-check-minver ispell0-minver ispell-program-version) - (or (ispell-check-minver ispell-minver ispell-program-version) - (setq ispell-offset 0)) - (error "%s release %s or greater is required" - ispell-program-name - ispell-minver)) + (cond ((or (null ispell-program-version) + (ispell-check-minver ispell-minver ispell-program-versi= on))) + ((ispell-check-minver ispell0-minver ispell-program-version) + (setq ispell-offset 0)) + (:else (error "%s release %s or greater is required" + ispell-program-name + ispell-minver))) =20 (cond (ispell-really-aspell