Re: [osol-discuss] Spell checking for Emacs?

2009-07-09 Thread Alex Viskovatoff
First, how to set up aspell. Get it from [url=http://aspell.net/]its Web 
site[/url]. Compile and install with

./configure --disable-curses
gmake
pfexec gmake install

You need to add at least one dictionary for aspell. You can get them from the 
aspell Web site and install them by following the directions in the README file 
(the usual configure/make/make install). Make sure that /usr/local/bin is in 
your PATH. Add the following to your .emacs file:

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

And that's it. Spell checking works the way it does under Emacs with any recent 
Linux distro I've tried (not that I've done a lot of testing).

Now, here's how I set up Hunspell. Download it from 
[url=http://hunspell.sourceforge.net/]SourceForge[/url]. Compilation and 
installation works in the usual way (using gmake instead of make). To make it 
use the Myspell/Hunspell dictionaries that are supplied as IPS packages, add 
the following to your .bashrc:

export DICPATH=/usr/lib/firefox/dictionaries
export DICTIONARY=en-US

Hunspell now works from the command line. Here's a sample session:

u...@diotima:~$ hunspell
Hunspell 1.2.8
cet
& cet 15 0: vet, cwt, ct, et, cent, cert, etc, set, cit, cat, net, cot, let, 
cut, get

To set up Emacs for use of Hunspell, I put the following in my .emacs file:

(eval-after-load "ispell"
(progn
  (setq ispell-dictionary "en-US"
ispell-extra-args '("-i" "utf-8") ; aspell doesn't understand -i 
utf-8, hunspell needs it
ispell-silently-savep t)))
(setq-default ispell-program-name "hunspell")

I got the template for this from 
[url=http://www.emacswiki.org/emacs/InteractiveSpell]the Emacs Wiki[/url]. (I 
removed "-a" from ispell-extra-args since it doesn't make any difference, and 
since ispell.el seems to pass it to Hunspell already, without its inclusion in 
ispell-extra-args.)

If you try to spell check a word by using "M-x ispell-word", you get the error 
message "ispell-get-word: Wrong type argument: stringp, nil". "M-x 
ispell-buffer" produces

Spell checking test-buffer using hunspell with en-US dictionary...
Spell-checking using hunspell with en-US dictionary done
ispell-get-line: Wrong type argument: stringp, nil

>From what I can tell by Googling, you run into the same problem if you try to 
>use Emacs with Hunspell under Linux. Hunspell and/or ispell.el need to be 
>changed to work with each other correctly.
-- 
This message posted from opensolaris.org
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] Spell checking for Emacs?

2009-07-09 Thread Mark Martin
On Wed, Jul 8, 2009 at 9:48 PM, Alex Viskovatoff wrote:
> Well, I've had to sort this out on my own. It turns out that it's relatively 
> easy to get spell checking working under Emacs with aspell. That's what the 
> two Linux distros I have, OpenSUSE and Fedora, use for Emacs. Since they both 
> come with Hunspell, I guess the packagers of those distros couldn't get 
> Hunspell working under Emacs any better than I could. (It does compile under 
> OpenSolaris without any problems, and works from the command line. The 
> problem is that it doesn't work with the Emacs ispell mode.)
>
> GNU aspell didn't compile for me with ncurses, so I used "./configure 
> --disable-curses". You don't need ncurses to be enabled in aspell anyway, if 
> you're only going to use it in Emacs.

Mind sharing what prevented you from using Hunspell in Emac's ispell mode?

If you could share your recipe for success for the aspell route,
that'd be appreciated, too, I'm sure.
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] Spell checking for Emacs?

2009-07-08 Thread Alex Viskovatoff
Well, I've had to sort this out on my own. It turns out that it's relatively 
easy to get spell checking working under Emacs with aspell. That's what the two 
Linux distros I have, OpenSUSE and Fedora, use for Emacs. Since they both come 
with Hunspell, I guess the packagers of those distros couldn't get Hunspell 
working under Emacs any better than I could. (It does compile under OpenSolaris 
without any problems, and works from the command line. The problem is that it 
doesn't work with the Emacs ispell mode.)

GNU aspell didn't compile for me with ncurses, so I used "./configure 
--disable-curses". You don't need ncurses to be enabled in aspell anyway, if 
you're only going to use it in Emacs.
-- 
This message posted from opensolaris.org
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


[osol-discuss] Spell checking for Emacs?

2009-07-07 Thread Alex Viskovatoff
[I'm reposting this from the desktop-discuss forum, since although it's gotten 
54 views there, it has gotten no replies.]

When I try to spell-check in Emacs, I get the following message:

> Searching for program: no such file or directory, ispell

Emacs under Fedora Linux uses aspell. Googling, I came up with this:

> SUNWaspell and SUNWaspell-en have been obsolete. On Solaris, we now use
> Enchant and myspell.

And indeed, there are OpenSolaris packages with "Myspell and Hunspell spell 
dictionary files". But there are no packages that contain the myspell or 
hunspell program itself.

Spell checking works in Firefox. The Wikipedia page for Hunspell states that 
Firefox (version 3) uses Hunspell. It also states that Emacs supports Hunspell.

I've found a thread which indicates that Firefox contains Hunspell internally:
http://arc.opensolaris.org/caselog/PSARC/2009/026/mail

This thread suggests that a Hunspell package is in the works. Is that the case? 
And how can I get spell checking under Emacs to work until that package is 
released? Should I compile Hunspell myself?

Finally: Has anyone using OpenSolaris 2009.06 gotten spell checking to work 
under Emacs, by any means?
-- 
This message posted from opensolaris.org
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org