3

from what I have learnt from my research so far, auctex should load beamer.el automatically once a *.tex file with \documentclass{beamer} is loaded. However, this is not the case here and I find the following error in *messages*:

File mode specification error: (file-error "Cannot open load file" "beamer")

As I have not found any usefull ideas so far what could be wrong, here two further pieces of information that could help to solve the problem.

First, I have the following in my .emacs:

(add-hook 'LaTeX-mode-hook
      (lambda ()
        (require 'beamer)
        (require 'reftex) 
))

Second, I use Ubuntu 12.04 and did a manual upgrade from Texlive 2009 to Texlive 2012. As I am not really sure, if my problem occurred already before I can't say if this latter might be the source of the problem.

Please ask for any further information that might help.

Thank you very much.

5
  • First: remove (require 'beamer), this won't work. Second: do you have the lines (setq TeX-auto-save t) (setq TeX-parse-self t) (setq-default TeX-master nil) in your .emacs, as described in AUCTeX manual?
    – giordano
    Jun 15, 2013 at 12:25
  • yes, all of the described are included (however, with a ' before each bracket). Removing (require 'beamer) has the result that the error does not appear anymore in *messages*; however, beamer.el functionality is still missing then (which is my problem, obvisously).
    – covey12
    Jun 15, 2013 at 13:33
  • Remove quotes before that lines and you're done.
    – giordano
    Jun 15, 2013 at 13:37
  • Thanks alot, indeed that's it. What did the quote do? Is it commenting out the lines like ;? Unfortunately I build my .emacs from copying pieces that I find on the internet, so I can't say why I had it quoted. (Finally: how do I close the question?)
    – covey12
    Jun 15, 2013 at 13:58
  • No, quotes prevent evaluation of the following symbol, list, function, etc. See Quoting on Emacs Lisp Reference Manual.
    – giordano
    Jun 15, 2013 at 14:01

1 Answer 1

4

To make the beamer style file work (like for all AUCTeX style files), you just need to add the following your .emacs

(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq-default TeX-master nil)

without quoting setq or setq-default functions. The (require 'beamer) call is useless.

This is the complete working .emacs

(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq-default TeX-master nil)
(add-hook 'LaTeX-mode-hook
      (lambda ()
        (require 'reftex)))

You must log in to answer this question.

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