GNU bug report logs -
#48144
13.0.11; TeX-run-format signals error in sentinel
Previous Next
Reported by: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Date: Sat, 1 May 2021 16:16:02 UTC
Severity: normal
Tags: fixed, patch
Found in version 13.0.11
Done: Ikumi Keita <ikumi <at> ikumi.que.jp>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 48144 <at> debbugs.gnu.org (full text, mbox):
Hi Basil,
"Basil L. Contovounesios" <contovob <at> tcd.ie> writes:
> I was experimenting with configuring latexmk as best I could in
> TeX-command-list when I noticed an inconsistency between TeX-run-format
> and its sentinel. Here's a recipe to illustrate what I mean:
>
> 0. emacs -Q
> 1. M-x package-initialize RET
> 2. (progn
> (setq debug-on-error t)
> (add-hook 'LaTeX-mode-hook
> (lambda () (setq TeX-command-default "Latexmk")))
> (with-eval-after-load 'tex
> (push '("Latexmk"
> "latexmk%(file-line-error) %(extraopts)%(mode) %t"
> TeX-run-format nil (latex-mode))
> TeX-command-list)))
> 3. C-x C-e
> 4. C-x C-f /tmp/helloworld.tex RET
> 5. M-x auto-insert RET RET article RET RET RET
> 6. \helloworld
> 7. C-c C-c y RET
>
> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
> intern(nil)
> TeX-TeX-sentinel-check(#<process Latexmk> "Latexmk")
> TeX-TeX-sentinel(#<process Latexmk> "Latexmk")
> TeX-command-sentinel(#<process Latexmk> "exited abnormally with code 12\n")
>
> AFAICT, this is because TeX-run-format uses TeX-TeX-sentinel, which
> calls TeX-TeX-sentinel-check, which expects TeX-error-report-switches to
> have been initialised by TeX-run-TeX, but we're not using TeX-run-TeX!
>
> I'm not sure whether the TeX-error-report-switches initialisation should
> be moved to TeX-run-format, or TeX-TeX-sentinel-check should guard
> against an uninitialised TeX-error-report-switches.
>
> Are my assumptions about or use of TeX-run-format wrong? E.g., should I
> just be using TeX-run-command for this purpose instead?
I'm not familiar with Latexmk, but I think you want to use `TeX-run-TeX'
instead of `TeX-run-format'. Can you please try it with something like
this:
(with-eval-after-load 'tex
(add-to-list 'TeX-command-list
'("Latexmk"
"latexmk%(file-line-error) %(extraopts)%(mode) %t"
TeX-run-TeX nil (latex-mode))))
Best, Arash
This bug report was last modified 4 years and 14 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.