[TxMt] Catching Error messages
Eric Hsu
erichsu at math.sfsu.edu
Mon Jan 3 14:34:19 UTC 2005
>- 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?
>- 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...
Preview has an annoying habit of not refreshing files when they are
re-opened; otherwise this would be a complete replacement for TexShop.
I hope this is helpful! - Eric
---
Before Cmd: Save
Cmd:
/usr/local/teTeX/bin/powerpc-apple-darwin-current/pdflatex
-interaction=nonstopmode -file-line-error-style "$TM_FILEPATH" |
perl -e 'while(<>){$f.=$_}$_=$f;s/([^\n])\n([^\n])/$1$2/g;print;'
echo
echo "Previewing..."
echo $TM_FILEPATH | perl -e 'while(<>){s/\.tex$/.pdf/;print;}' | xargs open
Stdin: None
Stdout: Show in separate window
Pattern: (\d+|LaTeX Warning): (.*?)$
Format: $1: $2
File:
Line: 1
Col:
More information about the textmate
mailing list