Re: [code] [textadept] Latest Changes in hg

From: Robert Gieseke <rob.g.att.web.de>
Date: Wed, 11 Sep 2013 16:19:14 +0200

Hi Mitchell,

Am 9/10/13 3:09 AM, schrieb Mitchell:
>
>>> I've found a small issue, the new 'initialized' event [1] makes it
>>> impossible to simply overwrite key short cuts in my 'init.lua', as
>>> apparently [2] postpones loading 'textadept.keys'. Should running the
>>> _USERHOME init.lua wrapped be in 'initialized' event as well?
>>
>> No, because modules need to be loaded before `events.INITIALIZED` is
>> fired. This includes modules loaded from `~/.textadept/init.lua`. Wrap
>> your key bindings in an `events.INITIALIZED` handler. I need to update
>> the manual with this information.
>
> I changed my mind. The old method will stay. It just involves renaming
> `buffer:reload()`, `buffer:save()`, etc. to `io.reload()`, `io.save()`,
> etc. Come to think of it, I'm not really sure I like mixing io functions
> (or anything external for that matter) with buffer objects in the first
> place. After all, it's `textadept.editing.block_comment()`, not
> `buffer:block_comment()`.
>

I'm trying to understand the new INITIALIZED event. My problem is that
modules that piggy-back on user theme styles like Textredux or
highlighting the margins for the active buffer are now loaded before any
buffer is actually loaded.

Is this correct?
After loading and initializing all modules first files given on the
command line are loaded, then (if none) the session file is processed.

For the margin highlighting it's easy to workaround by wrapping the code
in an INITIALIZED event, for Textredux this is a bit more convoluted
since other modules depend on its style module.

Is there a way to get theme properties before any file is loaded?
Maybe I'm misunderstanding things …

Thanks,
Robert

-- 
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 Wed 11 Sep 2013 - 10:19:14 EDT

This archive was generated by hypermail 2.2.0 : Thu 12 Sep 2013 - 06:43:01 EDT