[TxMt] Catching Error messages

Jeroen van der Ham jeroen at je-ju.net
Mon Jan 3 14:49:21 UTC 2005


On 03-01-2005 15:34, Eric Hsu wrote:
>> - If TextMate could also jump to the place in the output where the error
>> was produced, it would be great, because context is often important in
>> finding the cause of the error and it's very hard to define regexps to
>> grasp all those things.
> 
> 
> I am having trouble picturing this suggestion. An example?

Pdflatex produces a whole lot of mumbojumbo output while it is parsing 
the file. And errors are mixed between this all. You can use regexp 
patterns to grab the error messages and they are then displayed in a 
list, you can click on them and jump to the file and line number of the 
error.
But below the list of errors is the resulting output and it would be nice 
if that jumped to the error, so that you can see its context.

>> - Allow for multi-line captures: (pdf)latex produces quite verbose
>> errormessages that almost always are on two lines. I haven't been able to
>> get TextMate to catch both lines and let me see it back in the overview.
> 
> 
> I 100% agree with this. This would be the equivalent of a flag on the 
> regexp of searching across newlines.
> 
> FYI, I had this exact issue and here is the command I wrote to work 
> around it. Basically, I put pdflatex into a nonstop mode and pipe it 
> through a script to erase any newline that isn't part of multiple 
> newlines. Then I figure out the name of the resulting .pdf file and open 
> it in Preview. It works pretty well and it catches in a 'jumpable way' 
> most of the errors and warnings that pdflatex produces.  I leave it to 
> others to customize the path to pdflatex...

This would work indeed, although I have the feeling it's a bit overkill 
to do this with perl ;)

> 
> Preview has an annoying habit of not refreshing files when they are 
> re-opened; otherwise this would be a complete replacement for TexShop.

I use TeXniscope[1], which speaks a bit of applescript and is able to 
refresh the pdf.

Jeroen.

[1] http://docenti.ing.unipi.it/~d9615/homepage/texniscope.html



More information about the textmate mailing list