Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am running Emacs 23 and Aspell in a Debian Squeeze system. I've installed the aspell-hi package and spell checking of Hindi files works fine from the command line. I've set up aspell to replace ispell in emacs using the instructions here.

However, I can't find any way to make Emacs tell aspell to use the Hindi dictionary. Hindi does not appear in the list of dictionaries you get when you type M-x ispell-change-dictionary . If I just type in "hindi" I get "No match found." If I even try the crude method of saying (setq-default ispell-program-name "aspell -d hi") in my .emacs, I get an error that no such program is found.

I have searched extensively online but can't find any solution to the question of setting dictionaries in aspell in emacs, other than personal dictionaries and those listed by M-x ispell-change-dictionary.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Debian include automatic way to configure ispell.el for the installed dictionary.

First try to run

emacs -q

and test with this "bare Emacs" if the hindi dictionary is available

  • C-h v ispell-program-name to look at the default "ispell" use by Emacs (should be aspell)
  • Try to change dictionary to hindi
  • you can also C-h v C-h v ispell-program-name to see the list of the available dictionary

If you have hindi in the "bare Emacs" then just remove all configuration you made in the .emacs concerning ispell and aspell.

If this fail, add:

(add-to-list 'ispell-local-dictionary-alist
     '("hindi"
        "[a-zA-Z]"
        "[^a-zA-Z]"
        "[']"
        nil
        ("-d" "hi")
        nil
        iso-8859-1))

to your .emacs

share|improve this answer
    
You're exactly right - it worked fine in bare emacs with emacs -q. I stripped out all my config attempts from .emacs and found that, as you also said, Debian defaults to aspell in emacs and the configuration was automatic. All is well now, and many thanks –  ShankarG Apr 9 '12 at 12:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.