Skip to content Accesskey=4Skip to sub-navigation Accesskey=3View our Accessibility Options MIT Information Systems Home About IS&T Contact IS&T Site Map Search Advanced Search
Getting StartedGetting Services by Topic or Alphabetically Getting Help

On This Page

[Help]

  

Quick Links

Top Level

Related Links

Ask OLC a question

Athena Consulting Homepage

Helpdesk Stock Answers (for Mac/PC questions)


How to check for SPELLING errors in a file

Several options are available for users who want emacs to check the
spelling of their documents.    

The first is:

	M-x ispell

(M-x is the ALT or Compose Character key and x key pressed at the same time.)

Now the following commands are available for the duration of your emacs
session:

  M-x ispell-word         - Checks word
  M-x ispell-buffer       - Checks buffer (current file)
  M-x ispell-region       - Checks region

When ispell finds a word that is not in its dictionary, it will outline the
word in reverse video (from emacs it will respond with a message that says,
"Enter letter to replace word; space to flush") If there are "near misses" in
the dictionary, ispell will also display the incorrect word and a list of
correct alternatives at the top if they exist.

At this point, you can type one of the following characters:

  r        - Replace Word
              Ispell asks you for a replacement word.  Ispell will NOT
              check this word.

  #        - Replace Word with suggested word
              The words at the top of the screen are numbered.  If you type
              a word's number, ispell will use this word as a replacement.

  <space>  - Skips Word
              Leave this word as is.  If this word is encountered again,
              ispell will stop and prompt you for an action.

  a        - Accept Word
              Accept this word as correct for remainder of ispell session
              (or emacs if you are using ispell in emacs).

  i        - Add Word
              Add this word to your personal dictionary. This is a file
              in your home directory called .ispell.words which tells
              ispell to accept the word as correct every time you use
              ispell (useful for things like your name).
 
  <CTRL-G> - Quit Ispell
              You can quit ispell at any time by pressing <CTRL-G>.  This
              is done by holding down the CTRL key and pressing "G".

The man page on ispell lists more options and gives more detailed information
on this program.

----------------------------------------------------------------------

	M-x spell-buffer

is a similar program to M-x ispell, but runs off of the unix "spell"
program instead of the "ispell" program.  The main differences are
that spell has a larger vocabulary, but ispell offers suggestions for
replacements and allows you to add words to your personal dictionary. 

----------------------------------------------------------------------

	M-x flyspell-mode

is a command that is more useful to use when starting to write a
document; words will be color-coded as you type them, using the ispell
package.  The first time a word that it doesn't recognize is
encountered, it's colored red, while further instances of the word are
colored yellow.  

Once a word is marked as misspelled, you can click on it with the
middle mouse button to suggest replacements, or use M-TAB to
automatically correct it to what ispell thinks it should be.


Last updated: 4/15/00

MIT Home | Getting Started | Getting Services | Getting Help | About IS&T | Accessibility
Ask a technology question or send a comment about this web page.