[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Suggestion for Lua 5.3.0 -- require search paths
- From: Paul Merrell <marbux@...>
- Date: Sat, 5 Apr 2014 14:16:46 -0700
On Sat, Apr 5, 2014 at 1:09 PM, <tonyp@acm.org> wrote:
> I don’t know if this has been discussed before but would it possible to add
> the starting (main) script's path in the default search of directories when
> doing ‘require’? And, preferably as the first place to look.
We have in the NoteCase Pro API (written in C):
string Nc_Script_Path_Get()
Returns the path of the current script (.lua file path or path of
NoteCase Pro document, which contains the script).
So although I am not an advanced programmer, I'd guess that what you
suggest is possible. But it might better be done as part of a module,
in aid of keeping core Lua slim and trim. It's functionality not
everyone will need.
Best regards,
Paul
--
[Notice not included in the above original message: The U.S. National
Security Agency neither confirms nor denies that it intercepted this
message.]
- References:
- Running multiple threads in a lua state, Milind Gupta
- Re: Running multiple threads in a lua state, Javier Guerra Giraldez
- Re: Running multiple threads in a lua state, Coroutines
- Re: Running multiple threads in a lua state, Luiz Henrique de Figueiredo
- Re: Running multiple threads in a lua state, Coroutines
- Re: Running multiple threads in a lua state, Sean Conner
- Re: Running multiple threads in a lua state, Coroutines
- Re: Running multiple threads in a lua state, Sean Conner
- Re: Running multiple threads in a lua state, Rena
- Re: Running multiple threads in a lua state, Coroutines
- Suggestion for Lua 5.3.0 -- require search paths, tonyp