bug-lilypond
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lyricmode regression


From: David Kastrup
Subject: Re: lyricmode regression
Date: Sun, 22 Sep 2013 18:12:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Vik Reykja <address@hidden> writes:

> Upgrading from 2.14.2 (Ubuntu 12.10) to 2.17.27 (git head) in order to try
> something, I noticed my music was broken.  Here is a minimal example
> illustrating the problem:
>
> \new Lyrics \lyricmode { \skip 1.*3 }
>
> which now gives
>
> /home/vik/minimal.ly:1:34: error: not a duration: 3
> \new Lyrics \lyricmode { \skip 1.*
>                                   3 }
>
> It's a little bit tricky because the bug only manifests itself under
> certain conditions:
> * There must be no spaces (\skip 1. * 3 works)
> * The duration must be dotted (\skip 1*3 works)
> * The multiplier must not be a duration (\skip 1.*2 works)
>
> I have not tested that those last two do what they should, only that they
> compile.
>
> This was broken in commit 38a4081efa4a8ee2f5da780ca0ed2991627afc46 which
> handles this issue: https://codereview.appspot.com/6594047
>
> For me, this is clearly a backwards incompatibility.

Well, the commit message is

commit 38a4081efa4a8ee2f5da780ca0ed2991627afc46
Author: David Kastrup <address@hidden>
Date:   Sun Sep 30 02:21:00 2012 +0200

    Issue 2869: Regularize lyrics lexer mode
    
    That makes lyrics mode rather similar to markup mode regarding how
    words are formed.  {} are never considered part of words unless
    enclosed in quotes.  Unquoted words do not contain whitespace, braces,
    quotes, backslashes, numbers or Scheme expressions.  In addition, they
    cannot start with * . = and | since that would mess with duration,
    assignment and barcheck syntax.  This removes some remaining
    TeX-oriented cruft in the lexer.  The set of word-non-starters might
    need revisiting, but at least the regtests seem to pass.

so it is clear that we are talking about an intentional incompatibility
here.  It's an incompatibility that's involved enough that its probably
utopic to provide a working convert-ly rule.

That being said, the commit message clearly states:

    Unquoted words do not contain whitespace, braces,
    quotes, backslashes, numbers or Scheme expressions.  In addition, they
    cannot start with * . = and | since that would mess with duration,
    assignment and barcheck syntax.

Now it appears that the behavior shown here is not compatible with that
description.  While the change _includes_ an intentional backward
compatibility, \skip 1.*3 should still have worked I think.

The lexer apparently thinks this to be the same as

\skip 1 ".*"3

I'll take a look and see whether I can find where LilyPond veers off-course.

-- 
David Kastrup




reply via email to

[Prev in Thread] Current Thread [Next in Thread]