auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reporting warnings from pdftex itself (not LaTeX macro layer)


From: Ikumi Keita
Subject: Re: Reporting warnings from pdftex itself (not LaTeX macro layer)
Date: Fri, 29 Nov 2024 23:27:36 +0900

Hi all,

>>>>> Arash Esbati <arash@gnu.org> writes:
> Andreas Matthias <andreas.matthias@gmail.com> writes:
>> The following regexp find LuaTeX's TeX-warnings:
>> 
>> "\\(?:LaTeX\\|Class\\|Package\\|pdfTeX\\|\\*\\)? ?[-A-Za-z0-9]* 
>> ?[Ww]arning\\(?: +([- A-Za-z0-9]+)\\)?:"

> This is probably a little safer in case we have non-ASCII chars in the log:

> "\\(?:LaTeX\\|Class\\|Package\\|pdfTeX\\|\\*\\)? ?[-[:alnum:]]* 
> ?[Ww]arning\\(?: +([- [:alnum:]]+)\\)?:"

> And I think we can reduce this to:

> "\\(?:LaTeX\\|Class\\|Package\\|pdfTeX\\|\\*\\)?[- [:alnum:]]*[Ww]arning\\(?: 
> +([^)]+)\\)?:"

Unfortunately, it seems that we have to reconsider the implementation.
`LaTeX-warning-regexp' is used in `TeX-warning', where we read
----------------------------------------------------------------------
         (context (cond ((string-match LaTeX-warnings-regexp warning)
                         ;; The warnings matching `LaTeX-warnings-regexp' are
                         ;; emitted by \GenericWarning macro, or macros based on
                         ;; it (\ClassWarning, \PackageWarning, etc).  After
                         ;; such warnings there is an empty line, just look for
                         ;; it to find the end.
                         (beginning-of-line)
                         (while (null (eolp))
                           (forward-line 1))
                         (buffer-substring context-start (progn (end-of-line)
                                                                (point))))
----------------------------------------------------------------------
This "empty line" doesn't exist for the current pdfTeX warning, so this
code returns wrong result for our current tentative work around. :-(

Non-trivial work is needed here. I don't have a good idea yet.

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW



reply via email to

[Prev in Thread] Current Thread [Next in Thread]