0

I am having some (more) difficulties getting my emacs config to work. I want to use Flyspell automatic spell checking. When I try to enable automatic spell checking (via the menu bar), I get the following error.

Starting new Ispell process aspell with english dictionary...
Error enabling Flyspell mode:
(Error: The file "/usr/local/lib/aspell-0.60/english" can not be opened 
for reading.)

A quick look at /usr/local/lib/aspell-0.60/ reveals that I have no English dictionary installed. More fully, here is what is installed:

 Lindsays-MacBook-Pro:lib ljs$ ls aspell-0.60/
 ccpp.amf       cp1258.cset     iso-8859-2.cmap     nroff-filter.info
comment.amf     dvorak.kbd      iso-8859-2.cset     nroff-filter.la
context-filter.info email-filter.info   iso-8859-3.cmap     nroff- 
filter.so
context-filter.la   email-filter.la     iso-8859-3.cset     nroff.amf
context-filter.so   email-filter.so     iso-8859-4.cmap     perl.amf
cp1250.cmap     email.amf       iso-8859-4.cset     sgml-filter.info
cp1250.cset     html-filter.info    iso-8859-5.cmap     sgml-filter.la
cp1251.cmap     html.amf        iso-8859-5.cset     sgml-filter.so
cp1251.cset     iso-8859-1.cmap     iso-8859-6.cmap     sgml.amf
cp1252.cmap     iso-8859-1.cset     iso-8859-6.cset     spell
cp1252.cset     iso-8859-10.cmap    iso-8859-7.cmap     split.kbd
cp1253.cmap     iso-8859-10.cset    iso-8859-7.cset     standard.kbd 
cp1253.cset     iso-8859-11.cmap    iso-8859-8.cmap     tex-filter.info
cp1254.cmap     iso-8859-11.cset    iso-8859-8.cset     tex-filter.la
cp1254.cset     iso-8859-13.cmap    iso-8859-9.cmap     tex-filter.so
cp1255.cmap     iso-8859-13.cset    iso-8859-9.cset     tex.amf
cp1255.cset     iso-8859-14.cmap    ispell          texinfo-filter.info
cp1256.cmap     iso-8859-14.cset    koi8-r.cmap     texinfo-filter.la
cp1256.cset     iso-8859-15.cmap    koi8-r.cset     texinfo-filter.so
cp1257.cmap     iso-8859-15.cset    koi8-u.cmap     texinfo.amf
cp1257.cset     iso-8859-16.cmap    koi8-u.cset     url.amf
cp1258.cmap     iso-8859-16.cset    none.amf

Any help greatly appreciated

Lindsay
  • 131
  • 1
  • 10

1 Answers1

0

Looks like you have a broken install of aspell. Assuming you used Homebrew to install it, just uninstall it, and reinstall it.

$ brew uninstall aspell
$ brew update
$ brew install aspell

If you're still having trouble, maybe comment out

(starter-kit-load "starter-kit-aspell.org")

from starter-kit.org so it looks like

;;(starter-kit-load "starter-kit-aspell.org")

This will prevent the starter-kit from loading its flycheck/aspell settings allowing you to use the defaults. You will have to manually enable flyspell on a buffer where you want to use it. Meta-x flyspell-mode will do the trick.

nega
  • 2,526
  • 20
  • 25
  • Ensure that `aspell` is in your path. – nega Nov 13 '18 at 21:16
  • Thanks. I updated aspell, as you suggest. Now when I try to enable Flyspell I get a new error: `Starting new Ispell process aspell with english dictionary... Error enabling Flyspell mode: (Searching for program No such file or directory aspell)`. When I type `which aspell` into Terminal, I get no return, except the command prompt. Incidentally, in the process of trying to get aspell to work I deleted the following files: `/usr/local/include/pspell/pspell.h`, `/usr/local/bin/precat', `/usr/local/bin/aspell-import`. I thought they would be re-written on re-installing aspell. – Lindsay Nov 13 '18 at 21:36
  • Well, `which` says it's not in your path. If you're using Homebrew, `aspell` should be at `/usr/local/bin/aspell`, and `/usr/local/bin` is in your PATH by default on macOS. – nega Nov 13 '18 at 21:39
  • What to do about that? If I `echo $PATH` it returns `/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin`. If I open Terminal and `cd` to `usr/local/bin/` there is no aspell directory. There is an aspell at `usr/local/include`. – Lindsay Nov 13 '18 at 22:53
  • The `/usr/local/bin/aspell` I referenced is an executable, part of the `aspell` package, and not a directory. It sounds like `aspell` has not been installed correctly. Do not "uninstall" something by just deleting files, but via your package manager's facilities, ie `brew uninstall` in the case of Homebrew. – nega Nov 13 '18 at 22:58
  • Uninstalling and uninstalling gives: `Error: The `brew link` step did not complete successfully The formula built, but is not symlinked into /usr/local Could not symlink lib/aspell-0.60/american-variant_0.alias /usr/local/lib/aspell-0.60 is not writable. You can try again using: brew link aspell ==> Caveats Installation of the 'is' (Icelandic) and 'nb' (Norwegian) dictionaries is currently broken. They can be installed manually. See: https://github.com/Homebrew/homebrew-core/issues/28074 ==> Summary /usr/local/Cellar/aspell/0.60.6.1_1: 267 files, 35.6MB – Lindsay Nov 14 '18 at 03:20
  • Lindsays-MacBook-Pro:bin ljs$ brew link aspell Linking /usr/local/Cellar/aspell/0.60.6.1_1... Error: Could not symlink lib/aspell-0.60/american-variant_0.alias /usr/local/lib/aspell-0.60 is not writable. Lindsays-MacBook-Pro:bin ljs$ – Lindsay Nov 14 '18 at 03:21
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/183602/discussion-between-user1519289-and-nega). – Lindsay Nov 14 '18 at 05:29