GNU bug report logs -
#13109
24.1; flyspell highlights words containing curly quotes which ispell-buffer accepts
Previous Next
Reported by: Reuben Thomas <rrt <at> sc3d.org>
Date: Fri, 7 Dec 2012 00:00:02 UTC
Severity: normal
Found in version 24.1
Done: Reuben Thomas <rrt <at> sc3d.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 13109 in the body.
You can then email your comments to 13109 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13109
; Package
emacs
.
(Fri, 07 Dec 2012 00:00:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Reuben Thomas <rrt <at> sc3d.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 07 Dec 2012 00:00:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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/
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13109
; Package
emacs
.
(Fri, 07 Dec 2012 06:31:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 13109 <at> debbugs.gnu.org (full text, mbox):
> From: Reuben Thomas <rrt <at> 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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13109
; Package
emacs
.
(Fri, 07 Dec 2012 13:58:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 13109 <at> debbugs.gnu.org (full text, mbox):
> Date: Fri, 7 Dec 2012 12:52:29 +0000
> From: Reuben Thomas <rrt <at> sc3d.org>
>
> > > From: Reuben Thomas <rrt <at> 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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13109
; Package
emacs
.
(Fri, 07 Dec 2012 15:28:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 13109 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Dec 7, 2012 1:57 PM, "Eli Zaretskii" <eliz <at> gnu.org> wrote:
>
> > Date: Fri, 7 Dec 2012 12:52:29 +0000
> > From: Reuben Thomas <rrt <at> sc3d.org>
> >
> > > > From: Reuben Thomas <rrt <at> 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.
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13109
; Package
emacs
.
(Sun, 09 Dec 2012 21:25:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 13109 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 7 December 2012 15:27, Reuben Thomas <rrt <at> sc3d.org> wrote:
> On Dec 7, 2012 1:57 PM, "Eli Zaretskii" <eliz <at> gnu.org> wrote:
> >
> > > Date: Fri, 7 Dec 2012 12:52:29 +0000
> > > From: Reuben Thomas <rrt <at> sc3d.org>
> > >
> > > > > From: Reuben Thomas <rrt <at> 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
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13109
; Package
emacs
.
(Mon, 10 Dec 2012 23:39:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 13109 <at> debbugs.gnu.org (full text, mbox):
> 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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13109
; Package
emacs
.
(Tue, 11 Dec 2012 16:22:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 13109 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 10 December 2012 23:34, Juri Linkov <juri <at> 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.
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13109
; Package
emacs
.
(Tue, 11 Dec 2012 23:25:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 13109 <at> debbugs.gnu.org (full text, mbox):
>> `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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13109
; Package
emacs
.
(Fri, 03 May 2013 20:17:01 GMT)
Full text and
rfc822 format available.
Message #29 received at 13109 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 11 December 2012 23:07, Juri Linkov <juri <at> 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
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13109
; Package
emacs
.
(Fri, 03 May 2013 20:22:01 GMT)
Full text and
rfc822 format available.
Message #32 received at 13109 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 3 May 2013 21:15, Reuben Thomas <rrt <at> sc3d.org> wrote:
> On 11 December 2012 23:07, Juri Linkov <juri <at> 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
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13109
; Package
emacs
.
(Fri, 03 May 2013 20:50:01 GMT)
Full text and
rfc822 format available.
Message #35 received at 13109 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 3 May 2013 21:20, Reuben Thomas <rrt <at> sc3d.org> wrote:
> On 3 May 2013 21:15, Reuben Thomas <rrt <at> sc3d.org> wrote:
>
>> On 11 December 2012 23:07, Juri Linkov <juri <at> 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
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13109
; Package
emacs
.
(Mon, 06 May 2013 10:34:02 GMT)
Full text and
rfc822 format available.
Message #38 received at 13109 <at> debbugs.gnu.org (full text, mbox):
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
Reply sent
to
Reuben Thomas <rrt <at> sc3d.org>
:
You have taken responsibility.
(Fri, 26 Jun 2015 11:47:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Reuben Thomas <rrt <at> sc3d.org>
:
bug acknowledged by developer.
(Fri, 26 Jun 2015 11:47:02 GMT)
Full text and
rfc822 format available.
Message #43 received at 13109-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I'm happy with the answer given (for which thanks!); closing.
[Message part 2 (text/html, inline)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 25 Jul 2015 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 10 years and 18 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.