Search code examples
latexhomebrewspell-checkingaspelltextmate2

How can I make Homebrew and CocoAspell coexist?


After much searching on the Internet, I have never seen a satisfactory answer or explanation to the following problem. I would like to use CocoAspell for system-wide spell-checking on OS X 10.9 (plugs into TexShop, TextMate, etc.), but every time I install it, brew doctor starts throwing the following warnings:

Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
    /usr/local/lib/libaspell.15.1.4.dylib
    /usr/local/lib/libpspell.15.1.4.dylib

Warning: Unbrewed .la files were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected .la files:
    /usr/local/lib/libaspell.la
    /usr/local/lib/libpspell.la

Internet searches have shown that these warnings never seem to lead to any errors, but it seems to me that there must be some way to suppress them. Partly, I like to see the Your system is ready to brew notification, but I'd also like to avoid some sort of "boy crying wolf" situation, where I become accustomed to brew doctor throwing errors.

Is there a way to either:

  • Install CocoAspell in another location, such that brew doesn't see it
  • Hide the offending dylib and .la files from brew doctor
  • Or enable the CocoAspell preference pane/program to access libraries installed by a brewed version of aspell

Uninstalling CocoAspell and trashing the offending files results in a clean bill of health, and performing brew install aspell results in a working version of aspell, but this doesn't help me with any of the GUI applications I prefer for LaTeX editing.


Solution

    1. Uninstall cocoAspell completely if you installed it before.
    2. Install aspell with homebrew or any other package manager. Don't forget the dictionaries you need. I wanted English and Czech, so I used

      brew install aspell --with-lang-cs --with-lang-en
      
    3. Install only the preference pane of cocoAspell. Click on "Customize" before installing and only select the "Spelling" option.

    4. Create the directory /Library/Application Support/cocoAspell/
    5. Make a symlink in the directory to make the preference pane aware of the available dictionaries (as the administrator):

      cd /Library/Application\ Support/cocoAspell/
      ln -s /usr/local/lib/aspell-0.60 Dictionaries
      

      Make sure that /usr/local/lib/aspell-0.60 is the correct path.

    6. The cocoAspell pref pane now shows the installed dictionaries.