[TxMt] Re: utility to navigate through errors.

Dru Kepple dru at summitprojects.com
Fri Sep 17 20:09:27 UTC 2010


On Sep 17, 2010, at 7:38 AM, Afflictedd2 wrote:

> 
> Hi everyone,
> 
> I have a small program that detects
> errors and outputs their presence in
> a file "error.txt" with the following format:
> 
> <Error> found in line 84
> <Error> found in line 98
> <Error> found in line 129
> <Error> found in line 300
> <Error> found in line 620
> <Error> found in line 1000
> 
> I was wondering can I build something (macro? command?)
> that will help me navigate through this errors, without
> me going manually to each line. Like when textmate displays
> errors where you can just simply click on a link to jump to
> that line number.
> 
> Ted.
> 

You'll probably want to create a command with HTML output, which reads that file and processes it.  Or it might be better to alter your small program so that it writes "error.html" instead of "error.txt."  Depends on if your small program is used for other things, too, I guess.  Personally, I'd consider writing a small Ruby script that opens "error.txt" and parses it, outputting HTML.

So, there is a txmt protocol that you can use in HTML links that TextMate receives and understands.  See this:

http://manual.macromates.com/en/using_textmate_from_terminal.html#url_scheme_html

+dru





More information about the textmate mailing list