Re: [code] [textadept] API changes

From: Robert Gieseke <rob.g.att.web.de>
Date: Tue, 26 Nov 2013 21:43:37 +0100

Hi Mitchell,

Am 11/26/13, 6:15 AM, schrieb Mitchell:
> To clear up any confusion, 7.x is the "stable" series; it's already
> solid. The beta series served to cement the 7.x API for the book.

sure - I just wanted to bring these up before Textadept probably enters
a period of more API stability

> I've explored this in the past. It would pretty much require a rewrite
> of Textadept. The editor relies heavily on 0-based buffer structures.
> It's not only lines that would have to change, but buffer positions,
> margin numbers, marker numbers, indicator numbers, and style numbers
> too. No small task. I am also slightly concerned about metatable
> performance with `buffer` being such a heavily-used object. Also,
> buffers already have metatables attached to them. I'm not sure if you
> can have a metatable for a metatable for a table...

As I started looking into this I worried that this might be the case

> I am reluctant to overhaul key bindings. The last one was for 4.0 over 2
> years ago. I feel the keys are quite consistent between platforms as is,
> but I welcome any suggestions you have. Starting from the terminal
> platform is limiting because it cannot recognize Ctrl+Alt combinations
> and other combinations that vary based on the underlying system platform.

Understood. This is certainly a big "project" and also a matter of taste
and prior preferences. What I don't like about the keybindings are the
differences between OS X and Linux/Windows. I think there are more than
necessary, for example for Selection/Enclosing. Of course I can use my
own 'keys.lua' but for quickly doing something on another platform it
would be nice if there were more similar.

>> * An annotation function
>> Many language modules have an annotation function to show syntax
>> errors. A centralised function would avoid writing this again in every
>> module and could more easily be customized in behaviour. I find these
>> annotations very helpful but I would prefer to never have my caret
>> position changed, like already implemented in the Python module[2]
>> (but not in the Lua module for example).
>
> I think this is a good idea, without jumping the caret.

Would you like to see a patch? In case there are different preferences
for this feature it might be an option to have this handled by an event,
otherwise an 'annotate_line' function might be enough -- but I don't know

>> * Rename lexers
> This can probably be done. Hypertext is a relic from Scintilla but I
> think we can move on from it.

Thanks, every time I try to switch to HTML I never think of typing 'hyper'.

Many thanks for consideration and your detailed explanations,
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 Tue 26 Nov 2013 - 15:43:37 EST

This archive was generated by hypermail 2.2.0 : Wed 27 Nov 2013 - 06:48:40 EST