Re: API Changes

From: mitchell <>
Date: Mon, 14 Jun 2010 06:49:50 -0700 (PDT)


> Some thoughts on the changes:
> keys.lua: I think it would be better to have separate files for key
> commands and the definitions below
> "-- Do not edit below this line.". Having a file with custom key
> bindings (for example to replicate
> the behaviour of another editor or Dvorak keybindings) would then be
> possible by simply putting it
> in ~/.textadept/modules/textadept/ without having to include the
> definitions again.

But didn't you originally suggest to have user keys.lua? Is that not a
good idea anymore?

> core/init.lua: Is it still necessary to have _USERHOME..'/?.lua' in the path?

I think this was suggested by someone else (I don't remember who...)
Unless they say it is irrelevant, I'm going to keep it in.

> core/events.lua: How about adding a function for removing an event handler with
> defaulting to removing the first one:
> function disconnect(event, index)
>   local plural = event..'s'
>   local handlers = events[plural]
>   if index then
>     table.remove(handlers, index)
>   else
>     table.remove(handlers, 1)
>   end
> end

What would be a use case? As it is, there is no way to check if a
particular handler is at a particular index.

> view:split function: Maybe the argument could be changed to a string
> "vertical" or "horizontal"?

I prefer booleans. Most users expect a vertical split with their wide-
screen monitors anyway, so view:split() works 9 times out of 10 as

> Command line arguments - would you consider adding command line
> switches for setting the location of userhome and
> loading? This would be very useful now that I have two incompatible
> Textadept versions. Possibly,
> -p or --plain for loading Textadept without userhome
> -u <path> or --userhome <path> for setting the userhome location

Submit a patch :)

> Attached I have some things I found looking through the latest hg.
> (Sessions did not work.)

Thanks. I'll apply them when I get home from work.


> Robert
>  ta3.diff
Received on Mon 14 Jun 2010 - 09:49:50 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:47:44 EST