Subject: bug#45521: 13.0.0; C-c C-c gives "Wrong type argument: number-or-marker-p, nil"

From: Tassilo Horn <[email-masked]>
Date: Tue, 29 Dec 2020 19:58:28 +0100

Tassilo Horn <[email-masked]> writes:

Hi Uwe,

>> 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)
>>   TeX-command-master(nil)
>>   funcall-interactively(TeX-command-master nil)
>>   call-interactively(TeX-command-master nil nil)
>>   command-execute(TeX-command-master)

Hm, I can't reproduce it.  AFAICS, `TeX-active-master-with-quotes' can
only signal that error if `TeX-expand-pos' in

      (setq TeX-expand-pos
          (+ TeX-expand-pos (length res)))

is nil.  `TeX-expand-pos' is new in auctex 13.0.0, before an undeclared
variable `pos' was used here.

Do you have some custom code (like a custom entry in `TeX-expand-list')
still using `pos' rather than `TeX-expand-pos'?  If so, have a look at
(info "(auctex) Changes") which tells which breaking changes have been
made in AUCTeX 13.0.0 and how to adapt to them.

Bye,
Tassilo