Hi Tom,

> Sort of answering my own question, but I figure that you don't get
> much out of creating scheme modules directly, unless they can live
> entirely outside of the lilypond world. Generally it seems better to
> create shared libraries somewhere and include them with
> `--include/-I`.

At the Salzburg conference, Urs Liska and I discussed a framework for having 
modules that one could load independently, which would give a lot of benefits 
over the “include” mechanism. (There’s a bit of a stub in openLilyLib, I 
think…? I’ll go take a look.)

Until something like that is fully functional, you are correct that \include is 
the best mechanism.

Cheers,
Kieren.

> 
> On Wed, Apr 3, 2024 at 2:21 PM Tom Brennan <tjb1...@gmail.com> wrote:
>> 
>> Hello
>> 
>> I'm going through documentation, refamiliarizing myself with Lilypond,
>> and trying to define a process for daily work that I like. One thing
>> I'm pretty sure I'll want is to create a shared library that will live
>> in its own repository. Perhaps more than one.
>> 
>> Looking at [this
>> documentation](https://lilypond.org/doc/v2.24/Documentation/notation/including-lilypond-files),
>> what I think makes sense is to bundle the `*.ly` files into a guile
>> module like `lib.scm`, using something like `ly:parse-init` to import
>> `lib.ly` which would `\include` all the other `*.ly` files, sort of
>> like the way it's done in `lily.scm` for `declarations-init.ly`. And
>> then I would import the guile module that would bootstrap everything
>> like `#(use-modules (special module))` in a particular project.
>> Assuming the guile module makes it into the %load-path.
>> 
>> There's probably a simpler way to do this and I'm just overthinking
>> it. What do other people like doing for shared ly libraries?
>> 
>> Thanks
>> Tom

______________________________________________

My work day may look different than your work day. Please do not feel obligated 
to read or respond to this email outside of your normal working hours.


Reply via email to