* bug#13109: 24.1; flyspell highlights words containing curly quotes which ispell-buffer accepts
@ 2012-12-06 23:59 Reuben Thomas
2012-12-07 6:29 ` Eli Zaretskii
2015-06-26 11:46 ` bug#13109: Thanks Reuben Thomas
0 siblings, 2 replies; 14+ messages in thread
From: Reuben Thomas @ 2012-12-06 23:59 UTC (permalink / raw)
To: 13109
Insert "didn’t" in the scratch buffer (note the curly quote).
ispell-buffer gives the buffer a clean bill of health, but turning on
flyspell-mode highlights “didn”. My default dictionary is british, and
ispell-buffer uses aspell by default on my system.
In GNU Emacs 24.1.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.12)
of 2012-09-22 on batsu, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11300000
Configured using:
`configure '--build' 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu'
'--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib'
'--localstatedir=/var/lib' '--infodir=/usr/share/info'
'--mandir=/usr/share/man' '--with-pop=yes'
'--enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.1/site-lisp:/usr/share/emacs/site-lisp'
'--with-crt-dir=/usr/lib/x86_64-linux-gnu' '--with-x=yes'
'--with-x-toolkit=gtk' '--with-toolkit-scroll-bars'
'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector
--param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -O2'
'CPPFLAGS=-D_FORTIFY_SOURCE=2''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: en_GB.UTF-8
value of $LC_NUMERIC: en_GB.UTF-8
value of $LC_TIME: en_GB.UTF-8
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: nil
locale-coding-system: utf-8-unix
default enable-multibyte-characters: t
Major mode: Text
Minor modes in effect:
shell-dirtrack-mode: t
TeX-PDF-mode: t
buffer-face-mode: t
flyspell-mode: t
smart-quotes-mode: t
recentf-mode: t
show-paren-mode: t
server-mode: t
savehist-mode: t
minibuffer-electric-default-mode: t
iswitchb-mode: t
icomplete-mode: t
global-auto-revert-mode: t
desktop-save-mode: t
tooltip-mode: t
mouse-wheel-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
column-number-mode: t
line-number-mode: t
visual-line-mode: t
transient-mark-mode: t
Recent input:
d SPC t h e SPC i d e n t i t y SPC o f SPC t h e SPC
a u t h o r SPC w h e n SPC t h <backspace> <backspace>
h e SPC i n v e s t i g a t e d SPC t h e SPC s t a
o <backspace> <backspace> o r y SPC o f SPC t h e SPC
m a n u s c r i p t SPC i n SPC A m s e t e r <backspace>
<backspace> <backspace> <backspace> t e r d a , <backspace>
m , SPC h a v i n g SPC b y SPC c h a n c e S-SPC (
) <S-backspace> ? ) S-SPC c o m e SPC a c r o s s SPC
t h e SPC m a n u s c r i p t . C-p M-f M-f M-f M-f
M-b C-b M-d M-d M-d C-n C-e SPC H e SPC g <backspace>
h i m s e l f SPC d i d n ' t SPC m a k e SPC a SPC
f u s s SPC M-x i s p e l l - b u f f e r <return>
C-x C-f ~ / f o o <return> d i d n ' t C-a M-x i p
e l l <backspace> <backspace> <backspace> s <backspace>
<backspace> s p e l l - b u f f C-g <right> <right>
<right> <right> <right> <left> C-SPC C-f M-w C-x k
<return> y e s <return> M-x r e p o r t - e a c s <backspace>
<backspace> <backspace> m a c s - b u f <backspace>
g <return>
Recent messages:
Wrote /home/rrt/Writing/Poetry/youth/youth.tex
(New file)
Auto-saving...done
Visual-Line mode enabled
Auto-saving...done
Auto-saving...done
Spell-checking Mason's story using aspell with british dictionary...done
(New file)
Quit
Mark set
Load-path shadows:
/home/rrt/local/share/emacs/site-lisp/dict hides /usr/share/emacs24/site-lisp/emacs-goodies-el/dict
/home/rrt/local/share/emacs/site-lisp/browse-kill-ring hides /usr/share/emacs24/site-lisp/emacs-goodies-el/browse-kill-ring
/home/rrt/.emacs.d/elpa/dictionary-1.8.7/link hides /usr/share/emacs24/site-lisp/dictionary-el/link
/home/rrt/.emacs.d/elpa/dictionary-1.8.7/dictionary hides /usr/share/emacs24/site-lisp/dictionary-el/dictionary
/home/rrt/.emacs.d/elpa/dictionary-1.8.7/dictionary-init hides /usr/share/emacs24/site-lisp/dictionary-el/dictionary-init
/home/rrt/.emacs.d/elpa/dictionary-1.8.7/connection hides /usr/share/emacs24/site-lisp/dictionary-el/connection
/usr/share/emacs/site-lisp/golang-mode/go-mode-load hides /usr/share/emacs/24.1/site-lisp/golang-mode/go-mode-load
/usr/share/emacs/site-lisp/golang-mode/go-mode hides /usr/share/emacs/24.1/site-lisp/golang-mode/go-mode
/usr/share/emacs/24.1/site-lisp/cmake-data/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode
/usr/share/emacs24/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/24.1/lisp/textmodes/ispell
/usr/share/emacs24/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/24.1/lisp/textmodes/flyspell
/usr/share/emacs/site-lisp/rst hides /usr/share/emacs/24.1/lisp/textmodes/rst
Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils dired-aux texmathp locate dired shell pcomplete
grep inform-mode help-mode view add-log log-view pcvs-util vc ediff-merg
ediff-diff ediff-wind ediff-help ediff-util ediff-mult ediff-init ediff
vc-dispatcher multi-isearch sh-script executable conf-mode newcomment
jka-compr etags latexenc nxml-uchnm rng-nxml rng-valid rng-loc rng-uri
rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns
nxml-mode nxml-outln nxml-rap nxml-util nxml-glyph nxml-enc xmltok
make-mode autoconf autoconf-mode vc-git lua-mode cperl-mode preview
prv-emacs info reporter tex-buf noutline outline font-latex latex
tex-style tex cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles
cc-align cc-engine cc-vars cc-defs flymake compile comint ansi-color
ring face-remap regexp-opt flyspell ispell smart-quotes
auto-dictionary-autoloads c-eldoc-autoloads dictionary-autoloads
diff-git-autoloads dired-isearch-autoloads full-ack-autoloads
guess-style-autoloads kill-ring-search-autoloads magit-autoloads
mv-shell-autoloads tumble-autoloads http-post-simple-autoloads package
tabulated-list completing-help recentf tree-widget wid-edit uniquify
paren server savehist minibuf-eldef iswitchb icomplete autorevert
desktop cus-start cus-load ropemacs pymacs user-site-loaddefs advice
advice-preload yasnippet help-fns derived edmacro kmacro easymenu assoc
cl go-mode-load emacs-goodies-el emacs-goodies-custom
emacs-goodies-loaddefs easy-mmode preview-latex tex-site auto-loads
time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd
tool-bar dnd fontset image fringe lisp-mode register page menu-bar
rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax
facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak
czech european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces
cus-face files text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget hashtable-print-readable backquote
make-network-process dbusbind dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)
--
http://rrt.sc3d.org/
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#13109: 24.1; flyspell highlights words containing curly quotes which ispell-buffer accepts
2012-12-06 23:59 bug#13109: 24.1; flyspell highlights words containing curly quotes which ispell-buffer accepts Reuben Thomas
@ 2012-12-07 6:29 ` Eli Zaretskii
[not found] ` <CAOnWdoiiaW0gvHTEuunsZvkqn8a6A4tLsQC4WoF3jgy40onjMg@mail.gmail.com>
2015-06-26 11:46 ` bug#13109: Thanks Reuben Thomas
1 sibling, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2012-12-07 6:29 UTC (permalink / raw)
To: Reuben Thomas; +Cc: 13109
> From: Reuben Thomas <rrt@sc3d.org>
> Date: Thu, 06 Dec 2012 23:59:11 +0000
>
> Insert "didn’t" in the scratch buffer (note the curly quote).
> ispell-buffer gives the buffer a clean bill of health, but turning on
> flyspell-mode highlights “didn”. My default dictionary is british, and
> ispell-buffer uses aspell by default on my system.
Please try a newer Emacs, I think this bug was already fixed. At
least I cannot reproduce this with the current emacs-24 branch.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#13109: 24.1; flyspell highlights words containing curly quotes which ispell-buffer accepts
[not found] ` <CAOnWdoiiaW0gvHTEuunsZvkqn8a6A4tLsQC4WoF3jgy40onjMg@mail.gmail.com>
@ 2012-12-07 13:57 ` Eli Zaretskii
2012-12-07 15:27 ` Reuben Thomas
0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2012-12-07 13:57 UTC (permalink / raw)
To: Reuben Thomas; +Cc: 13109
> Date: Fri, 7 Dec 2012 12:52:29 +0000
> From: Reuben Thomas <rrt@sc3d.org>
>
> > > From: Reuben Thomas <rrt@sc3d.org>
> > > Date: Thu, 06 Dec 2012 23:59:11 +0000
> > >
> > > Insert "didn’t" in the scratch buffer (note the curly quote).
> > > ispell-buffer gives the buffer a clean bill of health, but turning on
> > > flyspell-mode highlights “didn”. My default dictionary is british, and
> > > ispell-buffer uses aspell by default on my system.
> >
> > Please try a newer Emacs, I think this bug was already fixed. At
> > least I cannot reproduce this with the current emacs-24 branch.
> >
> > I just checked out out the emacs-24 branch, and I can reproduce this bug,
> running emacs -Q and proceeding as in my original report.
Sorry, that's my bad: I didn't "note the curly quote".
But with that character, ispell-buffer also wants me to correct
"didn". So both commands are consistent on my machine. But then I
don't work on en_GB.UTF-8 locale, and I'm guessing your ispell is
neither real ispell nor hunspell, which are two spellers I tested this
with.
P.S. Please keep the bug address on the CC list, so that this
discussion gets archived by the bug tracker.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#13109: 24.1; flyspell highlights words containing curly quotes which ispell-buffer accepts
2012-12-07 13:57 ` Eli Zaretskii
@ 2012-12-07 15:27 ` Reuben Thomas
2012-12-09 21:24 ` Reuben Thomas
0 siblings, 1 reply; 14+ messages in thread
From: Reuben Thomas @ 2012-12-07 15:27 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 13109
[-- Attachment #1: Type: text/plain, Size: 1388 bytes --]
On Dec 7, 2012 1:57 PM, "Eli Zaretskii" <eliz@gnu.org> wrote:
>
> > Date: Fri, 7 Dec 2012 12:52:29 +0000
> > From: Reuben Thomas <rrt@sc3d.org>
> >
> > > > From: Reuben Thomas <rrt@sc3d.org>
> > > > Date: Thu, 06 Dec 2012 23:59:11 +0000
> > > >
> > > > Insert "didn’t" in the scratch buffer (note the curly quote).
> > > > ispell-buffer gives the buffer a clean bill of health, but turning
on
> > > > flyspell-mode highlights “didn”. My default dictionary is british,
and
> > > > ispell-buffer uses aspell by default on my system.
> > >
> > > Please try a newer Emacs, I think this bug was already fixed. At
> > > least I cannot reproduce this with the current emacs-24 branch.
> > >
> > > I just checked out out the emacs-24 branch, and I can reproduce this
bug,
> > running emacs -Q and proceeding as in my original report.
>
> Sorry, that's my bad: I didn't "note the curly quote".
>
> But with that character, ispell-buffer also wants me to correct
> "didn". So both commands are consistent on my machine. But then I
> don't work on en_GB.UTF-8 locale, and I'm guessing your ispell is
> neither real ispell nor hunspell, which are two spellers I tested this
> with.
As I said originally, I'm using aspell.
> P.S. Please keep the bug address on the CC list, so that this
> discussion gets archived by the bug tracker.
Apologies for the error.
[-- Attachment #2: Type: text/html, Size: 1882 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#13109: 24.1; flyspell highlights words containing curly quotes which ispell-buffer accepts
2012-12-07 15:27 ` Reuben Thomas
@ 2012-12-09 21:24 ` Reuben Thomas
2012-12-10 23:34 ` Juri Linkov
0 siblings, 1 reply; 14+ messages in thread
From: Reuben Thomas @ 2012-12-09 21:24 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 13109
[-- Attachment #1: Type: text/plain, Size: 1511 bytes --]
On 7 December 2012 15:27, Reuben Thomas <rrt@sc3d.org> wrote:
> On Dec 7, 2012 1:57 PM, "Eli Zaretskii" <eliz@gnu.org> wrote:
> >
> > > Date: Fri, 7 Dec 2012 12:52:29 +0000
> > > From: Reuben Thomas <rrt@sc3d.org>
> > >
> > > > > From: Reuben Thomas <rrt@sc3d.org>
> > > > > Date: Thu, 06 Dec 2012 23:59:11 +0000
> > > > >
> > > > > Insert "didn’t" in the scratch buffer (note the curly quote).
> > > > > ispell-buffer gives the buffer a clean bill of health, but turning
> on
> > > > > flyspell-mode highlights “didn”. My default dictionary is british,
> and
> > > > > ispell-buffer uses aspell by default on my system.
> > > >
> > > > Please try a newer Emacs, I think this bug was already fixed. At
> > > > least I cannot reproduce this with the current emacs-24 branch.
> > > >
> > > > I just checked out out the emacs-24 branch, and I can reproduce this
> bug,
> > > running emacs -Q and proceeding as in my original report.
> >
> > Sorry, that's my bad: I didn't "note the curly quote".
> >
> > But with that character, ispell-buffer also wants me to correct
> > "didn". So both commands are consistent on my machine. But then I
> > don't work on en_GB.UTF-8 locale, and I'm guessing your ispell is
> > neither real ispell nor hunspell, which are two spellers I tested this
> > with.
>
> As I said originally, I'm using aspell.
>
I just repeated the experiment with a built of the default branch of emacs,
and obtained the same results.
--
http://rrt.sc3d.org
[-- Attachment #2: Type: text/html, Size: 2319 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#13109: 24.1; flyspell highlights words containing curly quotes which ispell-buffer accepts
2012-12-09 21:24 ` Reuben Thomas
@ 2012-12-10 23:34 ` Juri Linkov
2012-12-11 16:20 ` Reuben Thomas
0 siblings, 1 reply; 14+ messages in thread
From: Juri Linkov @ 2012-12-10 23:34 UTC (permalink / raw)
To: Reuben Thomas; +Cc: 13109
> I just repeated the experiment with a built of the default branch of emacs,
> and obtained the same results.
It seems we can do nothing to fix this. `ispell-aspell-find-dictionary'
reads the ispell data from /usr/lib/aspell/en.dat that contains
name en
charset iso8859-1
special ' -*-
soundslike en
affix en
#repl-table en_affix.dat
where `special' defines just a straight quote.
The meaning of -*- is described in `ispell-aspell-find-dictionary' as
;; The line looks like: special ' -** - -** . -** : -*-
;; -** means that this character
;; - doesn't appear at word start
;; * may appear in the middle of a word
;; * may appear at word end
And we can't add the curly quote in `ispell-aspell-find-dictionary' explicitly
because /usr/lib/aspell/en.dat defines the charset iso8859-1, but the curly quote
is from the charset utf-8.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#13109: 24.1; flyspell highlights words containing curly quotes which ispell-buffer accepts
2012-12-10 23:34 ` Juri Linkov
@ 2012-12-11 16:20 ` Reuben Thomas
2012-12-11 23:07 ` Juri Linkov
0 siblings, 1 reply; 14+ messages in thread
From: Reuben Thomas @ 2012-12-11 16:20 UTC (permalink / raw)
To: Juri Linkov; +Cc: 13109
[-- Attachment #1: Type: text/plain, Size: 842 bytes --]
On 10 December 2012 23:34, Juri Linkov <juri@jurta.org> wrote:
> > I just repeated the experiment with a built of the default branch of
> emacs,
> > and obtained the same results.
>
> It seems we can do nothing to fix this. `ispell-aspell-find-dictionary'
> reads the ispell data from /usr/lib/aspell/en.dat that contains
>
> name en
> charset iso8859-1
> special ' -*-
> soundslike en
> affix en
> #repl-table en_affix.dat
>
> where `special' defines just a straight quote.
>
Support for curly quotes in aspell appears to be partial and unreleased,
but Debian currently packages an unreleased version with this support; see:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=533378
Hence, the support does exist, and, as I reported above, it works fine when
using ispell-buffer; it's only with flyspell that it doesn't work.
[-- Attachment #2: Type: text/html, Size: 1317 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#13109: 24.1; flyspell highlights words containing curly quotes which ispell-buffer accepts
2012-12-11 16:20 ` Reuben Thomas
@ 2012-12-11 23:07 ` Juri Linkov
2013-05-03 20:15 ` Reuben Thomas
0 siblings, 1 reply; 14+ messages in thread
From: Juri Linkov @ 2012-12-11 23:07 UTC (permalink / raw)
To: Reuben Thomas; +Cc: 13109
>> `ispell-aspell-find-dictionary' reads the ispell data from
>> /usr/lib/aspell/en.dat that contains
>>
>> name en
>> charset iso8859-1
>> special ' -*-
>> soundslike en
>> affix en
>> #repl-table en_affix.dat
>
> Support for curly quotes in aspell appears to be partial and unreleased,
> but Debian currently packages an unreleased version with this support; see:
>
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=533378
Thanks for the link. It refers to the diff at
http://launchpadlibrarian.net/82990151/aspell_0.60.6-6_0.60.7~20110707-1.diff.gz
that includes the following fix that implements the
support for curly quotes in aspell:
diff -Nru aspell-0.60.6/data/iso-8859-1.cmap aspell-0.60.7~20110707/data/iso-8859-1.cmap
@@ -892,6 +892,7 @@
2009 > 20 # compat
200A > 20 # compat
+2019 > 27 # compat
2024 > 2E # compat
2025 > 2E 2E # compat
This fix means that aspell developers added a mapping from
2019 (RIGHT SINGLE QUOTATION MARK) to 27 (APOSTROPHE)
in their character `compat' table. This explains why
`ispell-buffer' does work while `ispell-word' and `flyspell' don't.
`ispell-word' and `flyspell' still use the information from
/usr/lib/aspell/en.dat to parse the buffer to find the next word to check,
and fail because they don't use the `compat' mappings from iso-8859-1.cmap.
Applying a solution similar to the aspell fix above means that
`ispell-get-word' should consult a character equivalence table
(to be added in bug#13041 and bug#13131) and match curly quotes
as straight quotes while searching the next word to check.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#13109: 24.1; flyspell highlights words containing curly quotes which ispell-buffer accepts
2012-12-11 23:07 ` Juri Linkov
@ 2013-05-03 20:15 ` Reuben Thomas
2013-05-03 20:20 ` Reuben Thomas
0 siblings, 1 reply; 14+ messages in thread
From: Reuben Thomas @ 2013-05-03 20:15 UTC (permalink / raw)
To: Juri Linkov; +Cc: 13109
[-- Attachment #1: Type: text/plain, Size: 1390 bytes --]
On 11 December 2012 23:07, Juri Linkov <juri@jurta.org> wrote:
> >> `ispell-aspell-find-dictionary' reads the ispell data from
> This fix means that aspell developers added a mapping from
> 2019 (RIGHT SINGLE QUOTATION MARK) to 27 (APOSTROPHE)
> in their character `compat' table. This explains why
> `ispell-buffer' does work while `ispell-word' and `flyspell' don't.
>
> `ispell-word' and `flyspell' still use the information from
> /usr/lib/aspell/en.dat to parse the buffer to find the next word to check,
> and fail because they don't use the `compat' mappings from iso-8859-1.cmap.
>
This finally annoyed me sufficiently that I decided I wanted a workaround.
Fortunately, this is easy, as it merely involves reapplying a version of
the fix I used to use when ispell-buffer didn't work. I now have the
following line in my custom.el:
'(ispell-local-dictionary-alist (quote (("british" "[[:alpha:]]"
"[^[:alpha:]]" "'’" t ("-d" "en_GB") nil utf-8))))
I've copied the default settings and added a curly single quote to the list
of permitted "other characters". I imagine one can do the same for other
languages. It's ugly (principally because it copies rather than overwriting
information) but that information (the other entries in the record) doesn't
change often, so it'll do until a more comprehensive solution is applied.
--
http://rrt.sc3d.org
[-- Attachment #2: Type: text/html, Size: 1971 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#13109: 24.1; flyspell highlights words containing curly quotes which ispell-buffer accepts
2013-05-03 20:15 ` Reuben Thomas
@ 2013-05-03 20:20 ` Reuben Thomas
2013-05-03 20:48 ` Reuben Thomas
[not found] ` <mailman.25084.1367614166.855.bug-gnu-emacs@gnu.org>
0 siblings, 2 replies; 14+ messages in thread
From: Reuben Thomas @ 2013-05-03 20:20 UTC (permalink / raw)
To: Juri Linkov; +Cc: 13109
[-- Attachment #1: Type: text/plain, Size: 1812 bytes --]
On 3 May 2013 21:15, Reuben Thomas <rrt@sc3d.org> wrote:
> On 11 December 2012 23:07, Juri Linkov <juri@jurta.org> wrote:
>
>> >> `ispell-aspell-find-dictionary' reads the ispell data from
>> This fix means that aspell developers added a mapping from
>> 2019 (RIGHT SINGLE QUOTATION MARK) to 27 (APOSTROPHE)
>> in their character `compat' table. This explains why
>> `ispell-buffer' does work while `ispell-word' and `flyspell' don't.
>>
>> `ispell-word' and `flyspell' still use the information from
>> /usr/lib/aspell/en.dat to parse the buffer to find the next word to check,
>> and fail because they don't use the `compat' mappings from
>> iso-8859-1.cmap.
>>
>
> This finally annoyed me sufficiently that I decided I wanted a workaround.
> Fortunately, this is easy, as it merely involves reapplying a version of
> the fix I used to use when ispell-buffer didn't work. I now have the
> following line in my custom.el:
>
> '(ispell-local-dictionary-alist (quote (("british" "[[:alpha:]]"
> "[^[:alpha:]]" "'’" t ("-d" "en_GB") nil utf-8))))
>
> I've copied the default settings and added a curly single quote to the
> list of permitted "other characters". I imagine one can do the same for
> other languages. It's ugly (principally because it copies rather than
> overwriting information) but that information (the other entries in the
> record) doesn't change often, so it'll do until a more comprehensive
> solution is applied.
>
Belay that, it doesn't work. It seems I have to type a new word for
flyspell to complain; merely passing the cursor over an old one (which
suffices to remove a highlight in a word that has been added to the
dictionary) does not suffice.
If anyone can offer a functioning workaround, I'd be most grateful.
--
http://rrt.sc3d.org
[-- Attachment #2: Type: text/html, Size: 2788 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#13109: 24.1; flyspell highlights words containing curly quotes which ispell-buffer accepts
2013-05-03 20:20 ` Reuben Thomas
@ 2013-05-03 20:48 ` Reuben Thomas
[not found] ` <mailman.25084.1367614166.855.bug-gnu-emacs@gnu.org>
1 sibling, 0 replies; 14+ messages in thread
From: Reuben Thomas @ 2013-05-03 20:48 UTC (permalink / raw)
To: Juri Linkov; +Cc: 13109
[-- Attachment #1: Type: text/plain, Size: 2947 bytes --]
On 3 May 2013 21:20, Reuben Thomas <rrt@sc3d.org> wrote:
> On 3 May 2013 21:15, Reuben Thomas <rrt@sc3d.org> wrote:
>
>> On 11 December 2012 23:07, Juri Linkov <juri@jurta.org> wrote:
>>
>>> >> `ispell-aspell-find-dictionary' reads the ispell data from
>>> This fix means that aspell developers added a mapping from
>>> 2019 (RIGHT SINGLE QUOTATION MARK) to 27 (APOSTROPHE)
>>> in their character `compat' table. This explains why
>>> `ispell-buffer' does work while `ispell-word' and `flyspell' don't.
>>>
>>> `ispell-word' and `flyspell' still use the information from
>>> /usr/lib/aspell/en.dat to parse the buffer to find the next word to
>>> check,
>>> and fail because they don't use the `compat' mappings from
>>> iso-8859-1.cmap.
>>>
>>
>> This finally annoyed me sufficiently that I decided I wanted a
>> workaround. Fortunately, this is easy, as it merely involves reapplying a
>> version of the fix I used to use when ispell-buffer didn't work. I now have
>> the following line in my custom.el:
>>
>> '(ispell-local-dictionary-alist (quote (("british" "[[:alpha:]]"
>> "[^[:alpha:]]" "'’" t ("-d" "en_GB") nil utf-8))))
>>
>> I've copied the default settings and added a curly single quote to the
>> list of permitted "other characters". I imagine one can do the same for
>> other languages. It's ugly (principally because it copies rather than
>> overwriting information) but that information (the other entries in the
>> record) doesn't change often, so it'll do until a more comprehensive
>> solution is applied.
>>
>
> Belay that, it doesn't work. It seems I have to type a new word for
> flyspell to complain; merely passing the cursor over an old one (which
> suffices to remove a highlight in a word that has been added to the
> dictionary) does not suffice.
>
> If anyone can offer a functioning workaround, I'd be most grateful.
>
I read the documentation for ispell-dictionary-alist more carefully, and
came up with:
'(ispell-local-dictionary-alist (quote (("british" "[[:alpha:]]"
"[^[:alpha:]]" "['’]" t ("-d" "en_GB") nil utf-8))))
where I made the "others" character set a character class.
I checked the aspell command actually being run (with "ps") to ensure that
it is indeed using "-d en_GB", and if I change the second argument to the
(bizarre) setting of "fr_FR", this is used, so my settings in
ispell-local-dictionary-alist are being used. If I run
ispell-get-otherchars, I get
['’]
as expected. If I run "(looking-at (ispell-get-otherchars))" while sitting
on a curly quote, I get:
t
Actually, now I see something weird is happening. I type:
"didn’", i.e. "didn" followed by a curly quote, and the word is highlighted
as misspelt. If I then type "t" to finish the word, it is unhighlighted,
after a pause.
Is there some other part of flyspell that is more rough-and-ready which I
also have to tweak?
--
http://rrt.sc3d.org
[-- Attachment #2: Type: text/html, Size: 4485 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: bug#13109: 24.1; flyspell highlights words containing curly quotes which ispell-buffer accepts
[not found] ` <mailman.25084.1367614166.855.bug-gnu-emacs@gnu.org>
@ 2013-05-04 19:26 ` Sebastien Vauban
2013-05-06 10:32 ` Agustin Martin
0 siblings, 1 reply; 14+ messages in thread
From: Sebastien Vauban @ 2013-05-04 19:26 UTC (permalink / raw)
To: bug-gnu-emacs-mXXj517/zsQ
Hello Reuben,
Reuben Thomas wrote:
>>> I've copied the default settings and added a curly single quote to the
>>> list of permitted "other characters". I imagine one can do the same for
>>> other languages. It's ugly (principally because it copies rather than
>>> overwriting information) but that information (the other entries in the
>>> record) doesn't change often, so it'll do until a more comprehensive
>>> solution is applied.
>>>
>>
>> Belay that, it doesn't work. It seems I have to type a new word for
>> flyspell to complain; merely passing the cursor over an old one (which
>> suffices to remove a highlight in a word that has been added to the
>> dictionary) does not suffice.
>>
>> If anyone can offer a functioning workaround, I'd be most grateful.
>>
>
> I read the documentation for ispell-dictionary-alist more carefully, and
> came up with:
>
> '(ispell-local-dictionary-alist (quote (("british" "[[:alpha:]]"
> "[^[:alpha:]]" "['’]" t ("-d" "en_GB") nil utf-8))))
>
> where I made the "others" character set a character class.
Not answering your questions, but commenting about this: it never has been
clear to me which var should really be edited...
`ispell-dictionary-base-alist', `ispell-base-dicts-override-alist' or
`ispell-local-dictionary-alist'...
Best regards,
Seb
--
Sebastien Vauban
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#13109: 24.1; flyspell highlights words containing curly quotes which ispell-buffer accepts
2013-05-04 19:26 ` Sebastien Vauban
@ 2013-05-06 10:32 ` Agustin Martin
0 siblings, 0 replies; 14+ messages in thread
From: Agustin Martin @ 2013-05-06 10:32 UTC (permalink / raw)
To: Sebastien Vauban, 13109
On Sat, May 04, 2013 at 09:26:30PM +0200, Sebastien Vauban wrote:
> Hello Reuben,
>
> Reuben Thomas wrote:
> >>> I've copied the default settings and added a curly single quote to the
> >>> list of permitted "other characters". I imagine one can do the same for
> >>> other languages. It's ugly (principally because it copies rather than
> >>> overwriting information) but that information (the other entries in the
> >>> record) doesn't change often, so it'll do until a more comprehensive
> >>> solution is applied.
> >>>
> >>
> >> Belay that, it doesn't work. It seems I have to type a new word for
> >> flyspell to complain; merely passing the cursor over an old one (which
> >> suffices to remove a highlight in a word that has been added to the
> >> dictionary) does not suffice.
> >>
> >> If anyone can offer a functioning workaround, I'd be most grateful.
> >>
> >
> > I read the documentation for ispell-dictionary-alist more carefully, and
> > came up with:
> >
> > '(ispell-local-dictionary-alist (quote (("british" "[[:alpha:]]"
> > "[^[:alpha:]]" "['???]" t ("-d" "en_GB") nil utf-8))))
> >
> > where I made the "others" character set a character class.
>
> Not answering your questions, but commenting about this: it never has been
> clear to me which var should really be edited...
> `ispell-dictionary-base-alist', `ispell-base-dicts-override-alist' or
> `ispell-local-dictionary-alist'...
`ispell-local-dictionary-alist' is what you want.
`ispell-dictionary-base-alist' has the last resort values if nothing else
fits. `ispell-base-dicts-override-alist' is mostly for distros or sysadmins
to overrride values from `ispell-dictionary-base-alist' and will not
override auto-detected values. None of both are created with a defcustom.
--
Agustin
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#13109: Thanks
2012-12-06 23:59 bug#13109: 24.1; flyspell highlights words containing curly quotes which ispell-buffer accepts Reuben Thomas
2012-12-07 6:29 ` Eli Zaretskii
@ 2015-06-26 11:46 ` Reuben Thomas
1 sibling, 0 replies; 14+ messages in thread
From: Reuben Thomas @ 2015-06-26 11:46 UTC (permalink / raw)
To: 13109-done
[-- Attachment #1: Type: text/plain, Size: 62 bytes --]
I'm happy with the answer given (for which thanks!); closing.
[-- Attachment #2: Type: text/html, Size: 144 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2015-06-26 11:46 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-06 23:59 bug#13109: 24.1; flyspell highlights words containing curly quotes which ispell-buffer accepts Reuben Thomas
2012-12-07 6:29 ` Eli Zaretskii
[not found] ` <CAOnWdoiiaW0gvHTEuunsZvkqn8a6A4tLsQC4WoF3jgy40onjMg@mail.gmail.com>
2012-12-07 13:57 ` Eli Zaretskii
2012-12-07 15:27 ` Reuben Thomas
2012-12-09 21:24 ` Reuben Thomas
2012-12-10 23:34 ` Juri Linkov
2012-12-11 16:20 ` Reuben Thomas
2012-12-11 23:07 ` Juri Linkov
2013-05-03 20:15 ` Reuben Thomas
2013-05-03 20:20 ` Reuben Thomas
2013-05-03 20:48 ` Reuben Thomas
[not found] ` <mailman.25084.1367614166.855.bug-gnu-emacs@gnu.org>
2013-05-04 19:26 ` Sebastien Vauban
2013-05-06 10:32 ` Agustin Martin
2015-06-26 11:46 ` bug#13109: Thanks Reuben Thomas
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).