Thomas Morley <[email protected]> writes:
> 2014-07-30 14:39 GMT+02:00 David Kastrup <[email protected]>:
>> Thomas Morley <[email protected]> writes:
>>
>>> Hi David,
>>>
>>> may I ask you to have a look?
>>>
>>> There's an optional argument failing with a single use-case and I've
>>> no clue why.
>>> Did I something wrong?
>>>
>>> (You may want to skip most of the mail and go to the REMARK)
>>
>> Optional argument declaration syntax conflicts with the use of anonymous
>> lambda functions. Actually, I would expect the main problem to be the
>> other way round: a lambda function used as a regular predicate gets
>> confused with an actual argument. But since anonymous functions don't
>> work with mandatory arguments, using them for optional arguments is not
>> likely a good idea either.
>>
>> At any rate, the example is far too complex to sensibly "have a look".
>> Can you reduce this to something smaller?
>
> Here a simplified code.
> It fails if the markup is entered directly, like \markup "X"
> Entering it in scheme-syntax or as a predefined markup works.
> Seems to make no difference whether the function uses (lambda (x) ...)
> or an predefined predicate.
Actually, it's easier to see the problem if you _don't_ outcomment the
problematic case.
> % Examples with not specified alist-argument
>
> % This fails for unknown reason!
> \relative c' {
> %{
> \addMarkupToRehearsalMark
> \markup "X"
> \mark \default
> %}
> d1
> }
Upgrade.
commit 99cdab1574d096dc4906e3f5d2c4f79cbc409761
Author: David Kastrup <[email protected]>
Date: Thu Jul 3 10:22:37 2014 +0200
Issue 3986: \displayScheme broken
\displayScheme \markup \null
failed because a markup following an omitted optional argument (here the
optional output port) was backed up erroneously with the token type
LYRIC_ELEMENT only to be used in lyrics mode.
The optional argument was introduced with issue 2067 in version 2.19.0.
The actual underlying parser error triggered by this, however, is quite
older and originates from
commit d4694123961690b173377b3c3a199d5a24c66a9d
Author: David Kastrup <[email protected]>
Date: Thu Nov 1 15:16:52 2012 +0100
parser/lexer: eliminate LYRIC_MARKUP as a token separate from MARKUP
(2996/2)
in version 2.17.9.
Should work as of 2.19.10.
Later...
--
David Kastrup
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user