9

I'm using auctex + Emacs(OSX)

Problem: If I open an LaTeX file, it works right. But if I open an plain tex file, it complains.

Debugger entered--Lisp error: (void-variable latex-mode-abbrev-table)
  plain-TeX-common-initialization()
  plain-tex-mode()
  tex-mode()
  set-auto-mode-0(tex-mode nil)
  set-auto-mode()
  normal-mode(t)
  after-find-file(nil t)
9
  • What is the complaint before going into debugger? Also, how are you distinguishing a LaTeX file from a plain TeX file? While I do use emacs, I don't use auctex. So maybe that's where I'm not understanding things. Nevertheless, knowing the actually message emacs is posting could be helpful.
    – A.Ellett
    May 24, 2013 at 5:33
  • I has to do with Emacs.app in OSX. It doesn't give a problem using the default emacs in Mac OSX. Debugger entered--Lisp error: (void-variable latex-mode-abbrev-table) plain-TeX-common-initialization() plain-tex-mode() tex-mode() set-auto-mode-0(tex-mode nil) set-auto-mode() normal-mode(t) after-find-file(nil t) find-file-noselect-1(#<buffer a.tex> "~/tmp/a.tex" nil nil "~/tmp/a.tex" (7676964 16777219)) find-file-noselect("~/tmp/a.tex" nil nil nil) find-file("~/tmp/a.tex") command-line-1(("a.tex")) command-line() normal-top-level()
    – user28381
    May 25, 2013 at 5:40
  • Emacs.app is probably a more recent version of emacs than the version you run from the terminal shell (at least that's what I assume you mean by "default emacs"). It would really help to know what the "Message" emacs reported was before you entered debugger. Also, I'd recommend trying to load emacs without opening using your emacs profile to see what happens. Then gradually add in the features from your profile until you find what's breaking things.
    – A.Ellett
    May 25, 2013 at 14:09
  • Finally, I don't understand how you have things set up to distinguish between a plain TeX file and a LaTeX file. Unless auctex does something I'm unfamiliar with, emacs' tex-mode and latex-mode should pretty much be the same thing. If anything, something that fails in tex-mode should also fail in latex-mode, not the other way around. So, I suspect it's something to do with your emacs profile.
    – A.Ellett
    May 25, 2013 at 14:10
  • I still strongly suspect that there's something going on with your emacs profile. It looks like debugger is complaining that it can't find the abbreviation table for latex-mode. So you might look into whether you've disabled anything connected to loading the tex-mode defaults, which is required for auctex to get everything in plain-tex up and running.
    – A.Ellett
    May 25, 2013 at 16:23

1 Answer 1

7

This is a bug in AUCTeX, already fixed in the development version. You have to change the line 145 of plain-tex.el from

(setq local-abbrev-table latex-mode-abbrev-table)

to

(setq local-abbrev-table plain-tex-mode-abbrev-table)

Probably you'll also need to issue M-x byte-compile-file on that file.

You must log in to answer this question.

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