Re: Edition Engraver regex/wildcard bug

2018-10-26 Thread Jan-Peter Voigt
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
> %%%
>


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Edition Engraver regex/wildcard bug

2018-10-25 Thread 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
>>
%%%

-- 
Mark Knoop

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user