Re: Question about recognition of run errors etc

From: phayz <russelldicken....at.gmail.com>
Date: Sun, 6 Feb 2011 03:55:47 -0800 (PST)

On Feb 6, 9:51 pm, Robert <ro....at.web.de> wrote:
> Russell,
>
> On Sun, Feb 6, 2011 at 11:47 AM, phayz <russelldicken....at.gmail.com> wrote:
> > In another thread I mentioned that I am trying to get a custom compile
> > command for HTML files working as I need. The command I am using to
> > 'compile' these files recognises syntax errors and quotes their
> > location. I would like to use the Textadept feature where clicking on
> > a line in the output panel will then jump to the problem line. When I
> > look at run_supplemental from the TA wiki I see that it's the output
> > of the 'run' command which is a parsed for errors.
>
> > How can I have the output of the 'tidy' utility parsed for errors,
> > just as the output of the 'run' commands is parsed?
>
> I don't know how to prevent the blocking you mentioned in your other
> mail, but there are some changes necessary to the command in your
> other mail:
>
> > The line I added to run_supplemental was:
> > run.compile_command.html = 'tidy -qe --gnu-emacs "%(filename)"'
>
> gnu-emacs needs a flag like 1, yes, etc.
> If this works, you need to change filename to filepath because
> otherwise Textadept won't find the buffer with the file you were
> checking (there could be several index.html open).
>
> _m.textadept.run.compile_command.html = 'tidy -qe --gnu-emacs yes "%(filepath)"'
>
> Then you have to define the pattern that is used to filter the error message:
>
> _m.textadept.run.error_detail.html = {
>   pattern = '^(.-):(%d+):%d+: (.+)$',
>   filename = 1, line = 2, message = 3
>
> }
>
> This is adapted from the examples of the supplemental run commands.
> There is one thing to keep in mind. When you click in the error
> message buffer, Textadept doesn't know what language file you were
> editing, so it simply loops through all error pattern until one fits.
> If there is another pattern that fits first you might get a message
> like
> "/home/foo/index.html:193" not found. (Tidy gives you the column
> number as well.)
> There are certainly ways to work around this by modifying the patterns
> but if you don't use the patterns for other languages in run
> supplemental you can simply comment them out.
>
> Robert

Robert,

Thanks for such a prompt and fantastic reply. I understand the errors
etc that you're pointing out. With these errors corrected I expect to
get the results I'm after.

I'll report my progress (or otherwise) here.

--
Received on Sun 06 Feb 2011 - 06:55:47 EST

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:59:40 EST