[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Lilypond-auto] Issue 3098 in lilypond: Parser diagnostics failing t
From: |
lilypond |
Subject: |
Re: [Lilypond-auto] Issue 3098 in lilypond: Parser diagnostics failing to recognise \on-the-fly arguments as procedure type |
Date: |
Wed, 17 Apr 2013 05:26:05 +0000 |
Comment #8 on issue 3098 by address@hidden: Parser diagnostics failing to
recognise \on-the-fly arguments as procedure type
http://code.google.com/p/lilypond/issues/detail?id=3098
The problem is that \on-the-fly typically refers to procedures that are
only defined in the header module. Basically, those procedures should
rather be markup commands of their own, but my guess is that the markup
command definition mechanism does not work well across modules.
Now this works fine writing \header { ... \on-the-fly #first-page ... }.
If you write #{ ... \header { ... \on-the-fly #first-page ... } #} or
similar, however, the #first-page is evaluated in "lexical closure" of #{
#} : all variables visible (and invisible) to #{ #} itself are visible (and
invisible) to the inner # as well. So it does not look for first-page in
the header module, but rather in whatever module #{ #} appeared in.
You can write #(module-ref (current-module) 'first-page) which explicitly
moves the lookup to the module active at the time of call, or you can write
\first-page since \x-x-x is now consistently accepted by the parser, and
\... is not evaluated in lexical closure.
Now find a good place to explain that...
My own take on this is that \on-the-fly is an insane interface. This
should rather be a markup command \on-first-page and similar of its own,
just defined in the header module. I have not tried it, but it is at least
probable that it would fail with (markup #:on-first-page under certain
circumstances because of module switch issues.
However, since #{ \markup \on-first-page ... should continue to work, one
might just document this as a restriction. Changing all that is a big
issue including convert-ly rules. Right now, we have a Documentation issue.
The problem can be skirted by using \on-the-fly \first-page as the
recommended syntax. It just makes it harder to explain what the
\on-the-fly is supposed to be good for in the first place.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
- Re: [Lilypond-auto] Issue 3098 in lilypond: Parser diagnostics failing to recognise \on-the-fly arguments as procedure type, lilypond, 2013/04/16
- Message not available
- Re: [Lilypond-auto] Issue 3098 in lilypond: Parser diagnostics failing to recognise \on-the-fly arguments as procedure type,
lilypond <=
- Message not available
- Re: [Lilypond-auto] Issue 3098 in lilypond: Parser diagnostics failing to recognise \on-the-fly arguments as procedure type, lilypond, 2013/04/17
- Message not available
- Re: [Lilypond-auto] Issue 3098 in lilypond: Parser diagnostics failing to recognise \on-the-fly arguments as procedure type, lilypond, 2013/04/18
- Message not available
- Re: [Lilypond-auto] Issue 3098 in lilypond: Parser diagnostics failing to recognise \on-the-fly arguments as procedure type, lilypond, 2013/04/18
- Message not available
- Re: [Lilypond-auto] Issue 3098 in lilypond: Parser diagnostics failing to recognise \on-the-fly arguments as procedure type, lilypond, 2013/04/18
- Message not available
- Re: [Lilypond-auto] Issue 3098 in lilypond: Parser diagnostics failing to recognise \on-the-fly arguments as procedure type, lilypond, 2013/04/18
- Message not available
- Re: [Lilypond-auto] Issue 3098 in lilypond: Parser diagnostics failing to recognise \on-the-fly arguments as procedure type, lilypond, 2013/04/19
- Message not available
- Re: [Lilypond-auto] Issue 3098 in lilypond: Parser diagnostics failing to recognise \on-the-fly arguments as procedure type, lilypond, 2013/04/19
- Message not available
- Re: [Lilypond-auto] Issue 3098 in lilypond: Parser diagnostics failing to recognise \on-the-fly arguments as procedure type, lilypond, 2013/04/19
- Message not available
- Re: [Lilypond-auto] Issue 3098 in lilypond: Parser diagnostics failing to recognise \on-the-fly arguments as procedure type, lilypond, 2013/04/20
- Message not available
- Re: [Lilypond-auto] Issue 3098 in lilypond: Parser diagnostics failing to recognise \on-the-fly arguments as procedure type, lilypond, 2013/04/23