Re: Command line args (was: API Changes)

From: Robert <>
Date: Thu, 17 Jun 2010 14:40:22 +0200

On Wed, Jun 16, 2010 at 5:43 PM, mitchell <> wrote:
> core/init.lua is loaded and then gtk_main() is executed. When quit()
> is called, gtk_main_quit() is called. As you probably imagined,
> gtk_main_quit() being called before gtk_main() would be a problem!
Ok, I looked into textadept.c and removed the help flag for the moment
- I think it would be nice to have, so maybe later. The way to go
would probably be to check the parameters in textadept.c's main
function for -h.

> One issue with arg being processed again is with filenames as
> arguments; they'll be reloaded.
There were some issues with the filename processing, but as the actual
loading of the files is done in a "not RESETTING" they are only loaded
the first time. The argument processing itself is repeated to reread
_USERHOME if set.
I think having this option would be useful (for me at least) during
the switch to TA3 and as well for Textadept Portable.
An option for not loading any userhome files like I suggested is not
necessary I think, because every call to something userhome is wrapped
in an "if" so you could have
--userhome none or any other word that does not exist as a path if you
needed this for testing (like I did when I tried the new Lexer engine
with the old .textadept/lexers).

I attached a diff file against the latest hg. I hope this makes it
easiest for you for testing or reviewing. (I removed the help switch,
but couldn't resist trying renaming the no-session flag to -n

While typing this I realize that maybe the userhome switch would
belong as well into textadept.c. Like the calll to get proc/self/exe.
Then the rest of the argument parsing could stay as and where it was.
Would you prefer that instead of a core submodule?


Received on Thu 17 Jun 2010 - 08:40:22 EDT

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