I have Emacs installed on a Windows 7 machine along with AUCTeX for creating and editing LaTeX documents. I recently installed Predictive Mode to enable auto-completion of LaTeX macro commands.

Predictive Mode works when working in an ordinary text document, but does not work for a LaTeX document. When I open the LaTeX file and run the Predictive Mode function, I get the following message:

Warning (emacs): Predictive major-mode setup function predictive-setup-latex failed; latex-mode support disabled

That's the only message I get - no other information.

Has anyone ever encountered this before? What is the solution?


Predictive mode requires compilation:

To install the package, extract the files using tar -xvzf predictive.tar.gz. This will unpack the files in a new directory called predictive/. Now byte-compile all the Lisp files and create the required dictionaries by running make in the predictive/ directory. If necessary, you can specify explicitly where your Emacs resides with make EMACS=/path/to/emacs. -- Installation guide from the official website

This installation requires make utility. You can obtain it with Cygwin, which works well and compiles all dictionaries, including LaTeX dictionary. At the same time, make from GnuWin32 gives out some errors and fails (probably some dependencies are lost). So, Cygwin is the one.

After you've installed Cygwin, run Cygwin Bash Shell and go from there to your ~/emacs.d/predictive directory. Cygwin link local drives to cygdrive directory, so in your case, the path will be /cygdrive/c/program files (x86)/emacs/.emacs.d/predictive/latex.

After you've reached the predictive, type make and Enter. If Emacs's bin directory is in Windows' PATH environment, make will find it and will compile dictionaries. Otherwise, like the official guide says, run make EMACS="/cygdrive/c/program files (x86)/emacs/bin/"

Make sure .emacs file has both lines:

(add-to-list 'load-path "~/.emacs.d/predictive/")
(add-to-list 'load-path "~/.emacs.d/predictive/latex/")

At this point LaTeX dictionary should work and the English dictionary be much faster (without compilation they're a little bit jerky).

  • Hi Anton, Installed cygwin. The bin folder for emacs is C:\program files (x86)/emacs/emacs-23.3/bin ... and there is no make command available there or anywhere else it seems. Navigating to the bin folder in Bash and typing Make <enter> gets a bad command error. There is a makefile command in the Lisp folder underneath /emacs-23.3, but that's it. So, I'm a little stymied. I suppose I could edit the Windows path and add the /bin directory and see if that helps, but I got the same results typing in the EMACS="..." path above. Any further help would be appreciated. @Anton – Stephen Bishop Aug 31 '11 at 23:08
  • @Stephen, try to execute make command from predictive's directory, i.e. where all its files (predictive.el, dict-english.el, etc.) are. There should be the file named Makefile as well. That's exactly what make utility is looking for. – Anton Tarasenko Sep 1 '11 at 6:49

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.