Martin Gasbichler <email@example.com> writes:
> The second proposal above is probably too incompatible to be
> introduced now but adding -lel as an option too search the library
> path for exec scripts is only a small extension.
That would be fine for me. This means that script authors would use
this -lel option to use packages, instead of -ll as in the original
proposal. As noted, it seems that this power is at least needed for
packages which include C code. It puts a slight additional burden on
package authors who do not need this power, since it implies that they
have to start their file with "(config)", but I guess that this is
We might also imagine an option which would be a bit "smarter". It
would be analoguous to -ll but it would take as argument the name of a
*directory*. It would look up this directory in SCSH_LIB_DIRS and then
do the following:
- if the directory contains, say, a file called "load-pkg.scm", then
this file is loaded in the exec package,
- otherwise, if the directory contains, say, a file called
"pkg.scm", then this file is loaded in the config package,
- otherwise, an error is signaled.
This would solve the very very small problem I mentioned above and
would lighten the notation to use a package, since there would be no
need to specify the name of the file anymore. It goes a bit in the
direction suggested by Anthony (i.e. make scsh aware of packages) but
it is still general enough to be used for other purposes (although, in
all honesty, I don't see for what use).
> So please tell me if you would like to have this option in 0.6.5 or
> not, or if you would prefer something different, for example a
> separate list of directories or just a different name for the
> command line option.
I would be very happy to have this option in 0.6.5, yes.
I think we should stick to a single list of directories, i.e.
SCSH_LIB_DIRS. I don't really see a need for a separate list, and it
would create too much confusion for end-users in my opinion.
As far as the name of the option is concerned, I would be happy to
have something more systematic, but I don't have a good idea about how
to reach that goal. For example, it would be great if just adding an
"l" at the beginning of the option name would mean "do like the option
without the initial 'l', but look in SCSH_LIB_DIRS". That is, have
-l <file-name> Load file into current package.
-lm <module-file-name> Load module into config package.
-le <exec-file-name> Load file into exec package.
-ll <file-name> As in -l, but search the library path list.
-llm <module-file-name> As in -lm, but search the library path list.
-lle <exec-file-name> As in -le, but search the library path list.
But of course, this is incompatible with the current meaning of "-ll",
which is why I have no better suggestion. Let's keep -lel as far as