[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Getting to grips with ly:parser-include-string
From: |
Urs Liska |
Subject: |
Getting to grips with ly:parser-include-string |
Date: |
Tue, 03 Mar 2015 15:34:12 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 |
Hi all,
I'm feeling more and more stupid by the minute, so I desperately hope to
get some help and enlightenment here.
I have a function that basically includes a LilyPond file, and it does
so quite well.
This is the working version of the file:
https://github.com/openlilylib/openlilylib/blob/master/ly/_internal/module-handling.ily
However, I started to rewrite the file (for some extensibility
considerations), and now it doesn't work anymore :-(
Here's the work-in-progress file:
https://github.com/openlilylib/openlilylib/blob/oll/module-handling/ly/_internal/module-handling.ily
(To test:
- get the latest version from openLilyLib
- ensure you (also) have the ly directory in the include path
- open any .ly files in any 'usage-examples' directory below 'ly'
- compile them while on the master or while on the oll/module-handling
branch
)
The file is still included (which can be seen from the diverse debug
messages), but - somewhat different with the various main files - it
seems definitions in the included files are either ignored or cause errors.
I assume it is somehow related to some scoping issue, or that the
definitions in the included file somehow don't find their way in the
actually used parser. But then I don't see where the _significant_
difference is between the two file versions.. Why does the older version
work, after all?
The change in the actual include code is based on this discussion:
https://lists.gnu.org/archive/html/lilypond-user/2012-01/msg00061.html
but I'm quite sure this doesn't have any negative impact on my problem.
Any advice would be _greatly_ appreciated.
Urs
- Getting to grips with ly:parser-include-string,
Urs Liska <=