I've used emacs as a basic editor for a little while and decided to try setting up AUCTeX+Skim for my TeX needs. I'm using emacs 24.4.1 and AUCTeX 11.88. When I open a *.tex file, a get the error message:

~/.emacs.d/elpa/auctex-11.88/auctex.el:Error: Opening directory: no such file or directory, /Users/mer/Documents/mydir/style/

where "mydir" is the directory storing the .tex file being edited. I'm not sure why auctex is looking for a style subdirectory, but perhaps I've set something in my .emacs incorrectly. Here is the TeX portion of my .emacs file. It's largely copied from: http://www.stefanom.org/setting-up-a-nice-auctex-environment-on-mac-os-x/

I would be thankful for any explanation of what is going on and how to handle this. I don't really intend to generate style subdirectories for every .tex project I'm working on. Does anyone know how to set AuCTex to limit searching for style directories to prevent this error?

(load "auctex.el" nil t t)
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq-default TeX-master nil)  ;Query for master file

(add-hook 'LaTex-mode-hook 'visual-line-mode)
(add-hook 'LaTex-mode-hook 'flyspell-mode)
(add-hook 'LaTex-mode-hook 'LaTex-math-mode)

(add-hook 'LaTex-mode-hook 'turn-on-reftex)
(setq reftex-plug-into-AUCTeX t)
(setq TeX-PDF-mode t)

;use Skim as viewer
(add-hook 'LaTeX-mode-hook (lambda()
    '("latexmk" "latexmk -synctex=1 -pdf %s" TeX-run-TeX nil t
      :help "Run latexmk on file")

(add-hook 'TeX-mode-hook '(lambda() (setq TeX-command-default "latexmk")))

(setq TeX-view-program-selection '((output-pdf "PDF Viewer")))
(setq TeX-view-program-list
  '(("PDF Viewer" "/Applications/Skim.app/Contents/SharedSupport/displayline -b -g %n %o %b")))

(server-start); start emacs in server mode so that skim can talk to it.
  • Try removing (load "auctex.el" nil t t), this is not needed when using ELPA packages and can trigger this error in some cases.
    – giordano
    Jan 4, 2015 at 17:34

1 Answer 1


Packages installed in Emacs using its bultin package manager need not to be manually loaded (unless you request not to load them automatically, but it isn't your case), so remove the line

(load "auctex.el" nil t t)

from your init file.

You must log in to answer this question.

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