* emacs's spell check feature problems (criticism)
@ 2010-05-25 22:52 Xah Lee
2010-05-25 23:27 ` Xah Lee
0 siblings, 1 reply; 6+ messages in thread
From: Xah Lee @ 2010-05-25 22:52 UTC (permalink / raw)
To: help-gnu-emacs
Some criticism about emacs spell checking feature.
• Emacs Spell Checker Problems
http://xahlee.org/emacs/emacs_spell_checker_problems.html
plain text version follows:
--------------------------------------------------
Emacs Spell Checker Problems
Xah Lee, 2010-05-25
This page discuss emacs's spell checking feature, its problems, and
some practical tips.
------------------------------
flyspell-mode Problems
Emacs has a spell checking feature (flyspell-mode), that check
spelling errors while you type, much like all other modern editors,
word processors, email programs, or text box in browsers. However,
emacs's spell checking feature is much worse than the spell checker in
browsers or any commercial editor.
When you have flyspell-mode on, it slows down your editing noticeably.
Normally, when you hold down “Ctrl+→” (forward-word), the cursor moves
fast across lines to the place you want. But with flyspell on, the
cursor freezes, and when you release the key, the cursor shows in some
other place. Essentially, the screen is not updated so often. This is
just not workable.
Another problem is that if you open a document, with flyspell-mode on,
it does not automatically check the spelling of all existing text. I
think it only checks word at your cursor positions. (which explains
why you can't move cursor fast across words.)
------------------------------
speck-mode
There is a alternative, called speck-mode, which i've been using since
~2007. Like other spell checking feature in commercial editors, it
does its work in the background quietly when you are not doing
anything. However, getting speck-mode setup isn't trivial, especially
on Windows, because you have to install the spell checking engine.
(one of ispell, aspell, hunspell) Basically, you need to be a emacs
expert to get it to work.
Also, in most commercial software, the spell checker will eventually
check the whole document, but speck-mode only checks texts that's
visible portion of the window. I haven't looked into if it is possible
to change this.
------------------------------
speck-mode, Great Code, Bad Everything Else
speck-mode's author is Martin Rudalics, who seems to have published a
paper on Common Lisp in ACM back in 1989. (See: Distributed copying
garbage collection (1986) by Martin Rudalics, at Source) So,
apparently the guy seems to be a old lisper who knows what he's doing
as far as the code goes. However, speck-mode is one of those mode that
only few emacs people know or use. It lacks much documentation (it has
none!). Me and David Capello have made the whole spelling system work
with speck-mode in our ErgoEmacs distribution, out of the box. It
worked, better than flyspell, but isn't perfect. And i haven't really
put that much time into fixing issues. (See: issue 51, issue 56, issue
74. )
Today, doing some work on ErgoEmacs, i thought why not send a email to
Martin and see if there's a new version. Indeed, there is, and he send
it to me.
However, he told me that there even isn't a public location for the
mode. The one that appears on emacswiki at emacswiki SpeckMode is from
2008-07-26. Gah!
Here's the latest version speck.el 2010-05-25.
I tried to incorporate this version into ErgoEmacs, but run into
problems... gah. Will need to work on it, probably half a day. Here's
the error:
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
intern(nil)
(cond ((eq speck-engine ...) (intern speck-aspell-default-dictionary-
name)) ((eq speck-engine ...) (intern speck-hunspell-default-
dictionary-name)) ((eq speck-engine ...) (intern speck-ispell-default-
dictionary-name)))
(or speck-saved-dictionary (cond (... ...) (... ...) (... ...)))
(setq speck-dictionary (or speck-saved-dictionary
(cond ... ... ...)))
(if (and (local-variable-p ...) speck-dictionary) nil (setq speck-
dictionary (or speck-saved-dictionary ...)))
(unless (and (local-variable-p ...) speck-dictionary) (setq speck-
dictionary (or speck-saved-dictionary ...)))
speck-activate()
(if speck-mode (speck-activate) (speck-deactivate))
(let ((last-message ...)) (setq speck-mode (cond ... ... ...)) (if
speck-mode (speck-activate) (speck-deactivate)) (run-hooks (quote
speck-mode-hook) (if speck-mode ... ...)) (if (called-interactively-p)
(progn nil ...)))
speck-mode(toggle)
call-interactively(speck-mode t nil)
execute-extended-command(nil)
call-interactively(execute-extended-command nil nil)
------------------------------
OpenSource Spell-Checking Engines
Besides the bad quality of the spell checking feature, the open source
spell checking engine ispell and aspell are also much inferior than
commercial ones, lacking much words and commonly accepted spelling
variations, with the exception of Hunspell.
See Wikipedia: Hunspell. It is based on MySpell, which is based on
Ispell, and probably with input from Aspell. So, the Open Source spell
checking engines roughly goes from Ispell→Aspell→Hunspell. Note that
Hunspel is used by Firefox, Opera, Google Chrome, Apple Mac OS X.
See also: Problems of Open Source Dictionaries.
------------------------------
How to Always Have Spell Checker On
A little practical tip. By default, spell checker isn't even on.
However, if you want it always on, you can put this code in your emacs
init file:
(defun turn-spell-checking-on ()
"Turn speck-mode or flyspell-mode on."
;; (speck-mode 1)
(flyspell-mode 1)
)
(add-hook 'text-mode-hook 'turn-spell-checking-on)
Also, there's the command flyspell-buffer that checks the whole file,
but alas, it is slow. While it works, your emacs is frozen.
----------------------------
Xah
∑ http://xahlee.org/
☄
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: emacs's spell check feature problems (criticism)
2010-05-25 22:52 emacs's spell check feature problems (criticism) Xah Lee
@ 2010-05-25 23:27 ` Xah Lee
2010-05-27 17:46 ` jpkotta
0 siblings, 1 reply; 6+ messages in thread
From: Xah Lee @ 2010-05-25 23:27 UTC (permalink / raw)
To: help-gnu-emacs
On May 25, 3:52 pm, Xah Lee <xah...@gmail.com> wrote:
> Some criticism about emacs spell checking feature.
>
> • Emacs Spell Checker Problems
> http://xahlee.org/emacs/emacs_spell_checker_problems.html
Forgot to add some credits.
Thanks to Martin Rudalics for speck-mode, for sending me the latest
version and allowing me to post it, and answer some of my questions.
David Capello did the work for getting hunspell engine to work in
ErgoEmacs on Windows. Of course, thanks to flyspell author (Manuel
Serrano), emacs developers, and the open source spell engine authors.
Xah
∑ http://xahlee.org/
☄
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: emacs's spell check feature problems (criticism)
2010-05-25 23:27 ` Xah Lee
@ 2010-05-27 17:46 ` jpkotta
2010-05-28 1:16 ` Xah Lee
0 siblings, 1 reply; 6+ messages in thread
From: jpkotta @ 2010-05-27 17:46 UTC (permalink / raw)
To: help-gnu-emacs
On May 25, 6:27 pm, Xah Lee <xah...@gmail.com> wrote:
> On May 25, 3:52 pm, Xah Lee <xah...@gmail.com> wrote:
>
> > Some criticism about emacs spell checking feature.
>
> > • Emacs Spell Checker Problems
> > http://xahlee.org/emacs/emacs_spell_checker_problems.html
>
> Forgot to add some credits.
>
> Thanks to Martin Rudalics for speck-mode, for sending me the latest
> version and allowing me to post it, and answer some of my questions.
> David Capello did the work for getting hunspell engine to work in
> ErgoEmacs on Windows. Of course, thanks to flyspell author (Manuel
> Serrano), emacs developers, and the open source spell engine authors.
>
> Xah
> ∑http://xahlee.org/
>
> ☄
The error is because speck-hunspell-default-dictionary-name is nil.
If I set speck-hunspell-library-directory to the directory where my
hunspell dictionaries are (which is /usr/share/myspell/dicts on my
system), I can enable the mode with no errors. I still can't seem to
make it do anything useful, though.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: emacs's spell check feature problems (criticism)
2010-05-27 17:46 ` jpkotta
@ 2010-05-28 1:16 ` Xah Lee
2010-05-28 15:40 ` jpkotta
0 siblings, 1 reply; 6+ messages in thread
From: Xah Lee @ 2010-05-28 1:16 UTC (permalink / raw)
To: help-gnu-emacs
On May 25, 3:52 pm, Xah Lee <xah...@gmail.com> wrote:
«
Some criticism about emacs spell checking feature.
• Emacs Spell Checker Problems
http://xahlee.org/emacs/emacs_spell_checker_problems.html
»
On May 27, 10:46 am, jpkotta <jpko...@gmail.com> wrote:
> The error is because speck-hunspell-default-dictionary-name is nil.
> If I set speck-hunspell-library-directory to the directory where my
> hunspell dictionaries are (which is /usr/share/myspell/dicts on my
> system), I can enable the mode with no errors.
thanks. That will help.
> I still can't seem to
> make it do anything useful, though.
you mean it doesn't do spell check for you? or do you mean you prefer
flyspell-mode than speck-mode??
Xah
∑ http://xahlee.org/
☄
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: emacs's spell check feature problems (criticism)
2010-05-28 1:16 ` Xah Lee
@ 2010-05-28 15:40 ` jpkotta
2010-05-28 18:54 ` Xah Lee
0 siblings, 1 reply; 6+ messages in thread
From: jpkotta @ 2010-05-28 15:40 UTC (permalink / raw)
To: help-gnu-emacs
On May 27, 8:16 pm, Xah Lee <xah...@gmail.com> wrote:
> On May 25, 3:52 pm, Xah Lee <xah...@gmail.com> wrote:
> «
> Some criticism about emacs spell checking feature.
>
> • Emacs Spell Checker Problems
> http://xahlee.org/emacs/emacs_spell_checker_problems.html
> »
>
> On May 27, 10:46 am, jpkotta <jpko...@gmail.com> wrote:
>
> > The error is because speck-hunspell-default-dictionary-name is nil.
> > If I set speck-hunspell-library-directory to the directory where my
> > hunspell dictionaries are (which is /usr/share/myspell/dicts on my
> > system), I can enable the mode with no errors.
>
> thanks. That will help.
>
> > I still can't seem to
> > make it do anything useful, though.
>
> you mean it doesn't do spell check for you? or do you mean you prefer
> flyspell-mode than speck-mode??
>
I have some of the same complaints about flyspell, so I want to see if
I like speck-mode better.
I can't get speck-mode to spell check for me. I had some deliberately
misspelled words, and ran speck-region and speck-line so that it
should have found them. speck-line complained about no "speck
process", so maybe I still have more stuff to set up. It also didn't
find anything when I initially turned on speck-mode. I haven't put
much effort in, though.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: emacs's spell check feature problems (criticism)
2010-05-28 15:40 ` jpkotta
@ 2010-05-28 18:54 ` Xah Lee
0 siblings, 0 replies; 6+ messages in thread
From: Xah Lee @ 2010-05-28 18:54 UTC (permalink / raw)
To: help-gnu-emacs
On May 25, 3:52 pm, Xah Lee <xah...@gmail.com> wrote:
«
• Emacs Spell Checker Problems
http://xahlee.org/emacs/emacs_spell_checker_problems.html
»
On May 28, 8:40 am, jpkotta <jpko...@gmail.com> wrote:
> ...
> I can't get speck-mode to spell check for me. I had some deliberately
> misspelled words, and ran speck-region and speck-line so that it
> should have found them. speck-line complained about no "speck
> process", so maybe I still have more stuff to set up. It also didn't
> find anything when I initially turned on speck-mode. I haven't put
> much effort in, though.
thanks. After i wrote to you, i worked on it... updated my blog about
it.
After 2 hours, i did these init steps:
(setq speck-engine (quote Hunspell))
(setq speck-hunspell-language-options
(quote (("da" utf-8 nil t nil)
("de" iso-8859-1 nil t nil)
("en" utf-8 nil nil nil)
("fr" iso-8859-1 nil nil nil)
("it" iso-8859-1 nil nil nil)
("ru" koi8-r nil nil nil))))
(setq speck-hunspell-program "C:/Program Files (x86)/ErgoEmacs5/
hunspell/hunspell.exe")
(setq speck-hunspell-library-directory "C:/Program Files (x86)/
ErgoEmacs5/hunspell/")
(setq speck-hunspell-default-dictionary-name "en_US")
then, M-x speck-mode didn't give any error, with emacs status bar
showing “[en_US]”, indicating that it is running, and is also listed
by describe-mode. However, incorrect words isn't highlighted in
anyway. Calling speck-region on a region that has bad words also
doesn't seem to do anything.
So, i have same experience as you. The older version worked for me no
problem.
I wrote a email to the guy yesterday and he replied today and i
haven't processed it yet. Will update when i eventually got things
worked out.
Xah
∑ http://xahlee.org/
☄
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-05-28 18:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-25 22:52 emacs's spell check feature problems (criticism) Xah Lee
2010-05-25 23:27 ` Xah Lee
2010-05-27 17:46 ` jpkotta
2010-05-28 1:16 ` Xah Lee
2010-05-28 15:40 ` jpkotta
2010-05-28 18:54 ` Xah Lee
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).