GNU bug report logs - #67857
30.0.50; ispell fails on apostrophes when the dictionary includes contractions

Previous Next

Package: emacs;

Reported by: Bob Rogers <rogers <at> rgrjr.com>

Date: Sat, 16 Dec 2023 21:05:02 UTC

Severity: normal

Tags: notabug

Found in version 30.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #13 received at 67857 <at> debbugs.gnu.org (full text, mbox):

From: Bob Rogers <rogers <at> rgrjr.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 67857 <at> debbugs.gnu.org
Subject: Re: bug#67857: 30.0.50;
 ispell fails on apostrophes when the dictionary includes contractions
Date: Sun, 17 Dec 2023 13:22:07 -0800
   From: Eli Zaretskii <eliz <at> gnu.org>
   Date: Sun, 17 Dec 2023 08:59:42 +0200

   > Date: Sat, 16 Dec 2023 13:03:46 -0800
   > From: Bob Rogers <rogers <at> rgrjr.com>
   > 
   > . . .
   > 
   >    4.  Type M-$.  The sole offered replacement is "wouldn't" but the
   > text it offers to replace is "wiouldn"; typing "0" to take the
   > replacement results in "this wouldn't't work" in the buffer.

   Doesn't happen for me . . .

   You are looking at the wrong places to try fixing this.  First, the
   default for OTHERCHARS in English and American dictionaries is "[']"
   (see ispell-dictionary-base-alist), and likewise for the "default"
   dictionary, so this already includes the apostrophe.

Yes, I see this.

   However, when ispell.el uses Hunspell, it doesn't use this database
   for OTHERCHARS; instead, it looks in the dictionary's affix file, see
   ispell-parse-hunspell-affix-file.  So you should look in your affix
   file and see if the apostrophe is mentioned there.  In my affix file
   for English, I see this line:

     WORDCHARS 0123456789'

   which includes the apostrophe.  See hunspell(4) man page for more
   details about the affix file and its settings.

Yes, this is my problem; the apostrophe was missing, and ispell DTRT
when I add it.  (I think I understand now what "different character
maps" means.)  Thanks for pointing me in the right direction.

   My affix file also has this line, which also includes the apostrophe:

     TRY esianrtolcdugmphbyfvkwzESIANRTOLCDUGMPHBYFVKWZ'-

   Not sure if it's relevant, but I though I'd mention it for
   completeness.

Mine has the apostrophe (though not the hyphen), so I left it alone.

   I see no bug in Emacs here.  ispell.el works as intended.

Agreed; this is probably an openSUSE config problem.  Unfortunately, I
can't file a bug with them because they are still shipping 27.2 (at
least in their openSUSE Leap 15.5 release) and I can't reproduce this
issue in that version.

					-- Bob




This bug report was last modified 1 year and 160 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.