Re: [code] Some advice on textadept programming

From: Parke <>
Date: Tue, 3 Feb 2015 10:20:40 -0800

On Tue, Feb 3, 2015 at 9:53 AM, Carlos Pita <> wrote:

> 1) How do you reload and inspect your changes? [1] I know that C-e
> opens the command entry, but I'm looking for concrete advice: do you
> run something like "reset(); my_function()" or what?

Hopefully someone else knows, because I do not.

> 2) How do you debug or trace your changes? Do you just io.print?

I used print(). Just plain simple print(), without the io.

> 3) In general: do you have any useful patterns or techniques to share?

Assuming you are working on (advanced) lexers: I would consider
developing the lexer in Lua + LPEG with unit tests (and without
Textadept). This would require writing a Textadept emulation skeleton
for any TA functions the lexer needed to call.

This would allow me to test (automatically) changes to the lexer by
running the unit tests on the command line.

Only after the lexer was passing the unit tests would I connect it to Textadept.



You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Tue 03 Feb 2015 - 13:20:40 EST

This archive was generated by hypermail 2.2.0 : Wed 04 Feb 2015 - 06:44:38 EST