Package: aspell-ru
Version: 0.99g4-2
Severity: serious

I'm able to spell-check KOI8-R-encoded Russian-language documents just
fine from the shell prompt using aspell.  However, when I load these
same documents into Emacs (emacs21, 21.4a+1-3etch1) and do an "M-x
ispell-buffer" -- or ispell-word, ispell-region, etc. -- no words are
reported misspelled.  Placing a wrapper script around the aspell
program indicates that Emacs is launching aspell just fine but isn't
passing it any words.

After doing a bit of detective work it looks like the problem is with
/var/lib/dictionaries-common/aspell/aspell-ru, which currently
contains the following text:

    Language: russian (Russian koi8-r)
    Hash-Name: ru
    Emacsen-Name: russian
    Coding-System: koi8-r

That text is merged into /var/cache/dictionaries-common/aspell.db by
the dictionaries-common package's
/usr/share/perl5/Debian/DictionariesCommon.pm Perl module and then
used by that same module to produce
/var/cache/dictionaries-common/emacsen-ispell-dicts.el.  The problem
is that /var/lib/dictionaries-common/aspell/aspell-ru specifies
neither a CaseChars or Not-CaseChars key.  Consequently,
DictionariesCommon.pm's build_emacsen_support subroutine mistakenly
assumes that KOI8-R-encoding Russian words are composed exclusively of
the letters A-Z and generates the following incorrect stanza in
emacsen-ispell-dicts.el:

    (debian-ispell-add-dictionary-entry
      '("russian"
        "[a-zA-Z]"
        "[^a-zA-Z]"
        "[']"
        nil
        ("-d" "ru")
        nil
        koi8-r)
      "aspell")

I haven't tested this but I believe that
/var/lib/dictionaries-common/aspell/aspell-ru needs to contain lines
somewhat like the following:

    CaseChars: 
[\341\342\367\347\344\345\263\366\372\351\352\353\354\355\356\357\360\362\363\364\365\346\350\343\376\373\375\370\371\377\374\340\361\301\302\327\307\304\305\243\326\332\311\312\313\314\315\316\317\320\322\323\324\325\306\310\303\336\333\335\330\331\337\334\300\321]
    Not-CaseChars: 
[^\341\342\367\347\344\345\263\366\372\351\352\353\354\355\356\357\360\362\363\364\365\346\350\343\376\373\375\370\371\377\374\340\361\301\302\327\307\304\305\243\326\332\311\312\313\314\315\316\317\320\322\323\324\325\306\310\303\336\333\335\330\331\337\334\300\321]

I got those by entering (assoc "russian" ispell-dictionary-alist) in
the Emacs scratch buffer before Debian's ispell modifications were
loaded -- the default ispell correctly identifies the KOI8-R character
set.  In fact, until aspell-ru is fixed, the following line of Elisp
code serves as a viable workaround to include in one's ~/.emacs file:

    (debian-ispell-add-dictionary-entry (assoc "russian" 
ispell-dictionary-alist))

That line instructs debian-ispell to override the incorrect KOI8-R
CaseChars in emacsen-ispell-dicts.el with ispell's default CaseChars.

Thanks for your attention,
  -- Scott


-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18sdp
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages aspell-ru depends on:
ii  aspell                        0.60.4-4   GNU Aspell spell-checker
ii  dictionaries-common           0.70.10    Common utilities for spelling dict

aspell-ru recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to