I download AucTeX from ELPA and put nothing in my .emacs file. However, the commands auctex and preview-latex do not seem to be there (when I try M-x auctex or M-x preview-latex, Emacs cannot find them).

When I try to put the load commands in my .emacs file, I get errors:

Debugger entered--Lisp error: (file-error "Cannot open load file" "auctex.el")
  load("auctex.el" nil t t)

If I look in my emacs elpa directory, auctex.el does not seem to be present:

~/.emacs.d/elpa/auctex-11.86$ ls auctex*
auctex-autoloads.el  auctex.info  auctex.info-1  auctex.info-2  auctex-pkg.el  auctex-pkg.elc

When I open a basic, correctly formatted, .tex file and try to run preview-buffer (M-x preview-buffer), the following happens:

Cache preamble? (y or n) y

Type C-c C-l to display results of compilation.

So I do, at which point I get this garbage:

! Preview: Snippet 1 started.
l.11 $
      a\in S$
Preview: Tightpage -32891 -32891 32891 32891
! Preview: Snippet 1 ended.(537395+30747x1884782).
l.11 $a\in S$
[1] )
(see the transcript file for additional information)
Output written on _region_.dvi (1 page, 1640 bytes).
Transcript written on _region_.log.

Preview-LaTeX exited as expected with code 1 at Mon Mar 11 01:40:34
Running `Preview-DviPS' with ``dvips -Pwww _region_.dvi -o _region_.prv/tmp11354CiZ/preview.ps''
This is dvips(k) 5.992 Copyright 2012 Radical Eye Software (www.radicaleye.com)
' TeX output 2013.03.11:0140' -> _region_.prv/tmp11354CiZ/preview.ps

Preview-DviPS finished at Mon Mar 11 01:40:34
Running `Preview-Ghostscript' with ``gs -dOutputFile\=\(_region_.prv/tmp11354CiZ/pr1-\%d.png\) -q -dSAFER -dNOPAUSE -DNOPLATFONTS -dPrinted -dTextAlphaBits\=4 -dGraphicsAlphaBits\=4 -sDEVICE\=png16m -r102.4x102.669''

Preview-Ghostscript finished at Mon Mar 11 01:40:34

I'm not sure what this is supposed to mean.

  • Welcome to TeX.sx! Mar 11, 2013 at 9:04
  • 1
    Go to scratch, paste in (and (load "auctex.el" nil t t) (load "preview-latex.el" nil t t)) and enter ^J with the cursor at the end of that form: what do you get? If you get the result t, then both Elisp files are in your path. Mar 11, 2013 at 13:54
  • 'Cannot open load file "auctex.el"' Let me rewrite the original post.
    – anonymous
    Mar 11, 2013 at 20:38
  • You need to fix the contents of the Emacs variable load-path so it includes directories that contain the missing .el sources. Perhaps entering the form (setq load-path (cons "~/.emacs.d/elpa/auctex-11.86" load-path)) will fix your problem? Mar 19, 2013 at 13:12
  • Nothing changed when I put the load-path instruction in my .emacs file. Like I said in the OP, that directory is missing auctex.el.
    – anonymous
    Mar 26, 2013 at 0:07

1 Answer 1


Don't try to mix elpa package loading with old style editing your startup file. Either you will confuse the package manager or the package manager will confuse you.

This came up in chat the other day


Following the thread there worked when I tried it.

The important bit is remove all existing references to auctex from your emacs then do what it says in the new manual for elpa installs of auctex

Simply do M-x package-list-packages RET, mark the auctex package for installation with i, and hit x to execute the installation procedure. That’s all.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .