Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Enabling Flyspell mode gave an error

205 views
Skip to first unread message

jeep

unread,
Nov 4, 2008, 1:37:17 PM11/4/08
to
Howdy all,

I am trying to enable flyspell mode and I'm having a problem. I'm
using GNU Emacs 22.3.1 on Windows XP and aspell. When I try to "M-x
flyspell-mode" in a buffer, I get the error message:
Enabling Flyspell mode gave an error
(I've tried it in many different major modes including text,
Fundamental, Lisp...)

I don't see any other indication of what the problem could be. I can
us all the ispell commands (eg. I can M-$ to check the spelling of a
particular word). I originally thought that it might be a conflict
with all the configurations I've done, so I removed my _emacs file and
tried it from a base install and I eval'd this:
(setq-default ispell-program-name "aspell")

Then I can M-$ to check the word, but I still cannot enable flyspell-
mode and it gives me the same error.

Where can I look to get more information to help me figure out this
problem? I've searched for it on the internet and all I find is other
people asking the question with no answers.

Thanks,
-JEEP
Joe Peterson

jeep

unread,
Nov 5, 2008, 12:29:13 PM11/5/08
to

No one has any suggestions on where I should look next? :(

-JEEP

Andreas Politz

unread,
Nov 5, 2008, 12:46:53 PM11/5/08
to

Enable debug-on-error via 'M-x toggle-debug-on-error', then start flyspell-mode
again and examine the error.
If that does not work, try edebug. Open the file where flyspell-mode is
defined. Reeval the function with 'C-u C-M-x' and again, start flyspell-mode.
Now you are in edebug-mode. Hit Space till you get the error. Press 'i' to
enable debugging of the called function after point.

-ap

Lennart Borgman

unread,
Nov 5, 2008, 1:03:32 PM11/5/08
to jeep, help-gn...@gnu.org

Hi Joe

Please give some more information. Can you reproduce the problem starting from

emacs --Q

and adding the necessary information?

Did you enable debug-on-error? (This is in the Options menu, "Enable
Debugger On Error".)


jeep

unread,
Nov 5, 2008, 5:18:52 PM11/5/08
to
On Nov 5, 9:46 am, Andreas Politz <poli...@fh-trier.de> wrote:
> jeep wrote:
> > On Nov 4, 10:37 am, jeep <jeepeter...@gmail.com> wrote:
> >> I am trying to enable flyspell mode and I'm having a problem. I'm
> >> using GNU Emacs 22.3.1 on Windows XP and aspell. When I try to "M-x
> >> flyspell-mode" in a buffer, I get the error message:
> >>     Enabling Flyspell mode gave an error
> >> (I've tried it in many different major modes including text,
> >> Fundamental, Lisp...)
>
> >> I don't see any other indication of what the problem could be. I can
> >> us all the ispell commands (eg. I can M-$ to check the spelling of a
> >> particular word). I originally thought that it might be a conflict
> >> with all the configurations I've done, so I removed my _emacs file and
> >> tried it from a base install and I eval'd this:
> >>     (setq-default ispell-program-name "aspell")
>
> >> Then I can M-$ to check the word, but I still cannot enable flyspell-
> >> mode and it gives me the same error.
<snip>

> Enable debug-on-error via 'M-x toggle-debug-on-error', then start flyspell-mode
> again and examine the error.
> If that does not work, try edebug. Open the file where flyspell-mode is
> defined. Reeval the function with 'C-u C-M-x' and again, start flyspell-mode.
> Now you are in edebug-mode. Hit Space till you get the error. Press 'i' to
> enable debugging of the called function after point.

Thanks for helping me work through this:
Okay, here's what I've done and the results:
Enable debug-on-error, then start flyspell-mode
-- The *Messages* buffer shows:
Loading flyspell...done


Enabling Flyspell mode gave an error

edebug:
I opened .../lisp/textmodes/flyspell.el, hit C-u C-M-x, then M-x
flyspell-mode
-- The *Messages* buffer shows:
Edebug: edebug-anon0


Enabling Flyspell mode gave an error

Then I hit space (point is at: (require 'ispell) and this displays in
mini-buffer and *Messages*:
Result: ispell
Then I hit space again and point moves to the middle of the comments
in the header of flyspell.el.
Space again inserts a space

When I run emacs --Q, the behavior above is identical. (Which makes
sense to me since I've renamed my _emacs file... I'm glad to know
about the -Q switch, though.)

I don't know if this helps or hurts, but I downloaded a copy of
Version 23, took the same steps as my original e-mail outlined and it
works like a charm. Then I reverted back to 22.1 and it works, too. It
is beginning to look like I'm fighting a bug in 22.3. (I would have
tried 22.2, but didn't want to download it.) I even tried copying
flyspell.el from 22.1 to 22.3 and deleting the elc file. It didn't
work either. :(

I'd like to stick to a stable version... any suggestions about where
to go from here?

Thanks,
-JEEP

Andreas Politz

unread,
Nov 5, 2008, 5:52:41 PM11/5/08
to

The flyspell-mode function catches all errors and gives this generic
error message. You could try to enable debug-on-error and eval this in
the scratch buffer :
(flyspell-mode-on)


>
> edebug:
> I opened .../lisp/textmodes/flyspell.el, hit C-u C-M-x, then M-x
> flyspell-mode

The cursor has to be inside the flyspell-mode function for this to work.
(C-M-x evals the current function , with prefix it also installs the
debug routines.)
Alternatively this should enable edebug on all forms in the current buffer:
M-x edebug-all-defs
M-x eval-buffer

-ap

jeep

unread,
Nov 5, 2008, 7:12:53 PM11/5/08
to

AHA! I found a second ispell.el in my load-path. I don't know how that
happened, but when I remove the file, flyspell-mode works for me!
Thanks for the help.

-JEEP

0 new messages