Subject: bug#39483: closed (Re: bug#39483: 27.0.60; ispell ignores syntax/category tables word boundaries)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 08 Feb 2020 10:07:02 +0000

Your bug report

#39483: 27.0.60; ispell ignores syntax/category tables word boundaries

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
39483: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=39483
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#39483: 27.0.60; ispell ignores syntax/category tables word boundaries
From: Eli Zaretskii <[email-masked]>
To: "Paul W. Rankin" <[email-masked]>
Cc: [email-masked]
Date: Sat, 08 Feb 2020 12:06:25 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: "Paul W. Rankin" <[email-masked]>
> Cc: [email-masked]
> Date: Sat, 08 Feb 2020 19:28:40 +1000
> 
> As it turns out it was just a case of customising
> ispell-local-dictionary-alist and adding both a default and "en_US"
> entry with OTHERCHARS regexp as "['’]" pretty much exactly as the
> docstring on ispell-dictionary-alist says.

OK, thanks.  With that, I'm closing the bug report.

Subject: 27.0.60; ispell ignores syntax/category tables word boundaries
From: "Paul W. Rankin" <[email-masked]>
To: [email-masked]
Date: Sat, 08 Feb 2020 01:44:52 +1000
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

It appears that the function `ispell-get-word' makes its own judgements
on word boundaries, ignoring the buffer's syntax tables and character
categories. This becomes a problem with using `electric-quote-mode' and
ispell, because contractions are parsed as separate words. e.g. Calling
`ispell-word' for "doesn’t" returns:

    T is correct

To reproduce:

1. emacs -Q
2. (in *scratch*) M-x text-mode RET
3. enter text "doesn’t" (i.e. "doesn" C-x 8 ] "t")
4. M-: (modify-syntax-entry ?’ "w")
5. M-: (modify-category-entry ?’ ?^)
6. M-$ | ispell-word

Expected results:

Given the above syntax and category tables, M-f | forward-word and M-b |
backward-word now consider "doesn’t" as a single word, and so should
should be passed to the `ispell-program-name' and produce the same
result as when checked on the command line:

    % echo "doesn’t" | aspell -a
    @(#) International Ispell Version 3.1.20 (but really Aspell 0.60.8)
    *
    % echo "doesn’t" | enchant-2 -a
    @(#) International Ispell Version 3.1.20 (but really Enchant 2.2.7)
    *

Actual results:

The word "doesn’t" is parsed as "t":
    T is correct

Attempts at workarounds:

I've tried altering slot 3 of the corresponding `ispell-dictionary-base-alist'
entries from "[']" to "['’]" to no avail.

Setup:

GNU Emacs 27.0.60 (build 2, x86_64-apple-darwin19.3.0, NS appkit-1894.30
Version 10.15.3 (Build 19D76)) of 2020-02-05

-- 
Paul W. Rankin
https://www.paulwrankin.com