Re: Command line args (was: API Changes)

From: mitchell <mforal.n....at.gmail.com>
Date: Fri, 18 Jun 2010 11:52:27 -0400

Robert,

> From: Robert <ro....at.web.de>
> Date: Fri, Jun 18, 2010 at 10:55 AM
> Subject: Re: Command line args (was: API Changes)
> To: textadept.at.googlegroups.com
>
>
> Hi Mitchell,
>
> On Fri, Jun 18, 2010 at 3:48 PM, mitchell <mforal.n....at.gmail.com> wrote:
>> The Lua state is destroyed and re-initialized inbetween reset_before
>> and reset_after events so no data can persist. I've attached a patch
>> that fixes the issue. I'll commit it later tonight. Thanks.
>>
>> Mitchell
>>
>>>
>
> thanks for looking into this. I've attached my attempt, which is more
> complicated. The difference is that your version loads files from the
> command line and saves the session (so previous session files would be
> "lost"), while my attempt is loading files passed from the command
> line in addition, if -nosession isn't explicitly passed. I just
> checked and your version is the current behaviour.
> Loading in addition could be better, especially with a single-instance
> Textadept.
> Possibly, the session file loading should be attached to a (to be
> introduced) "startup" event instead of "arg_none"?

Sorry. Clearly I didn't do testing before creating that patch. Does
the following patch give the desired behavior? The session module now
checks for -n if the arg_none event is emitted (it didn't previously,
resulting in the loading/saving of sessions)

By the way, with dynamic args, I'd like to keep any module-specific
code out of init.lua. Hopefully my new patch works.

Mitchell

>
> Robert
>
> --
> You received this message because you are subscribed to the Google
> Groups "textadept" group.
> To post to this group, send email to textadept.at.googlegroups.com.
> To unsubscribe from this group, send email to
> textadept+unsubscribe.at.googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/textadept?hl=en.
>

Received on Fri 18 Jun 2010 - 11:52:27 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:48:21 EST