September 2, 2015

Spell Check in Emacs

I use emacs for almost all text editing.

Side Note: If you want a super powerful text editor and are also interested in understand computers at a very deep level, I highly recommend biting the bullet and learning emacs

Spell Check would be nice in emacs. It looks like emacs uses a program called ispell to do spell checking.

From what I could tell, OS X doesn't come with ispell installed. I tried compiling ispell from source a while ago but it failed with some obscure message. So today, I setup homebrew, which is a software packaging system for OS X that finds and compiles tools such as ispell.

I've used it before and it's very slick. I was able to get ispell installed and working in seconds!

$> ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
==> This script will install:
/usr/local/bin/brew
/usr/local/Library/...
/usr/local/share/man/man1/brew.1
Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/mkdir /Library/Caches/Homebrew
Password:
==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew
==> Downloading and installing Homebrew...
remote: Counting objects: 3724, done.
remote: Compressing objects: 100% (3558/3558), done.
remote: Total 3724 (delta 37), reused 611 (delta 26), pack-reused 0
Receiving objects: 100% (3724/3724), 3.11 MiB | 2.18 MiB/s, done.
Resolving deltas: 100% (37/37), done.
From https://github.com/Homebrew/homebrew
* [new branch]      master     -> origin/master
HEAD is now at 9fc1952 rubocop: re-enable whitespace-related cops
==> Installation successful!
==> Next steps
Run `brew help` to get started

Homebrew is installed. Man, that was easy.

$> brew install ispell
==> Downloading https://homebrew.bintray.com/bottles/ispell-3.4.00.yosemite.bott
######################################################################## 100.0%
==> Pouring ispell-3.4.00.yosemite.bottle.tar.gz
🍺  /usr/local/Cellar/ispell/3.4.00: 22 files, 1.7M

ispell is installed. Very easy as well.

$> ispell
@(#) International Ispell Version 3.4.00 8 Feb 2015
word: voila!
ok

And ispell even works from same terminal without any restart, very nice. Now, in emacs, I can just ran M-x ispell and happy to report this blog post contains zero spelling mistakes ... at least according to ispell.

Tags: emacs tech