After upgrading to auctex-13.0.1 I am getting the error wrong type argument: number-or-marker-p, nil whenever I try to compile a latex document in emacs.

Activating toggle-debug-on-error and issuing C-c c latex in a minimal latex document gives the following output:

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
  TeX-active-master-with-quotes(t t nil t)
  apply(TeX-active-master-with-quotes (t t nil t))
  TeX-command-expand("%`%l%(mode)%' %T")
  TeX-command("LaTeX" TeX-master-file nil)
  funcall-interactively(TeX-command-master nil)
  call-interactively(TeX-command-master nil nil)

Any ideas what's wrong here?

I'm quite sure it's not the file I'm using. Any minimal document throws the error. For example:


  • Please search this site for that error message. There are many occurrences, and most likely at least one is a duplicate of this question. – Drew Jan 1 at 19:44
  • @Drew I've been searching this site, google, tex.stackexchange, and lots of other sites for hours. Yes, others have bumped into this error message. I haven't come across a post that's been helpful to me though. Maybe I missed something? Maybe you could point me in the direction of a post that would help? I'd happily see this marked as a duplicate if there's a legitimate duplicate. Otherwise, I'd like this question to stay posted because I'm hoping someone interested in helping me comes across it. – Brian Fitzpatrick Jan 1 at 20:22
  • I cannot reproduce this (with auctex-13.0.1). Can you supply a minimal LaTeX file that demonstrates the behaviour? – Fran Burstall Jan 1 at 21:37
  • @FranBurstall Thanks for looking at this. Every latex file throws the error. I'll add one, but I'm sure it's not the file causing the issue. – Brian Fitzpatrick Jan 1 at 21:54
  • OK, looks like an issue with yr config (I still can't reproduce the error). Have a look at the Changes section of the auctex manual: looks like several variables like TeX-expand-list have changed their behaviour in v13 and that might cause yr error. – Fran Burstall Jan 1 at 22:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.