Hi Arash, > sorry for my late response. If it fixes the issue reported by Michael, > we can install it. Is it possible to add this new variable to the > manual as well?
OK, here is such a proposal. I think this change is quite safe, so I'll commit it soon. Bye, Ikumi Keita #StandWithUkraine #StopWarInUkraine #Gaza #StopMassiveKilling #CeasefireNOW
>From d66534c950606fa635e9f898c2a7a808c5d2003a Mon Sep 17 00:00:00 2001 From: Ikumi Keita <[email protected]> Date: Wed, 24 Jan 2024 17:49:03 +0900 Subject: [PATCH] Make banner regexp customizable * tex.el (TeX-LaTeX-sentinel-banner-regexp): Turn the regexp to identify the banner line in the LaTeX output into customize option. (TeX-LaTeX-sentinel): Use it. * doc/auctex.texi (Processor Options): Mention the new option. --- doc/auctex.texi | 14 ++++++++++++++ tex.el | 10 ++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/doc/auctex.texi b/doc/auctex.texi index c4cd0257..05fb754e 100644 --- a/doc/auctex.texi +++ b/doc/auctex.texi @@ -3521,6 +3521,20 @@ a command not found error. The error code returned by the shell in this case can be set in @code{TeX-check-TeX-command-not-found} option. @end defopt +In addtion, @AUCTeX{} searches for a line similar to +@example +LaTeX2e <2022-11-01> patch level 1 +@end example +in the console log to check whether @command{latex} command runs +successfully. If there isn't such a line when running @LaTeX{}, @AUCTeX{} +warns the problem and resets the next default command to ``LaTeX''. If +this check doesn't suit for your use case, you can customize the +@code{TeX-LaTeX-sentinel-banner-regexp} option: +@defopt TeX-LaTeX-sentinel-banner-regexp +When a @LaTeX{} run outputs a banner line matching this regexp, @AUCTeX{} +considers that it was successfull. +@end defopt + Some @LaTeX{} packages requires the document to be compiled with a specific engine. Notable examples are @samp{fontspec} and @samp{polyglossia} packages, which require Lua@TeX{} and Xe@TeX{} engines. If you try to diff --git a/tex.el b/tex.el index 47686518..3132472e 100644 --- a/tex.el +++ b/tex.el @@ -709,6 +709,13 @@ commands." :group 'TeX-command :type 'boolean) +(defcustom TeX-LaTeX-sentinel-banner-regexp + "^\\(\\*\\* \\)?J?I?p?\\(La\\|Sli\\)TeX\\(2e\\)? \ +\\(Version\\|ver\\.\\|<[0-9/-]*\\(?:u[^>]*\\)?>\\)" + "Regexp to identify the banner line in the LaTeX output." + :group 'TeX-output + :type 'regexp) + ;;; Portability. (defmacro TeX--if-macro-fboundp (name then &rest else) @@ -8531,8 +8538,7 @@ Changebar info has changed." nil t) "%s" "You should run LaTeX again to synchronize exercise properties") (setq TeX-command-next TeX-command-default)) ((re-search-forward - "^\\(\\*\\* \\)?J?I?p?\\(La\\|Sli\\)TeX\\(2e\\)? \ -\\(Version\\|ver\\.\\|<[0-9/-]*\\(?:u[^>]*\\)?>\\)" nil t) + TeX-LaTeX-sentinel-banner-regexp nil t) (let* ((warnings (and TeX-debug-warnings (TeX-LaTeX-sentinel-has-warnings))) (bad-boxes (and TeX-debug-bad-boxes -- 2.43.0
_______________________________________________ bug-auctex mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-auctex
