[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Edition Engraver regex/wildcard bug
From: |
Jan-Peter Voigt |
Subject: |
Re: Edition Engraver regex/wildcard bug |
Date: |
Fri, 26 Oct 2018 07:57:31 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 |
Hi Mark,
thank you for bringing this up! Until now I wasn't aware of this issue,
but in fact it is one.
And I have an idea where the problem is buried.
For now I opened an issue:
https://github.com/openlilylib/edition-engraver/issues/26
Hope to solve it soon!
Jan-Peter
Am 25.10.18 um 21:28 schrieb Mark Knoop:
> Apologies if this is a known issue, but I think I've found a bug in the
> regex/wildcard handling of edition engraver paths.
>
> It seems that mixing editionMods with normal paths together with those formed
> with wildcards and/or regular expressions causes the wildcard/regex
> editionMods to break. This is using code adapted from
> usage-examples/development-3.ly.
>
> A workaround is of course to simply use wildcards or regexes in all
> editionMods, but this seems arcane.
>
> %%%
> \version "2.19.82"
> \include "oll-core/package.ily"
> \loadPackage edition-engraver
> \consistToContexts #edition-engraver Score.Staff.Voice.Lyrics
> \addEdition test
>
> % { comment this block for green noteheads
> \editionMod test 1 0/4 la.Voice \once \override NoteHead.color = #red
> \editionMod test 2 0/4 le.Voice \once \override NoteHead.color = #blue
> %}
> \editionMod test 3 0/4 "{l*}".Voice \once \override NoteHead.color = #green
> \editionMod test 4 0/4 "/l.*/".Voice \once \override NoteHead.color = #green
>
> %{ workaround using regular expressions
> \editionMod test 1 1/4 "/^la$/".Voice \once \override NoteHead.color = #red
> \editionMod test 2 1/4 "/^le$/".Voice \once \override NoteHead.color = #blue
> %}
> %{ workaround using wildcards
> \editionMod test 1 2/4 "{la}".Voice \once \override NoteHead.color = #red
> \editionMod test 2 2/4 "{le}".Voice \once \override NoteHead.color = #blue
> %}
>
> <<
> \new Staff \with {
> \editionID le
> } \repeat unfold 24 e''4
> \new Staff \with {
> \editionID la
> } \repeat unfold 24 e''4
> %%%
>