Re: [code] Textadept Customization and Upgrades

From: Robert Gieseke <rob.g.att.web.de>
Date: Tue, 10 Mar 2020 13:33:03 +0100

Hi Gavin,

that's an interesting question!

When there is something that is not user-patchable (due to being a local
variable) you could always ask to expose this part of the API.

If you have major changes like for the menu you could for having a local
copy in your, e.g.

~/.textadept/modules/textadept/menu.lua

This would mean monitoring new updates for important changes in these
files but it might be easier than having to patch these files from your
init.lua in some cases.

On your Q3 (from skimming your init.lua it seems you are using
self-built versions as well), there was a change for removing the
accelerators:

https://foicica.com/hg/textadept/file/ed378e85ab70/modules/textadept/menu.lua

Maybe that's the problem? "File" vs "_File"

Cheers
Robert

On 10.03.20 13:17, Gavin Holt wrote:
> Hi,
>
>
> The ability to delve into TA and make modifications is one of many
> appealing features, but I am getting concerned about how I will apply
> my Lua hacks to any new release.
>
>
> Wherever possible I have tried to make changes from my user/init.lua
> file. However, with many modules binding local functions I now have a
> list of edits that will need to be redone after
> installing/reinstalling.
>
>
> Q1. I would be interested to know how others have managed this in the
> past when new versions are released?
>
>
> Q2. Additionally, as customization is a key feature of TA are there
> any modifications to the core code which would make the process
> easier?
>
>
> I have attached my init.lua for information.
>
>
> Kind Regards Gavin Holt
>
>
> PS A case in point
>
>
> Q3 . I am struggling to reassign a menu entry to a redefined function
> - see new io.open_recent_file() in my init.lua.
>
>
> I am trying to alter the table textadept.menu.menubar[_L['_File']] but
> I can't iterate to find the right spot to make an alteration.
>
>
> Test case "for i,v in pairs(textadept.menu.menubar[_L['_File']]) do
> print(type(v)) end" returns nothing - despite
> print(#textadept.menu.menubar[_L['_File']]) returning 17!
>
>
> Any help appreciated.
>

-- 
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 10 Mar 2020 - 08:33:03 EDT

This archive was generated by hypermail 2.2.0 : Wed 11 Mar 2020 - 06:45:17 EDT