Re: [code] How to get GCC compiler errors to work

From: Mitchell <>
Date: Tue, 23 Apr 2013 15:21:19 -0400 (Eastern Daylight Time)


On Tue, 23 Apr 2013, Ryan Pusztai wrote:

> [snip]
> I am using Premake4 to generate project files and it does not output the
> "entering" output. I can get it to show the entire command-line, but the
> error messages from GCC are only showing the files relative to the Makefile.
> So my question is: Can I do my own thing when the double-click on an
> error occurs, from inside my '.../cpp/post_init.lua' file?
> I am assuming I can because at this point TextAdept is AMAZING and can do
> anything :) Just wondering the event to connect to. It was not obvious to
> me.
> I am thinking about possibly searching for the file from the CWD down. Any
> other ideas? Thoughts?

You assumed correctly: events.DOUBLE_CLICK[1] :) In fact, run.lua connects
to that event to parse error messages. Simply connect your handler with
index 1 and return a boolean on success to halt Textadept from running its
default handler.

Another idea: if you listen to events.COMPILE_OUTPUT and/or
events.RUN_OUTPUT, they emit a line at a time, so you can test if the line
matches a relative path, and if so, look up the message buffer to
determine a full path and print it instead. That way you might not have to
hook into DOUBLE_CLICK.

I'm happy to hear ta is working well for you :)


[1]: file:///c:/textadept/doc/api/events.html#DOUBLE_CLICK

You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Tue 23 Apr 2013 - 15:21:19 EDT

This archive was generated by hypermail 2.2.0 : Wed 24 Apr 2013 - 06:35:19 EDT