You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue #40 talked about making the lyp-provided include commands more "beautiful" but this is not really the problem with lyp-provided include commands. The problems with the current implementation are:
\pinclude is not differentiated enough from \include.
What does the "p" stand for? package?
In properly structured modular notation projects, files will normally be included only once. So including once should be the rule and not the exception.
the lyp-provided Lilypond commands (i.e. \pinclude etc) should be namespaced. It should be obvious that they come from lyp.
the conditional includes are actually not that useful, and they don't really get used that often. They might be useful when doing "polyfills" in order to support older versions of Lilypond
There's no conventional way to include a whole directory, or multiple files using a filename pattern.
So, we change the user-facing lyp interface as follows:
Rename the commands:
\pinclude becomes lyp-load
\pincludeOnce becomes lyp-include
\require becomes lyp-require
all old commands are deprecated, that is, display a warning
conditional include commands are not given new names, they're just deprecated
Make lyp-load and lyp-include more useful:
accept multiple arguments (for loading multiple files): \lyp-include tree templates music
accept directory references (for loading all files in a directory): \lyp-include utils
accept file references without extension, look for .ly or .ily files. If both exist, throw an error, otherwise load the existing one, if none exist, throw an error
The text was updated successfully, but these errors were encountered:
- Deprecate `\require`, `\pinclude` et al commands. They still work, but
will produce a warning when verbose option is used.
- Introduce new commands to replace the old commands:
- `lyp-require`: load a package
- `lyp-load`: load a file
- `lyp-include`: load a file only once
- Richer, easier to use `lyp-include` commands accept:
- directory for loading all files in directory: `\lyp-include utils`
- filename pattern with wildcard: `\lyp-include "lib/*.ly"`
- multiple file references: `\lyp-include #'(stave1 stave2)`
- Cleanup and refactor scheme definitions.
Issue #40 talked about making the lyp-provided include commands more "beautiful" but this is not really the problem with lyp-provided include commands. The problems with the current implementation are:
\pinclude
is not differentiated enough from\include
.\pinclude
etc) should be namespaced. It should be obvious that they come from lyp.So, we change the user-facing lyp interface as follows:
\pinclude
becomeslyp-load
\pincludeOnce
becomeslyp-include
\require
becomeslyp-require
lyp-load
andlyp-include
more useful:\lyp-include tree templates music
\lyp-include utils
\lyp-include utils/*
The text was updated successfully, but these errors were encountered: