Next: Using Aspell with other Applications, Previous: Spellchecking Individual Files, Up: Basic Usage

### 3.2 Using Aspell as a Replacement for Ispell

As of GNU Aspell 0.60.1 Aspell should be able to completely replace Ispell for most applications. The Ispell compatibility script should work for most applications which expect Ispell. However there are some differences which you should be aware of.

#### 3.2.1 As a Drop In Replacement

Aspell can be used as a drop in replacement for Ispell for programs that use Ispell through a pipe such as Emacs and LyX. It can also be used with programs that simply call the `ispell` command and expect the original file to be overwritten with the corrected version.

If you do not have Ispell installed on your system and have installed the Ispell compatibility script then you should not need to do anything as most applications that expect Ispell will work as expected with Aspell via the Ispell compatibility script.

Otherwise, the recommended way to use Aspell as a replacement for Ispell is to change the `ispell` command from within the program being used. If the program uses `ispell` in pipe mode simply change `ispell` to `aspell`. If the program calls the `ispell` command to check the file, then change `ispell` with `aspell check`.

If that is impossible then the `run-with-aspell` script can be used. This script modifies the patch so that programs see the Ispell compatibility script instead of the actual true `ispell` command. The format of the script is:

         run-with-aspell command

where command is the name of the program with any optional arguments.

The old method of mapping Ispell to Aspell is discouraged because it can create compatibility problems with programs that actually require Ispell such as Ispell's own scripts.

#### 3.2.2 Differences From Ispell

Nevertheless, Aspell is not Ispell, nor is it meant to completely emulate the behavior of Ispell. The `aspell` command is not identical to the `ispell` command when not used in “pipe” mode. If an application expects the `ispell` command, then the Ispell compatibility script should be used instead.

##### 3.2.2.1 Functionality of the Ispell Compatibility Script

The Ispell compatibility script provides the following Ispell functionally.

- The ability to check a file when called without any mode parameters.
- The pipe or -a mode.
- The list or -l mode.
- The version or -v mode. A single line is returned which, while not being identical to the line Ispell returns, is sufficient to fool most programs.
- The munch or -c mode.
- The expand or -e mode.
- The ability to dump the affix file when called with '-D'. However the format of the affix file is different. Furthermore, not all languages have an affix file.

However the Ispell script is currently unable to emulate the '-A' pipe mode. This is different from the normal pipe mode in that the special `&Include_File&` command is recognized.

##### 3.2.2.2 Recognized Options

Aspell, and thus the Ispell compatibility script, recognizes most of the options that Ispell uses except for the '-S', '-w' and '-T' options. The Aspell command will simply ignore these options if it sees them.

##### 3.2.2.3 Check Mode Compatibility

The interface used by Aspell when checking individual files is slightly different than Ispell's. In particular the default keymappings are not the same as the ones Ispell uses. However Aspell supports using the Ispell keymappings via the `keymapping` option. To use the Ispell keymappings set the `kepmapping` option to `ispell`. This can be done on the command line by adding using the command:

           aspell check --keymapping=ispell ...

    or with the Ispell compatibility script

           ispell --keymapping=ispell ...

The Ispell keymapping can always be used when the Ispell compatibly script is called by uncommenting the indicated line in the `ispell` script.

##### 3.2.2.4 Pipe Mode Compatibility

The Aspell pipe mode should be identical to the Ispell pipe mode except if the line starts with a '$$' as that will trigger special Aspell only commands or if the line starts with a '~' which is ignored by Aspell.

##### 3.2.2.5 Other Differences

The compiled dictionary format is completely different than Ispell's. Furthermore the format of the language data files' are different than Ispell's affix file. However, all known Ispell dictionaries were converted to Aspell format, except for Albanian (sq) as I was unable to find the source word list.

The naming and format of the personal dictionary is also different. However, Ispell personal dictionaries can be imported using the `aspell-import` script. See Using aspell-import. The Ispell personal dictionary is simply a list of words while the Aspell one is a list of words with a header line. Thus it is also fairly easy to convert between the two. See Format of the Personal Dictionary.

##### 3.2.2.6 Missing Functionally

The only major area where Ispell is superior to Aspell is in the handling of multi character letters such as old ASCII encoding of accented characters.

However, Aspell can handle UTF-8 documents far better than Ispell can.