You should never normally need to use this command interactively, since
predictive mode loads and unloads dictionaries automatically, as needed.
You should never normally need to use this command interactively, since
predictive mode loads and unloads dictionaries automatically, as needed.
compiled
, dictionaries are
saved in compiled form, if set to uncompiled
they are saved in
uncompiled form, and if set to anything else they are saved in both
forms (the default). A compiled dictionary can be loaded a lot faster,
and is always used in preference to the uncompiled form if it
exists. However, compiled dictionaries are not portable between
different Emacs versions, whereas uncompiled ones are.
To use a dictionary, it must be loaded into memory. Usually, predictive mode loads the dictionaries it needs automatically, and unloads them again when they are no longer needed. Once it has been loaded, the predictive-main-dict is never automatically unloaded. It can take a while to load large dictionaries, and predictive-main-dict is likely to be used by most predictive-mode buffers. If you would like to prevent any other dictionaries from being unloaded automatically, add them to predictive-dict-lock-loaded.
You can also load and unload dictionaries manually. If a dictionary is saved somewhere in your load path, you can load it using the predictive-load-dict and dictree-load commands. The predictive-load-dict command additionally adds it to the list of dictionaries used by the current buffer. This has two implications: the dictionary will automatically be saved when the buffer is killed (assuming its autosave flag is non-nil, see Creating Dictionaries), and it will be included when learning from the buffer (see Learning from Buffers and Files). (You should avoid loading a dictionary using the load-file command, as it will not necessarily ensure that the dictionary is correctly associated with the file it was loaded from).
If you want a dictionary to be loaded every time you run Emacs, and the dictionary is saved somewhere in your load-path, you can add the following line to your .emacs file:
(dictree-load 'dictionary-name)
The major-mode setup functions load the dictionaries they need automatically. See Major Modes.
A buffer is usually associated with a file, and saving the buffer with the Emacs save-buffer command writes any changes back to that file. Similarly, dictionaries are usually associated with a dictionary file. The predictive-save-dict command saves any changes back to that file. The predictive-write-dict command is analogous to the Emacs write-file command.
You should never rename a dictionary file. (Moving a dictionary file to another directory in your load-path is fine, but you cannot rename the file itself.) The correct way to rename a dictionary is to supply a new file name to predictive-write-dict.
Dictionaries can be modified by adding words to them with the predictive-add-to-dict command (see Creating Dictionaries). If the auto-learn features are used, dictionaries are modified whenever a completion is accepted (see Automatic Learning). The predictive-save-modified-dicts saves all modified dictionaries whose autosave flag is set. Modified dictionaries used in a buffer are automatically saved when that buffer is killed if they have their autosave flag set. All modified autosave dictionaries are saved when you exit Emacs.