Re: [code] Preventing editor crash on module init in windows

From: Mitchell <m.att.foicica.com>
Date: Tue, 16 Dec 2014 09:10:20 -0500 (EST)

Hi Simon,

On Tue, 16 Dec 2014, Simon Lundmark wrote:

> Hi,
>
> When I'm sitting and trying to develop a module for textadept I often run
> into the issue that even though I use:
>
> local success, arg = pcall( require(my_module_init_file) )
> if success then
> ...
>
> Even though I wrap the require in a pcall the editor hangs up (I guess the
> lua-state crashes). I have to fix the issue (by editing the file in another
> editor) and then restart the editor. Is there any way to avoid this
> behavior? It would be awesome if any such information would be presented in
> the documentation under "Scripting" since that has been my largest obstacle
> in adapting to this awesome editor so far.

You can create a shortcut to Textadept, right-click -> properties, and add
the following command line parameters such that the "Target" field reads:

   C:\textadept\textadept.exe -u c:/temp

This will tell Textadept to use a clean userhome that will not load your
bad module.

Cheers,
Mitchell

-- 
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 16 Dec 2014 - 09:10:20 EST

This archive was generated by hypermail 2.2.0 : Wed 17 Dec 2014 - 06:31:56 EST