GNU bug report logs -
#39483
27.0.60; ispell ignores syntax/category tables word boundaries
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
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 39483 <at> debbugs.gnu.org.
--
39483: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=39483
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
> From: "Paul W. Rankin" <hello <at> paulwrankin.com>
> Cc: 39483 <at> debbugs.gnu.org
> 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.
[Message part 3 (message/rfc822, inline)]
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
This bug report was last modified 5 years and 185 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.