开发者

Enabling Flyspell-mode gives an error

I recently had to reimage my windows laptop, and emacs is now giving me a strange error: "Starting new Ispell process [default] Enabling flyspell mode gave an error" I have aspell installed, and it is accessible via emacs. I have attached a picture 开发者_JAVA百科to show this. I also have (setq-default ispell-program-name "aspell") in my emacs configuration. This same configuration works properly on my other windows machines. What might be the problem here? Image: Aspell in emacs-shell http://img145.imageshack.us/img145/4497/emacsaspell.jpg


You can add the line:

(setq flyspell-issue-welcome-flag nil) ;; fix flyspell problem

to your personal emacs initialization file (~/.emacs.d/init.el, ~/.emacs, ~/.emacs.el, whatever...) and that should bypass the problem for you.


EDIT: This it seems is not the best solution: see the comment below and see Dennis' answer for a better alternative.

EDIT2: As the comment below indicates, deleting the files recommended in this post causes problems when upgrading. If you followed the advice on this post and now regret it (sorry), then to reinstall the deleted files you want to type:

sudo apt-get --reinstall dictionaries-common

You should now be able to upgrade and follow Dennis' solution.

Google sent me here first so I thought I would add another common reason for this error message (at least on Ubuntu systems)

My ubuntu 10.10 fresh install had the following bug:

https://bugs.launchpad.net/ubuntu/+source/dictionaries-common/+bug/619015

which is fixed (as indicated in the link) by deleting

  • /usr/share/emacs/site-lisp/dictionaries-common/debian-ispell.el
  • /usr/share/emacs/site-lisp/dictionaries-common/flyspell.el
  • /usr/share/emacs/site-lisp/dictionaries-common/ispell.el

and all the .el .elc files in

  • /usr/share/emacs23/site-lisp/dictionaries-common

The reason it seems is the above files are already installed in the emacs23-common, and the .el and .elc files retain the conflict on live systems (from reading the bug report).

I think there are other problems that can cause this error message, but this solved it for me, and I felt ubuntu is common enough for this to mensioned as another answer.

EDIT: There seems to be a less intrusive solution - see Dennis Sheil's answer

Blessings,

Tom


Writing an answer in order to mark this as accepted:

paprika's comment helped me track the problem - "Did you check if aspell works outside of Emacs, i.e. something like cat foobar.txt |aspell -a -l en?"

Turns out aspell-en had not been installed. my bad.


I ran into this problem as well when upgrading to emacs24. My aspell was working fine. I tried some of the techniques here with dictinaries-common and settting flyspell-issue-welcome-flag to nil as above but running emacs24 kept hanging on ispell.

I ended up purging my previous emacs23 install (making sure all their .el/.elc files were deleted in the uninstall), making sure there were no emacs processes in the background, and removing my cruft collecting ~/.emacs.d directory (taking care to save code in there I still needed).

I then freshly installed emacs24 (24.1.50.1 as it happens) and ran it and flyspell worked flawlessly.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜