TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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).


share|improve this question
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
up vote 5 down vote accepted

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.

share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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