Sunday, March 18, 2007

Buffer-local Dictionaries

If you write technical documents—especially technical computer science documents with code snippets and the like—you're likely to come across a spell-checking dilemma like the following:

Unrecognized word: pBuffer

Replace with: (0) buffer (1) puffer (2) puffier (3) pouffe ...
Space: Accept word this time
a: Accept word this session
i: Insert into personal dictionary

"pBuffer" is not a real word that should go in your personal dictionary, so you accept the word for this session. Say you're going to write 5,000 more drafts of this document. All of those weird little technical words could get pretty annoying after a while.

In Emacs, you can type 'A' instead of 'a' to insert the word in a "buffer-local dictionary." You can also presumably add a Local Words comment somewhere in your file by hand, like

% Local Words: pBuffer

Why is it always so hard to figure this stuff out?

Hat tip to the Linux Documentation Project.

Bonus tip: You want an em dash in your blog post? Try —. You would think I couldn't be so em dash-happy and not know this already, but I am and I didn't.

No comments: