Re: [code] [textadept] Textadept 7.0 beta 4

From: Ryan Pusztai <>
Date: Tue, 1 Oct 2013 17:34:41 -0400

Hi Mitchel,

On Tue, Oct 1, 2013 at 4:46 PM, Mitchell <> wrote:

> On Tue, 1 Oct 2013, Mitchell wrote:
> Hi Ryan,
>> On Tue, 1 Oct 2013, Ryan Pusztai wrote:
>> So I missed changing 'gui.' to 'ui.', but the error is not helpful at all
>>> when figuring out what I missed next. I do currently use Common, but I
>>> forked it because I went a different way with the display_name module.
>>> You
>>> can check out "beta 2" working Common here:
>>> This is the hardest update I have had so far. So I think there might be a
>>> root cause to the error I am getting.
>> I'm really sorry you're having so much trouble with the update. I am
>> going to take a look at your repo and try and help figure it out.
>> The primary cause of this problem is that you are probably doing some
>> sort of operation at the module 'require' level (before ta is finished
>> initializing) that causes `events.UPDATE_UI` to be fired.
>> `buffer.get_lexer()` and `buffer.set_lexer()` do not exist until ta
>> finishes initializing.
> To clarify: while the above statement is valid, it also happens when
> errors occur while loading modules (for example, indexing a nil value like
> `_M.textadept.whatever`). Sorry if this sounds obvious, but I hadn't
> thought about it before.

Thanks for your help. I worked on the issue a bit more and have most
everything working. What caused the most problem is if I:
1. In init.lua you "require()" something to the _M table but then comment
it out.
2. Use that modules functions in the keys.lua file and it indexes into _M
and that table does not exist.

* init.lua

> -- Version control integration
> --_M.version_control = require( "version_control" )

> -- Add custom keyboard shortcuts
> dofile( _USERHOME .. "/keys.lua" )

* keys.lua

> local keys = _G.keys
> ...
> -- Version control
> local vc = _M.version_control
> keys[not NCURSES and 'caj' or 'cmj'] = vc.snapopen_project
> keys[not NCURSES and 'aj' or 'mj'] = vc.command
> --keys[not NCURSES and 'cah' or 'cmh'] = {vc.snapopen_project, _HOME..'/'}
> --if NCURSES then keys.cmg = keys.cmh end

That causes a segfault on my system. I hope this helps.

You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Tue 01 Oct 2013 - 17:34:41 EDT

This archive was generated by hypermail 2.2.0 : Wed 02 Oct 2013 - 06:36:31 EDT