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

From: Mitchell <m.att.foicica.com>
Date: Mon, 15 Apr 2013 17:02:32 -0400 (Eastern Daylight Time)

Hi Ryan,

On Mon, 15 Apr 2013, Ryan Pusztai wrote:

> Hi Mitchell,
>
> On Thu, Mar 28, 2013 at 10:05 PM, Mitchell <m.att.foicica.com> wrote:
>
>> Does it work if you comment out modules/textadept/run.lua:73?
>>> ("lfs.chdir(current_dir)")
>>>
>>> If so, I think the implementation needs to be tweaked to store the
>>> working directory somewhere (maybe in the output or in a variable).
>>>
>>
>> Latest hg[1] stores the cwd of the most recently executed compile/run
>> command so double-clicking errors for relative file paths should be more
>> accurate for files that are not already open.
>>
>
> I installed TA 6.5 which I believe has the fix for this, but now I get this
> as the error message when double-clicking on an error line.
>
> Lines to double-clock on:
>
>> ScsSpeedDistanceProcessor.cpp: In function uint32_t
>> GetTimestamp(boost::shared_ptr<mobius::StaticCyclicSequence>&, uint32_t):
>> ScsSpeedDistanceProcessor.cpp:41:13: error: Ex was not declared in this
>> scope
>
>
> TA Error message:
>
>> ...sztai/bin/textadept_6.5.x86_64/modules/textadept/run.lua:210: attempt
>> to concatenate field 'cwd' (a nil value)
>
>
> After looking at the code I see that you are expecting the user to "Run" or
> "Complie", but I am using make so I added my own keyboard shortcut to run
> make.
>
> Here is the main parts from my ...cpp/post_init.lua:
>
> local function RunMake()
>> local vcs, projectroot = _M.version_control.get_vcs( buffer.filename or ""
>> )
>> gui.statusbar_text = ("Building %s..."):format(
>> projectroot:match("[^/]+$") )
>> -- Save all buffers
>> io.save_all()
>> local numCPUs = WIN32 and os.getenv( "NUMBER_OF_PROCESSORS" ) or io.popen(
>> "nproc" ):read( "*n" )
>> os.spawn( projectroot, { "make", "-j" .. numCPUs }, nil, nil, gui.print,
>> gui.print )
>> end
>> keys.cpp.f7 = RunMake

Technically _M.textadept.run.cwd is not read-only, so you can try setting
it in your RunMake() function. Let me know if that works.

Cheers,
Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Mon 15 Apr 2013 - 17:02:32 EDT

This archive was generated by hypermail 2.2.0 : Tue 16 Apr 2013 - 06:46:00 EDT