ispell.el does not check russian emacs22 in utf-8 mode

Bug #173524 reported by Victor Ashik
2
Affects Status Importance Assigned to Milestone
emacs22 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: emacs

M-x ispell-buffer

If I select russian it does not do anything at all.

gives error message "Can't open /usr/lib/ispell/en.hash" or "Can't open /usr/lib/ispell/en_US.hash" depending on selected english or american (this is not true for Hardy, fixed somewhere).

Revision history for this message
Victor Ashik (vashik+) wrote :

Previous description is not exact. The messages appears after M-x ispell-change-dictionary
And spell checking does not work.
Adding symbolic links into /usr/lib/ispell helps.

Revision history for this message
Michael Olson (mwolson) wrote :

Do you have the ispell package installed, or aspell instead?

Also, does ispell-buffer at all work before you run ispell-change-dictionary?

If you can tell me what symbolic links you made to get it working, that would be helpful.

Changed in emacs22:
status: New → Incomplete
Revision history for this message
me (ajh-watri) wrote :

I have found a way to reproduce this bug, install any package that pulls in ispell, and /usr/lib/ispell/ becomes populated. This breaks the call from emacs to aspell for some reason, and ispell gets used instead. Now since there is no english ispell dictionary installed, spell checking stops working (at least partly). See also https://bugs.launchpad.net/ubuntu/+source/dictionaries-common/+bug/179523
A temporary fix for the problem is to run

 sudo apt-get autoremove ispell

This will however break other dependencies.

To get spell checking working in emacs for your native language run

sudo apt-get install aspell-ru

I noticed that installing language-support-sv adds ispell-sv instead of aspell-sv as it should have.

Revision history for this message
Victor Ashik (vashik+) wrote :

Another workaround is to add the following line to .emacs

(setq-default ispell-program-name "aspell")

Revision history for this message
Michael Olson (mwolson) wrote :

The ispell.el library should automatically detect aspell and set ispell-program-name appropriately. Did you have aspell installed at the time of initially filing this bug report.

Revision history for this message
Victor Ashik (vashik+) wrote : Re: [Bug 173524] Re: ispell does not work in emacs22

Yes, I did.

On Fri, Mar 14, 2008 at 8:37 AM, Michael W. Olson
<email address hidden> wrote:
> The ispell.el library should automatically detect aspell and set ispell-
> program-name appropriately. Did you have aspell installed at the time
> of initially filing this bug report.
>
>
>
> --
> ispell does not work in emacs22
> https://bugs.launchpad.net/bugs/173524
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
С уважением,
Виктор Ашик

Revision history for this message
Victor Ashik (vashik+) wrote : Re: ispell does not work in emacs22

Still cannot get ispell working with russian in emacs22 (hardy). I have emacs tuned to use aspell:

(custom-set-variables
 '(current-language-environment "UTF-8")
 '(default-input-method "russian-computer")
 '(x-select-enable-clipboard t)
)

(set-input-method "russian-computer" nil)

(setq-default ispell-program-name "aspell")
(setq ispell-dictionary "russian")
(setq flyspell-default-dictionary "russian")
(setq ispell-local-dictionary "russian")

When I do M-x ispell-buffer I get message "Spell-checking using aspell with russian dictionary done", but it found no mistakes.

I did strace of emacs and found the possible cause: it calls

 execve("/usr/bin/aspell", ["/usr/bin/aspell", "-a", "-m", "-d", "russian", "--encoding=koi8-r"], [/* 35 vars */]) = 0

, this is wrong if we use UTF-8.

Victor Ashik (vashik+)
Changed in emacs22:
status: Incomplete → Confirmed
Revision history for this message
Victor Ashik (vashik+) wrote :

I found a way to get working ispell.el for russian: just specify "ru", not "russian" dictionary:

(setq ispell-dictionary "ru")

description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.