Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

nesting package files, howto?

1 view
Skip to first unread message

Michal Maruška

unread,
Apr 1, 2002, 2:22:18 PM4/1/02
to

does the configuration language allow including other files (w/ the
configuration-language code)? i would like to keep separate files (for example
other people's package files), but still be able to load only the main one from
my scripts.

The s48 manual does not mention this possibility.

Richard Kelsey

unread,
Apr 2, 2002, 10:03:49 AM4/2/02
to
m...@maruska.dyndns.org (Michal Maru?ka wrote in message news:<m24rivc...@linux11.maruska.tin.it>...

> does the configuration language allow including other files (w/ the
> configuration-language code)? i would like to keep separate files (for example
> other people's package files), but still be able to load only the main one from
> my scripts.

There isn't any include mechanism. You can load multiple configuration
files by creating an exec file and loading that. For example, if
load-all.scm contains
(config)
(load "my-packages.scm")
(load "other-packets.scm")
then
,exec ,load load-all.scm
will load both package files. I don't know how you would load a file
into the exec package from a Scsh script.

See http://s48.org/0.57/manual/s48manual_19.html for a little bit more
documentation on ,exec.
-Richard Kelsey

Martin Gasbichler

unread,
Apr 2, 2002, 10:36:38 AM4/2/02
to

>>>>> "RK" == Richard Kelsey <kel...@s48.org> writes:

RK> m...@maruska.dyndns.org (Michal Maru?ka wrote in message news:<m24rivc...@linux11.maruska.tin.it>...


>> does the configuration language allow including other files (w/ the
>> configuration-language code)? i would like to keep separate files (for example
>> other people's package files), but still be able to load only the main one from
>> my scripts.

RK> There isn't any include mechanism. You can load multiple configuration
RK> files by creating an exec file and loading that. For example, if
RK> load-all.scm contains


>> (config)
>> (load "my-packages.scm")
>> (load "other-packets.scm")

RK> then
>> ,exec ,load load-all.scm
RK> will load both package files. I don't know how you would load a file
RK> into the exec package from a Scsh script.

The only way would be to make the underlying package USUAL-COMMANDS
the currrent package via "-m usual-commands" before loading the file,
but the CONFIG package doesn't seem to know about
USUAL-COMMANDS. Maybe we should add an option to scsh to switch to the
command execution package...

--
Martin

0 new messages