Re: Fwd: [code] [textadept] Theme selection

From: Mitchell <>
Date: Thu, 7 Mar 2013 21:41:36 -0500 (EST)

Hi Robert,

On Wed, 6 Mar 2013, Robert wrote:

> Hi,
> I've tried to find a way to show only actual themes from my user
> themes directory in the theme selection dialog. I came up with the
> attached patch to check for the existence of a view.lua file in the
> assumed 'theme'. This filters out '..' as before, but also '.hg' and
> the readme I have in my theme collection.
> Is there another way to achieve this?

I was thinking of committing something like this:

     local theme_dir = _USERHOME..'/themes/'
     for theme in lfs.dir(theme_dir) do
       if not theme:find('^%.') and
          lfs.attributes(theme_dir..theme, 'mode') == 'directory' then
         themes_found[theme] = true

Is this okay for you?


You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Thu 07 Mar 2013 - 21:41:36 EST

This archive was generated by hypermail 2.2.0 : Fri 08 Mar 2013 - 06:45:05 EST