From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jorge P. de Morais Neto Newsgroups: gmane.emacs.bugs Subject: bug#42248: 27.0.91; With enchant-2.2.8 from Guix, Flyspell errors out or gives lots of false positives Date: Thu, 20 Aug 2020 12:36:01 -0300 Message-ID: <87eeo1z5we.fsf@disroot.org> References: <878sfvwbr0.fsf@disroot.org> <87mu2qyu94.fsf@disroot.org> <83k0xtcv7a.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19076"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 42248@debbugs.gnu.org, stefan@marxist.se To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 20 17:49:23 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k8moc-0004pR-A4 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 20 Aug 2020 17:49:22 +0200 Original-Received: from localhost ([::1]:53984 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k8mob-0005CD-CJ for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 20 Aug 2020 11:49:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41522) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k8mcg-00024q-HM for bug-gnu-emacs@gnu.org; Thu, 20 Aug 2020 11:37:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60268) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k8mcg-0001lA-7J for bug-gnu-emacs@gnu.org; Thu, 20 Aug 2020 11:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k8mcg-0000cP-55 for bug-gnu-emacs@gnu.org; Thu, 20 Aug 2020 11:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jorge P. de Morais Neto Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Aug 2020 15:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42248 X-GNU-PR-Package: emacs Original-Received: via spool by 42248-submit@debbugs.gnu.org id=B42248.15979377852332 (code B ref 42248); Thu, 20 Aug 2020 15:37:02 +0000 Original-Received: (at 42248) by debbugs.gnu.org; 20 Aug 2020 15:36:25 +0000 Original-Received: from localhost ([127.0.0.1]:43581 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k8mc4-0000bY-EJ for submit@debbugs.gnu.org; Thu, 20 Aug 2020 11:36:25 -0400 Original-Received: from knopi.disroot.org ([178.21.23.139]:47718) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k8mc1-0000bO-V5 for 42248@debbugs.gnu.org; Thu, 20 Aug 2020 11:36:23 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 5EF78529C7; Thu, 20 Aug 2020 17:36:20 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at disroot.org Original-Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VG-PuxKdWwU4; Thu, 20 Aug 2020 17:36:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1597937775; bh=R3xOHoT19C05VZAFgu6abZQe7g1hEFlZ1PkfW0Y3878=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=mIiHSs2DHel59P7J7JYUrOqAGHM0Shd2N5xWn+eROn2x0kErNg9BDAGsDNCjuxlJh DJ16kMQGJ+QW23Bp1E3d5wbITvkw9CkMivqzkxWNjnmXn2jmGEjyqDWbmOAvys83EX 68ac7eCNSUMEvJ1xIrwjw+GjDRzc8TEUX2a5vOIWXRIbiOYhl74drZmSfF3/DMGFZd JDwkL8+Re9Tlp+fjkkK3iNU5txPXuq6Hsd/Vyvxcu8IaW595BM61f+Aa8nKcCsWJ0R JxkLp4/Hvn8kOSMdaQqSL+vHO4mkeINGZ73TMnf9a9w2QjwqMu3CLRX+nGdOlMgemP W8jQBxbw5w0IA== In-Reply-To: <83k0xtcv7a.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:185708 Archived-At: Em [2020-08-20 qui 16:18:01+0300], Eli Zaretskii escreveu: > Do you see the same problem when you invoke Enchant from the shell > prompt? Yes, enchant-2 on the command line misreports numbers: $ enchant-2 -d en_US -l /tmp/enchant-test.txt 2015 Casa 42 $ enchant-2 -d pt_BR -l /tmp/enchant-test.txt doesn't 2015 42 The file /tmp/enchant-test.txt: --8<---------------cut here---------------start------------->8--- doesn't 2015 Casa 42 --8<---------------cut here---------------end--------------->8--- > The examples you provided all work fine for me, although not with > Enchant, so I'm inclined to think this is an Enchant problem. Or > maybe they modified the interface, making it no longer compatible with > ispell.el. In the latter case, someone with access to Enchant will > have to tell us how to modify ispell.el to adapt to the Enchant > changes. > > The error message shown in your original report seems to indicate that > our invocation of Enchant is somehow incorrect, but there isn't enough > information there to understand what is incorrect and how to fix that. I should have given you the value of ispell-dictionary-alist. Sorry. This time I will. So, after executing the following recipe: 1. emacs -Q 2. Evaluate: (progn (setq ispell-program-name "enchant-2") (ispell-change-dictionary "en_US") (insert "doesn't 2015") (ispell-buffer)) Then invoking C-h v ispell-dictionary-alist displays the following value: --8<---------------cut here---------------start------------->8--- ((nil "[[:alpha:]]" "[^[:alpha:]]" #1="" t nil nil utf-8) ("pt_BR" #2="[[:alpha:]]" #3="[^[:alpha:]]" #1# t nil nil utf-8) ("en_GB" #2# #3# #1# t nil nil utf-8) ("en_AU" #2# #3# #1# t nil nil utf-8) ("en_US" #2# #3# #1# t nil nil utf-8) ("en" #2# #3# #1# t nil nil utf-8) ("en_CA" #2# #3# #1# t nil nil utf-8) ("" #2# #3# #1# t nil nil utf-8) ("american" "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B" #4="-d" "en_US") nil utf-8) ("brasileiro" "[A-Z\301\311\315\323\332\300\310\314\322\331\303\325\307\334\302\312\324a-z\341\351\355\363\372\340\350\354\362\371\343\365\347\374\342\352\364]" "[^A-Z\301\311\315\323\332\300\310\314\322\331\303\325\307\334\302\312\324a-z\341\351\355\363\372\340\350\354\362\371\343\365\347\374\342\352\364]" "[']" nil nil nil utf-8) ("british" "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B" #4# "en_GB") nil utf-8) ("castellano" "[A-Z\301\311\315\321\323\332\334a-z\341\351\355\361\363\372\374]" "[^A-Z\301\311\315\321\323\332\334a-z\341\351\355\361\363\372\374]" "[-]" nil ("-B" #4# "es_ES") "~tex" utf-8) ("castellano8" "[A-Z\301\311\315\321\323\332\334a-z\341\351\355\361\363\372\374]" "[^A-Z\301\311\315\321\323\332\334a-z\341\351\355\361\363\372\374]" "[-]" nil ("-B" "-d" "castellano") "~latin1" utf-8) ("czech" "[A-Za-z\301\311\314\315\323\332\331\335\256\251\310\330\317\253\322\341\351\354\355\363\372\371\375\276\271\350\370\357\273\362]" "[^A-Za-z\301\311\314\315\323\332\331\335\256\251\310\330\317\253\322\341\351\354\355\363\372\371\375\276\271\350\370\357\273\362]" #1# nil ("-B" #4# "cs_CZ") nil utf-8) ("dansk" "[A-Z\306\330\305a-z\346\370\345]" "[^A-Z\306\330\305a-z\346\370\345]" "[']" nil ("-C" #4# "da_DK") nil utf-8) ("deutsch" "[a-zA-Z\"]" "[^a-zA-Z\"]" "[']" t ("-C" #4# "de_DE") "~tex" utf-8) ("deutsch8" "[a-zA-Z\304\326\334\344\366\337\374]" "[^a-zA-Z\304\326\334\344\366\337\374]" "[']" t ("-C" "-d" "deutsch") "~latin1" utf-8) ("english" "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B" #4# "en_US") nil utf-8) ("esperanto" "[A-Za-z\246\254\266\274\306\330\335\336\346\370\375\376]" "[^A-Za-z\246\254\266\274\306\330\335\336\346\370\375\376]" "[-']" t ("-C" #4# "eo") "~latin3" utf-8) ("esperanto-tex" "[A-Za-z^\\]" "[^A-Za-z^\\]" "[-'`\"]" t ("-C" "-d" "esperanto") "~tex" utf-8) ("finnish" "[A-Za-z\345\344\366\305\304\326]" "[^A-Za-z\345\344\366\305\304\326]" "[:]" nil ("-C" #4# "fi_FI") "~list" utf-8) ("francais7" "[A-Za-z]" "[^A-Za-z]" "[`'^-]" t nil nil utf-8) ("francais" "[A-Za-z\300\302\306\307\310\311\312\313\316\317\324\331\333\334\340\342\347\350\351\352\353\356\357\364\371\373\374]" "[^A-Za-z\300\302\306\307\310\311\312\313\316\317\324\331\333\334\340\342\347\350\351\352\353\356\357\364\371\373\374]" "[-'.@]" t nil "~list" utf-8) ("francais-tex" "[A-Za-z\300\302\306\307\310\311\312\313\316\317\324\331\333\334\340\342\347\350\351\352\353\356\357\364\371\373\374\\]" "[^A-Za-z\300\302\306\307\310\311\312\313\316\317\324\331\333\334\340\342\347\350\351\352\353\356\357\364\371\373\374\\]" "[-'^`\".@]" t nil "~tex" utf-8) ("german" "[a-zA-Z\"]" "[^a-zA-Z\"]" "[']" t ("-C" #4# "de_DE") "~tex" utf-8) ("german8" "[a-zA-Z\304\326\334\344\366\337\374]" "[^a-zA-Z\304\326\334\344\366\337\374]" "[']" t ("-C" "-d" "german") "~latin1" utf-8) ("italiano" "[A-Z\300\301\310\311\314\315\322\323\331\332a-z\340\341\350\351\354\355\363\371\372]" "[^A-Z\300\301\310\311\314\315\322\323\331\332a-z\340\341\350\351\354\355\363\371\372]" "[-.]" nil ("-B" "-d" "italian") "~tex" utf-8) ("nederlands" "[A-Za-z\300\301\302\303\304\305\307\310\311\312\313\314\315\316\317\322\323\324\325\326\331\332\333\334\340\341\342\343\344\345\347\350\351\352\353\354\355\356\357\361\362\363\364\365\366\371\372\373\374]" "[^A-Za-z\300\301\302\303\304\305\307\310\311\312\313\314\315\316\317\322\323\324\325\326\331\332\333\334\340\341\342\343\344\345\347\350\351\352\353\354\355\356\357\361\362\363\364\365\366\371\372\373\374]" "[']" t ("-C" #4# "nl_NL") nil utf-8) ("nederlands8" "[A-Za-z\300\301\302\303\304\305\307\310\311\312\313\314\315\316\317\322\323\324\325\326\331\332\333\334\340\341\342\343\344\345\347\350\351\352\353\354\355\356\357\361\362\363\364\365\366\371\372\373\374]" "[^A-Za-z\300\301\302\303\304\305\307\310\311\312\313\314\315\316\317\322\323\324\325\326\331\332\333\334\340\341\342\343\344\345\347\350\351\352\353\354\355\356\357\361\362\363\364\365\366\371\372\373\374]" "[']" t ("-C" #4# "nl_NL") nil utf-8) ("norsk" "[A-Za-z\305\306\307\310\311\322\324\330\345\346\347\350\351\362\364\370]" "[^A-Za-z\305\306\307\310\311\322\324\330\345\346\347\350\351\362\364\370]" "[\"]" nil nil "~list" utf-8) ("norsk7-tex" "[A-Za-z{}\\'^`]" "[^A-Za-z{}\\'^`]" "[\"]" nil ("-d" "norsk") "~plaintex" utf-8) ("polish" "[A-Za-z\241\243\246\254\257\261\263\266\274\277\306\312\321\323\346\352\361\363]" "[^A-Za-z\241\243\246\254\257\261\263\266\274\277\306\312\321\323\346\352\361\363]" "[.]" nil nil nil utf-8) ("portugues" "[a-zA-Z\301\302\307\311\323\340\341\342\351\352\355\363\343\347\372]" "[^a-zA-Z\301\302\307\311\323\340\341\342\351\352\355\363\343\347\372]" "[']" t ("-C" #4# "pt_PT") "~latin1" utf-8) ("russian" "[\341\342\367\347\344\345\263\366\372\351\352\353\354\355\356\357\360\362\363\364\365\346\350\343\376\373\375\370\371\377\374\340\361\301\302\327\307\304\305\243\326\332\311\312\313\314\315\316\317\320\322\323\324\325\306\310\303\336\333\335\330\331\337\334\300\321]" "[^\341\342\367\347\344\345\263\366\372\351\352\353\354\355\356\357\360\362\363\364\365\346\350\343\376\373\375\370\371\377\374\340\361\301\302\327\307\304\305\243\326\332\311\312\313\314\315\316\317\320\322\323\324\325\306\310\303\336\333\335\330\331\337\334\300\321]" #1# nil nil nil utf-8) ("russianw" "[\300\301\302\303\304\305\250\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\334\333\332\335\336\337\340\341\342\343\344\345\270\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\374\373\372\375\376\377]" "[^\300\301\302\303\304\305\250\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\334\333\332\335\336\337\340\341\342\343\344\345\270\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\374\373\372\375\376\377]" #1# nil nil nil utf-8) ("slovak" "[A-Za-z\301\304\311\315\323\332\324\300\305\245\335\256\251\310\317\253\322\341\344\351\355\363\372\364\340\345\265\375\276\271\350\357\273\362]" "[^A-Za-z\301\304\311\315\323\332\324\300\305\245\335\256\251\310\317\253\322\341\344\351\355\363\372\364\340\345\265\375\276\271\350\357\273\362]" #1# nil ("-B" #4# "sk_SK") nil utf-8) ("slovenian" "[A-Za-z\301\304\311\315\323\332\324\300\305\245\335\256\251\310\317\253\322\341\344\351\355\363\372\364\340\345\265\375\276\271\350\357\273\362]" "[^A-Za-z\301\304\311\315\323\332\324\300\305\245\335\256\251\310\317\253\322\341\344\351\355\363\372\364\340\345\265\375\276\271\350\357\273\362]" #1# nil ("-B" "-d" "slovenian") nil utf-8) ("svenska" "[A-Za-z\345\344\366\351\340\374\350\346\370\347\305\304\326\311\300\334\310\306\330\307]" "[^A-Za-z\345\344\366\351\340\374\350\346\370\347\305\304\326\311\300\334\310\306\330\307]" "[']" nil ("-C" #4# "sv_SE") "~list" utf-8) ("hebrew" "[\340\341\342\343\344\345\346\347\350\351\353\352\354\356\355\360\357\361\362\364\363\367\366\365\370\371\372]" "[^\340\341\342\343\344\345\346\347\350\351\353\352\354\356\355\360\357\361\362\364\363\367\366\365\370\371\372]" #1# nil ("-B" #4# "he_IL") nil utf-8)) --8<---------------cut here---------------end--------------->8--- Therefore, the list for "american" specifies `("-B" #4="-d" "en_US")' as ISPELL-ARGS. However, enchant-2 does not take a "-B" flag: $ enchant-2 -B -d en_US /tmp/enchant-test.txt Usage: enchant-2 -a|-l|-h|-v [-L] [-d DICTIONARY] [FILE] -d DICTIONARY use the given dictionary -a list suggestions in ispell pipe mode format -l list only the misspellings -L display line numbers -h display help and exit -v display version information and exit $ enchant-2 -B -d en_US -l /tmp/enchant-test.txt Usage: enchant-2 -a|-l|-h|-v [-L] [-d DICTIONARY] [FILE] -d DICTIONARY use the given dictionary -a list suggestions in ispell pipe mode format -l list only the misspellings -L display line numbers -h display help and exit -v display version information and exit Also, the list for "en_US" specifies "" for OTHERCHARS, but, IIUC, it ought to be "[']" instead. In fact, I just apparently found a workaround for the Flyspell problem with contractions. 1. emacs -Q 2. Evaluate (progn (setq ispell-program-name "enchant-2") (ispell-change-dictionary "en_US") (setf (cadddr (assoc "en_US" ispell-dictionary-alist)) (cadddr (assoc "american" ispell-dictionary-alist))) (insert "doesn't 2015") (flyspell-buffer)) Unfortunately this workaround did not solve the problem of ispell-buffer misreporting with numbers. Anyway, I will test it for longer, then later I will report whether it really solved the Flyspell contraction problem. Regards -- - - I am Brazilian. I hope my English is correct and I welcome feedback. - -