jwise / naim

naim is a console client for AOL Instant Messenger (AIM), AOL I Seek You (ICQ), Internet Relay Chat (IRC), and The lily CMC.
http://naim.n.ml.org/
GNU General Public License v2.0
8 stars 5 forks source link

naim needs a sane search path and default load mechanism for Lua modules #7

Closed jwise closed 12 years ago

jwise commented 12 years ago

Right now, naim's /dofile only works out of your home directory, and there is no on-boot module loading. In order to use OSCAR full-time, OSCAR needs to load on naim boot.

jwise commented 12 years ago

Presumably search paths should be: ~/.naim, PKGDATADIR/lua, and maybe ABS_BUILDDIR/lua?, in that order.

Similarly, init routines should be loaded from userinit.lua, siteinit.lua, and distinit.lua. siteinit.lua would be optionally installed by a user in PKGDATADIR/lua; distinit.lua would be installed by the distribution; and userinit.lua would live in ~/.naim.

This seems pretty reasonable, modulo maybe the ABS_BUILDDIR. distinit would serve to load things like the OSCAR package, which doesn't get loaded from default, but does come with the distribution.

To do, then, is to figure out how to export PKGDATADIR and ABS_BUILDDIR from Die GNU Autotools into C headers. Tomorrow.

jwise commented 12 years ago

Seems maybe PKGMODDIR might be more appropriate than PKGDATADIR.

jwise commented 12 years ago

Seems maybe PKGMODDIR might be more appropriate than PKGDATADIR.