2

To set up auctex in Emacs you are told to include

(load "auctex.el" nil t t)

...etc. in your init/.emacs file. But if you installed auctex with elpa (which puts files in ~/.emacs.d/elpa/auctex-11.86/), you have no auctex.el and the (load ...) fails. What should I do?

Drew
  • 29,895
  • 7
  • 74
  • 104
147pm
  • 2,137
  • 18
  • 28
  • Just try without this expression. It is likely not needed, because ELPA packages usually load themselves via autoloads, and thus do not need to be loaded explicitly. Note that ELPA only provides Auctex 11.86 which is quite dated. The current release is 11.87, which is only available via Tarballs. –  May 31 '13 at 17:31

2 Answers2

5

Instead of loading nonexistent auctex.el do

(require 'tex)

which initializes AUCTeX for me (Windows Emacs 24.3 and pdflatex from Cygwin). If you have MiKTeX, you would also need

(require 'tex-mik)

Another potential problem with the package from elpa is the tex-site.el which is supposed to be generated during installation and contain system-specific data but gets installed from elpa instead. You may want to examine the file and make corrections if needed (and copy it to some other location which is listed earlier in your load-path). For instance it has some unix paths which make no sense in Windows environment.

Alex Vorobiev
  • 4,349
  • 21
  • 29
  • 1
    This seems to have worked. I also changed `(load "preview-latex.el" nil t t)` to `(require 'preview)` and that also seems to be working. I alread had `(package-initialize)` in my init, however. – 147pm Jun 01 '13 at 01:37
1

Your problem is most likely due to the package initialization problem discussed here: Emacs 24 Package System Initialization Problems

You need to call (package-initialize) before calling load to not get an error.

Community
  • 1
  • 1
Nicolas Dudebout
  • 9,172
  • 2
  • 34
  • 43