auctex
[Top][All Lists]
Advanced

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

Re: [AUCTeX] Debugging LaTeX warnings


From: Ralf Angeli
Subject: Re: [AUCTeX] Debugging LaTeX warnings
Date: Sat, 05 Nov 2005 14:15:32 +0100
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

[Please don't use auc-tex at sunsite.dk.  The mailing list for general
discussion of AUCTeX moved in March to auctex at gnu.org.]

* Akim Demaille (2005-11-04) writes:

> I would love to have AUC-TeX provide a means to capture warnings just
> as it provides support for bad box warnings.  For instance:
>
> LaTeX Warning: Reference `grm.pda.nsupm' on page 123 undefined on input line 
> 50
> 8.
>
> LaTeX Warning: \oval, \circle, or \line size unavailable on input line 170.
>
> Package hyperref Warning: Token not allowed in a PDFDocEncoded string,
> (hyperref)                removing `math shift' on input line 1453.

AUCTeX should be able to jump to the first two warnings if you enable
`TeX-debug-bad-boxes' e.g. with `C-c C-w'.  The hyperref warning will
not be recognized.  Also, warnings without line numbers won't be
recognized.  And what I found rather a pity is that AUCTeX does not
inform the user if warnings or bad boxes where found.

The attached patch (against CVS) will remedy some of these problems
and do some more:

  * Display of warnings or bad boxes can be enabled and disabled
    independently of each other.  This can come handy if you have a
    document with many overfull or underfull boxes and want to debug
    warnings other than those.

  * After running LaTeX the user will be informed if warnings or bad
    boxes were found if the respective options `TeX-debug-bad-boxes'
    or `TeX-debug-warnings' are enabled.

  * Warnings without line numbers and warnings issued by packages will
    be found as well.  You can check that e.g. by defining two
    identical labels.  (Display of the .aux file might not be too
    informative, though.)

The patch is not perfect yet because e.g. it is not able to determine
the line number in multi-line warnings like the one by hyperref shown
above.  This will probably be a bit harder to do.

If somebody wants to start a bikeshed discussion we could argue about
a key binding for toggling this feature.  (Toggling is not part of the
patch yet.)  I'd like to see `C-c C-t C-w' for toggling warnings and
`C-c C-t C-b' for toggling bad boxes.  Ideally `C-c C-w' would be
thrown out of the window (sooner or later).

What I'd really like to see is an error/warning overview buffer as
suggested before.  Something like that would probably be easier to do
if compile.el offered it ready to be used by other libraries.

-- 
Ralf

Attachment: debug-warnings.patch
Description: Text Data


reply via email to

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