SOLVED - problem loading personal init.lua under Windows XP

From: phayz <>
Date: Tue, 23 Mar 2010 15:28:46 -0700 (PDT)

In another thread (about the future of the Project Manager) I asked
how the PM might be hidden. To do this required a line be added to a
personal copy of init.lua. As I describe below I had trouble with this
and couldn't work out why. I couldn't get much in the way of an error
message because a GTK error dialog was appearing but I couldn't see
the very bottom of the dialog box. To cut a long story short, though I
finally realised what the problem was - my personal init.lua file (an
exact copy of the distributed one) had the following line:

local user_init = _USERHOME..'/init.lua'

When I ran TA it was concatenating the contents of _USERHOME (which
was a valid folder path) with text that contained a forward slash,
which is invalid in a Windows path. I changed the line to the
following and TA now starts as expected.

local user_init = _USERHOME..'\init.lua'

I don't know whether or not this is a bug but I thought I would
document my solution here rather than continue it in the "Future plans
for the Project Manager" thread so that it's more obvious and in case
it helps someone else.

Note that as I am a complete newbie when it comes to TA, I can't
guarantee that this is the right solution, nor that it won't cause
other problems.

For completeness sake I have included below what I hope is a relevant
extract from the other thread in which I described my problem.


On Mar 12, 2:00 pm, mitchell <> wrote:

> Hi,

> > Ummm... where would I add the line "pm.width = 0"? I copied the
> > original init.lua into my ~.textadept directory and tried adding the
> > line in several locations but couldn't find the right spot.

> Oops I was wrong. If you set its width to zero and close ta, it is
> stored in the session. If you modify ta's init.lua at the end of the
> command line section and add = 0, any session width
> will be overridden.

> Mitchell


Sorry, but I need more help with this. If I modify the init.lua
shipped with TA as follows, I get the desired result -

    -- read only the Project Manager session settings
    if not _m.textadept.session.load(nil, true) then = 'buffers'
  end = 0

But if copy the init.lua shipped with TA and make add the
" = 0" line in the same position, I get a LONG GTK
error dialog box filled with the following text - "C:\z\downloads
\textadept\init.lua:19". Note that the TA window still appears, but
it's obscured by the GTK error dialog box. I am trying to make the
change to the copy of the init.lua as per the instructions on the
following page -

After looking at the distributed init.lua file and line 19, I'm
guessing that something's going wrong with the call to the personal
init.lua but I don't understand just what.

Any advice would be welcome.


Russell Dickenson
Received on Tue 23 Mar 2010 - 18:28:46 EDT

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