I typeset documents in French, and I don't really need auto-completion of the words that I type. I do, however, love the completions features that Predictive mode offers for LaTeX commands.

Is there a way to tell Predictive mode to only do auto-completion on LaTeX keywords, and not for other words?

I've tried this :

  • (custom-set-variables '(predictive-main-dict nil))

but I'm not sure whether it's the right solution.

Can you confirm that it's correct to do it this way? If so, this post my serve as a reference for other searching for this (hopefully).


  • Actually, this doesn't seem to stop the predictive package from doing some work while I type, although it does disable completion on all but keywords. – Clément Jun 15 '11 at 18:55

You can try smart-tab, which basically maps the auto-completion to Tab key based on context. Usually, it will complete if you want to complete and indent if you want to indent (even though in some cases it fails).

For you, the good part is you need to trigger the completion by pressing tab, which means you can use it on any set of words or commands or your choice, and it won't do anything if you don't press tab. If several completions are available, pressing tab repeatedly will cycle through them, in the way the shell completion does.

But on the other hand, depending on how you use Predictive, if might mean you need to learn new keystrokes, it's always a pain.


Another solution is to create empty dictionary:

M-x predictive-create-dict

and saving it (in a reasonable location) without adding any words:

M-x predictive-save-dict

After that the empty dictionary can be set as default in .emacs file by adding a line

(setq predictive-main-dict (quote dict-void))

where dict-void is a name of our empty dictionary.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.