Re: Lua Rocks

From: mitchell <mforal.n....at.gmail.com>
Date: Tue, 8 Jun 2010 20:29:57 -0700 (PDT)

Hi Rob,

On Jun 8, 5:44 am, Robert <ro....at.web.de> wrote:
> Hi
>
> On Fri, May 21, 2010 at 11:24 AM, Robert <ro....at.web.de> wrote:
> > Probably an easier way to test (or use) this is a personal init.lua (attached).
> > It will load the standard modules, then everything in common/modules,
> > then load the key_commands (both the standard module and in
> > .textadept) and finally process other files with additional snippets.
>
> Has anyone tried this or is using this?
> If it didn't work, a check for the modules/common directory is
> necessary, in case there is no "common" directory.
>
> local lfs = require 'lfs'
> local common_modules = _USERHOME..'/modules/common/'
> if lfs.attributes(common_modules) then
>   for filename in lfs.dir(common_modules) do
>     if filename:find('%.lua$') then
>       require('common.'..filename:match('^(.+)%.lua$'))
>     end
>   end
> end
>
> Mitchell, any thoughts on this? Would you consider this for inclusion?
> If not, I will at least put it on the wiki.

I think the wiki is a fine place for it to do. I'm not sure how I feel
about hardcoding a 'modules/common/' directory.

Mitchell

>
Received on Tue 08 Jun 2010 - 23:29:57 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:45:51 EST