Menu

#2883 Patch: Make arguments like Context.GrobName accessible as symbol lists

Verified
nobody
Enhancement
2012-11-04
2012-10-08
Anonymous
No

Originally created by: *anonymous

Originally created by: dak@gnu.org
Originally owned by: dak@gnu.org

Make arguments like Context.GrobName accessible as symbol lists

This is a rather awkward case for a Rietveld review since it consists
of 14 separate commits (listed below).  The principal target was to
allow things like \omit Staff.TimeSignature to work as expected.  The
same treatment has been given to \alterBroken, \hide,
\overrideProperty and \shape, as well as to \accidentalStyle.

For improving backward compatibility, dotted _LilyPond_ strings like
"Staff.TimeSignature" are also accepted in lieu of symbol list.  A
rather surprising corollary is that

  \override Lyrics.LyricText #'font-shape = #'italic

now works without needing to offset . with spaces.  While
Lyrics.LyricText is indeed run into a single LilyPond string in this
case, \override will happily pick that string apart again.

LilyPond strings are also acceptable for symbol? predicates.  The
conversions will only be attempted if the string is not accepted by a
predicate in the form of a string.

Run scripts/auxiliar/update-with-convert-ly.sh

convert-ly rule for \alterbroken, \accidentalStyle, \overrideProperty

This is required since not all of the old call forms can be
automatically recognized anymore, in particular not when the
Scheme-only form #"Context.GrobName" is being used.

Change \accidentalStyle to get a symbol list as argument

Make \alterBroken, \hide, \omit, \overrideProperty, \shape take unquoted Context.Grob specs

Add symbol-list-or-music? predicate

Allow the string "xxx.yyy" to parse as a symbol list

Allow property and grob paths to be constructed from strings

Add symbol-list? predicate

Allow LilyPond strings to stand in for symbols when parsing

Let accidentalStyle detect its optional context argument by looking at its letter case

Factor SCM_IDENTIFIER out from embedded_scm_arg*

parser.yy: make is_regular_identifier match the lexer definition

parser.yy: FRACTION does not require a closed expression before it

Assignments can't contain literal lyric music (wrong lexer mode)

http://codereview.appspot.com/6635050

Discussion

1 2 > >> (Page 1 of 2)
  • Google Importer

    Google Importer - 2012-10-08

    Originally posted by: pkx1...@gmail.com

    Patchy the autobot says: passes tests.

    Labels: -Patch-new Patch-review

     
  • Google Importer

    Google Importer - 2012-10-09

    Originally posted by: dak@gnu.org

    Make arguments like Context.GrobName accessible as symbol lists

    This is a rather awkward case for a Rietveld review since it consists
    of 14 separate commits (listed below).  The principal target was to
    allow things like \omit Staff.TimeSignature to work as expected.  The
    same treatment has been given to \alterBroken, \hide,
    \overrideProperty and \shape, as well as to \accidentalStyle.

    For improving backward compatibility, dotted _LilyPond_ strings like
    "Staff.TimeSignature" are also accepted in lieu of symbol list.  A
    rather surprising corollary is that

      \override Lyrics.LyricText #'font-shape = #'italic

    now works without needing to offset . with spaces.  While
    Lyrics.LyricText is indeed run into a single LilyPond string in this
    case, \override will happily pick that string apart again.

    LilyPond strings are also acceptable for symbol? predicates.  The
    conversions will only be attempted if the string is not accepted by a
    predicate in the form of a string.

    Run scripts/auxiliar/update-with-convert-ly.sh

    convert-ly rule for \alterbroken, \accidentalStyle, \overrideProperty

    This is required since not all of the old call forms can be
    automatically recognized anymore, in particular not when the
    Scheme-only form #"Context.GrobName" is being used.

    Change \accidentalStyle to get a symbol list as argument

    Make \alterBroken, \hide, \omit, \overrideProperty, \shape take unquoted Context.Grob specs

    Add symbol-list-or-music? predicate

    Allow the string "xxx.yyy" to parse as a symbol list

    Allow property and grob paths to be constructed from strings

    Add symbol-list? predicate

    Allow LilyPond strings to stand in for symbols when parsing

    Let accidentalStyle detect its optional context argument by looking at its letter case

    Factor SCM_IDENTIFIER out from embedded_scm_arg*

    parser.yy: make is_regular_identifier match the lexer definition

    parser.yy: FRACTION does not require a closed expression before it

    Assignments can't contain literal lyric music (wrong lexer mode)

    http://codereview.appspot.com/6635050

    Labels: -Patch-review Patch-new

     
  • Google Importer

    Google Importer - 2012-10-09

    Originally posted by: dak@gnu.org

    (No comment was entered for this change.)

    Owner: dak@gnu.org
    Status: Started

     
  • Google Importer

    Google Importer - 2012-10-09

    Originally posted by: dak@gnu.org

    Patchy the autobot says: passes tests.

    Labels: -Patch-new Patch-review

     
  • Google Importer

    Google Importer - 2012-10-10

    Originally posted by: dak@gnu.org

    Make arguments like Context.GrobName accessible as symbol lists

    This is a rather awkward case for a Rietveld review since it consists
    of 14 separate commits (listed below).  The principal target was to
    allow things like \omit Staff.TimeSignature to work as expected.  The
    same treatment has been given to \alterBroken, \hide,
    \overrideProperty and \shape, as well as to \accidentalStyle.

    For improving backward compatibility, dotted _LilyPond_ strings like
    "Staff.TimeSignature" are also accepted in lieu of symbol list.  A
    rather surprising corollary is that

      \override Lyrics.LyricText #'font-shape = #'italic

    now works without needing to offset . with spaces.  While
    Lyrics.LyricText is indeed run into a single LilyPond string in this
    case, \override will happily pick that string apart again.

    LilyPond strings are also acceptable for symbol? predicates.  The
    conversions will only be attempted if the string is not accepted by a
    predicate in the form of a string.

    Run scripts/auxiliar/update-with-convert-ly.sh

    convert-ly rule for \alterbroken, \accidentalStyle, \overrideProperty

    This is required since not all of the old call forms can be
    automatically recognized anymore, in particular not when the
    Scheme-only form #"Context.GrobName" is being used.

    Change \accidentalStyle to get a symbol list as argument

    Make \alterBroken, \hide, \omit, \overrideProperty, \shape take unquoted Context.Grob specs

    Add symbol-list-or-music? predicate

    Allow the string "xxx.yyy" to parse as a symbol list

    Allow property and grob paths to be constructed from strings

    Add symbol-list? predicate

    Allow LilyPond strings to stand in for symbols when parsing

    Let accidentalStyle detect its optional context argument by looking at its letter case

    Factor SCM_IDENTIFIER out from embedded_scm_arg*

    parser.yy: make is_regular_identifier match the lexer definition

    parser.yy: FRACTION does not require a closed expression before it

    Assignments can't contain literal lyric music (wrong lexer mode)

    http://codereview.appspot.com/6635050

    Labels: -Patch-review Patch-new

     
  • Google Importer

    Google Importer - 2012-10-10

    Originally posted by: dak@gnu.org

    Huh.  At least my version of Patchy is not content with downloading this monster patch.  Rietveld states "Patch set is too large to download".  Huh.  This is getting ugly.

    The question is: how do we proceed on this issue?  What I would propose is that I move forward on everything except the optional conversion of all \override/\revert calls.  The question is what to do with \tweak Accidental #'color ...  Convert it to
    \tweak Accidental . #'color in order to keep maximal similarity to overrides?  Convert to Accidental.color after all?  Keep \tweak entirely unchanged (meaning that even \tweak color #red would not work, unlike what overrides can do)?

     
  • Google Importer

    Google Importer - 2012-10-10

    Originally posted by: dak@gnu.org

    Turns out that building the documentation fails.  That one is actually rather tricky:

        c-\footnote #'(1 . 1) "Tenuto"

    Here "Tenuto" is converted into #'Tenuto and interpreted as a grob name.  Ugh.  That warrants rethinking the approach.  Should only _unquoted_ strings be eligible as symbols?  Before starting to distinguish quoted and unquoted strings, revisiting the footnote interface seems warranted.

     
  • Google Importer

    Google Importer - 2012-10-10

    Originally posted by: dak@gnu.org

    It turns out that changing the footnote user interface is not just feasible, but actually makes sense.  Currently it has the form
    \footnote [footnotemark] offset [Grobname] footnotetext [music]
    This can be recast as
    \footnote [footnotemark] offset footnotetext music-or-grobname
    or alternatively
    \footnote footnotetext [footnotemark] offset music-or-grobname

    The optional footnotemark has to come before the offset since that is the only thing definitely distinguishable from a string.  I suppose the first form makes more sense since the footnote mark will appear before the text anyway.

    In the rare case that one needs _both_ a grob specification as well as tweaking only particular music, one can employ
    \single \footnote footnotetext [footnotemark] offset grobname music

    The question which context should carry the footnote engraver can easily be answered: one uses a score level engraver, and grobname can really be Context.grobname so that one can make sure that only grobs at the desired context are caught.  That will imply that one needs to state Staff.TimeSignature as grob name rather than just TimeSignature, consistent with other commands like \omit.

    Yes, another footnote interface change.  But one that simplifies things as now the thing to tweak comes always last, and behavior gets more in line with that of other commands.  I'll start working on that tomorrow.  It is, unfortunately, pretty much a prerequisite to get this change done with before doing the string/symbol autoconversion thing.

    Labels: -Patch-new Patch-waiting

     
  • Google Importer

    Google Importer - 2012-10-11

    Originally posted by: dak@gnu.org

    Make arguments like Context.GrobName accessible as symbol lists

    This is a rather awkward case for a Rietveld review since it consists
    of 14 separate commits (listed below).  The principal target was to
    allow things like \omit Staff.TimeSignature to work as expected.  The
    same treatment has been given to \alterBroken, \hide,
    \overrideProperty and \shape, as well as to \accidentalStyle.

    For improving backward compatibility, dotted _LilyPond_ strings like
    "Staff.TimeSignature" are also accepted in lieu of symbol list.  A
    rather surprising corollary is that

      \override Lyrics.LyricText #'font-shape = #'italic

    now works without needing to offset . with spaces.  While
    Lyrics.LyricText is indeed run into a single LilyPond string in this
    case, \override will happily pick that string apart again.

    LilyPond strings are also acceptable for symbol? predicates.  The
    conversions will only be attempted if the string is not accepted by a
    predicate in the form of a string.

    Run scripts/auxiliar/update-with-convert-ly.sh

    convert-ly rule for \alterbroken, \accidentalStyle, \overrideProperty

    This is required since not all of the old call forms can be
    automatically recognized anymore, in particular not when the
    Scheme-only form #"Context.GrobName" is being used.

    Change \accidentalStyle to get a symbol list as argument

    Make \alterBroken, \hide, \omit, \overrideProperty, \shape take unquoted Context.Grob specs

    Add symbol-list-or-music? predicate

    Allow the string "xxx.yyy" to parse as a symbol list

    Allow property and grob paths to be constructed from strings

    Add symbol-list? predicate

    Allow LilyPond strings to stand in for symbols when parsing

    Let accidentalStyle detect its optional context argument by looking at its letter case

    Factor SCM_IDENTIFIER out from embedded_scm_arg*

    parser.yy: make is_regular_identifier match the lexer definition

    parser.yy: FRACTION does not require a closed expression before it

    Assignments can't contain literal lyric music (wrong lexer mode)

    http://codereview.appspot.com/6635050

    Labels: -Patch-waiting Patch-new

     
  • Google Importer

    Google Importer - 2012-10-11

    Originally posted by: dak@gnu.org

    This is the non-invasive version of the full Issue 2883 patch.

    The sole difference is a different python/convertrules.py file, and a
    consequently much more confined conversion as the last commit.  It
    does not show the full potential of the approach, obviously.

    Run scripts/auxiliar/update-with-convert-ly.sh

    Change \footnote user interface and behavior to match \hide/\omit etc.

    This does the following changes to the footnote user interface for
    footnotes in music rather than in markups:

    Time-based footnote syntax:

        \footnote [mark] offset #'Grob text \default
    ->  \footnote [mark] offset text [ Context. ] Grob

    Like with any override, you now need to specify Context if it is not
    supposed to be Bottom, like with Staff.TimeSignature.

    Music-based footnote syntax:

        \footnote [mark] offset text music
    ->  stays identical

        \footnote [mark] offset #'Grob text music
    ->  \single\footnote [mark] offset text Grob music

    Specifying Context.Grob is possible, but Context gets ignored.

    Let \overrideProperty accept nested properties

    Change \tweak syntax to symbol syntax

    Instead of \tweak #'color, \tweak color is used.
    Instead of \tweak Accidental #'color, \tweak Accidental.color is used.

    convert-ly rule for \alterbroken, \accidentalStyle, \overrideProperty

    This is required since not all of the old call forms can be
    automatically recognized anymore, in particular not when the
    Scheme-only form #"Context.GrobName" is being used.

    Change \accidentalStyle to get a symbol list as argument

    This changes the syntax of \accidentalStyle to accept specs like
    Voice.piano-cautionary .

    Make \alterBroken, \hide, \omit, \overrideProperty, \shape take unquoted Context.Grob specs

    This changes the syntax of the named commands to accept
    Voice.Accidental and similar specifications without any quoting.

    Replace the rather fuzzy list-or-symbol? with symbol-list-or-symbol?

    list-or-symbol? was previously used in the meaning of
    symbol-list-or-symbol? only, and there is no point in not checking the
    list members for actually being symbols, in order to avoid ugly
    surprises later.

    Add symbol-list-or-music? predicate

    This is of interest for commands like \hide which accept either music
    (to see an override) or a grob specification like Accidental or
    Voice.Accidental.

    Allow the string "xxx.yyy" to parse as a symbol list

    This changes the parser to let xxx.yyy be a valid way of specifying a
    function argument required to be #'(xxx yyy).

    Allow property and grob paths to be constructed from strings

    Add symbol-list? predicate

    Allow LilyPond strings to stand in for symbols when parsing

    Bare words and quote-enclosed words meeting word syntax can now be
    used when a function argument expects to see a symbol.

    Let \accidentalStyle detect its optional context argument by looking at its letter case

    This is a fishy stopgap measure to let \accidentalStyle able to
    distinguish #'Voice "default" from "default" alone while we generate
    symbols from from #'Voice as well as "default".  If the first letter
    is uppercase, the symbol is considered to be a context specification.

    Factor SCM_IDENTIFIER out from embedded_scm_arg*

    SCM_IDENTIFIER indicates "active Scheme" introduced with $ that is
    subject to copying and reinterpretation.  While the parser had its own
    *_IDENTIFIER category for everything interpreted specially, the
    fallback SCM_IDENTIFIER itself never needed special or different
    treatment from material generated with # (SCM_TOKEN).  As the various
    *_IDENTIFIER types are faded out, this is changing.  As a consequence,
    SCM_IDENTIFIER no longer shares the non-terminals with other
    Scheme-type definitions.

    parser.yy: make is_regular_identifier match the lexer definition

    is_regular_identifier checks now for valid identifiers employing the
    definition of words that is also used in the lexer: letters, and
    characters outside of the ASCII range, interspersed with single - and
    _ characters.

    parser.yy: FRACTION does not require a closed expression before it

    FRACTION items can't trail any other valid expression without
    separating '*' or similar, so the argument list before them does not
    need to be of "closed" type.

    Assignments can't contain literal lyric music (wrong lexer mode)

    Since assignments can't happen in lyrics mode (only in INITIAL mode or
    the initial music mode), there is no point in supporting
    non-mode-switching items on the right side of assignments that can
    only occur in lyrics mode.

    http://codereview.appspot.com/6651053

     
  • Google Importer

    Google Importer - 2012-10-11

    Originally posted by: dak@gnu.org

    P.S.: I know that this "minimal" version still fails in the outdated German documentation due to illegal footnote syntax.  But test-patchy should be fine with it.

     
  • Google Importer

    Google Importer - 2012-10-11

    Originally posted by: pkx1...@gmail.com

    Patchy the autobot says: passes tests.

    Labels: -Patch-new Patch-review

     
  • Google Importer

    Google Importer - 2012-10-12

    Originally posted by: dak@gnu.org

    Ok, getting this patch/branch integrated successfully will require quite a bit of heavy lifting, and I am not really able to do all of that myself.

    First we need to agree on a solution for the function interfaces that currently depend on the distinction string/symbol for recognizing optional arguments.

    Issue #1 is \tweak.  We currently have two forms of tweak, namely

    \tweak #'color #red cis            (tweak of direct grob)
    \tweak Accidental #'color #red cis (tweak of particular grob)

    The current form of the patch proposes translation into

    \tweak color #red cis
    \tweak Accidental.color #red cis

    It has been pointed out that the latter syntax is confusingly different from \override Accidental color = #red (no dot allowed!).

    The short form of \tweak is rather prevalent, so we don't want to change that.  Alternatives for the second form might be

    \on Accidental \tweak color #red cis
    \tweakOn Accidental color #red cis
    \single \override Accidental color = #red cis

    The last line already works but is cumbersome and sufficiently different from \tweak that it seems inconvenient.  \on as a separate command has its charm for working on tweaks not just generated by the \tweak command, like

    \on Accidental \hide cis

    as an alternative wording for

    \single \hide Accidental cis

    Huh.  The grammar of \on does seem a bit strange in usage.  Better proposals?

    \only Accidental \hide cis

    maybe?  Or

    \grob Accidental \hide cis

    Similarly, the yet again new \footnote interface has no really fabulous way to place the grob spec.  The proposal used here has a few advantages (most notably never needing \default, not being able to express the invalid combination of override-like behavior without grob specification, and fitting in a pattern with \hide/\omit), but still does not really have people much enthused about it, mostly due to the trialing position of the Grob name when using it in override-like manner.

    The positive thing is that \footnote now really, really, really is just a \once\override or \tweak, so using things like \grob or \single on it is feasible, and it works exactly in those circumstances as the other commands in that vein do.

    Those are the interface design problems.

    There is also a lot of documentation work pending, starting with bringing the German documentation at least into a state where convert-ly generates valid code, or just skip this stage and start from the new English version.  Which also needs to be written, or at least retouched.

    Then there needs to be an introductory section on LilyPond's relation between input syntax and Scheme data structures.  At least the first iteration will probably be my lot.  Then one has to look through the whole \override/\revert etc section, assuming that we go for the variant without #' which seems like something not only I consider desirable.

    The documentation work does not to complete before committing, but it will still be significant.  And at least the interface changes of \tweak and \footnote should be something where we are reasonably sure that it's the best we can do.

    Cc: david.na...@gmail.com thomasmo...@gmail.com tdanielsmusic pkx1...@gmail.com

     
  • Google Importer

    Google Importer - 2012-10-12

    Originally posted by: tdanielsmusic

    David wrote:

    > \on Accidental \hide cis
    > Huh.  The grammar of \on does seem a bit strange in usage. 
    > Better proposals?

    Maybe
    \onGrob Accidental \tweak color #red cis
    \onGrob Accidental \hide cis
    or
    \forGrob Accidental \tweak color #red cis
    \forGrob Accidental \hide cis
    or
    \tweakGrob Accidental color #red cis

    These forms offer a clue what should follow.
    I'd be happy with any of these, but with a preference for the second.

    Trevor

     
  • Google Importer

    Google Importer - 2012-10-16

    Originally posted by: ColinPKC...@gmail.com

    @David K: is this ready for countdown? I'm a bit confused by all the discussion on Rietveld, the devel list and here.

     
  • Google Importer

    Google Importer - 2012-10-16

    Originally posted by: dak@gnu.org

    No, it isn't.  People have expressed their unwillingness to remember entering grob path and property path separately as Voice.Accidental color (never mind that this is what they have to do right now anyway), so I am redoing everything again.  As you can see with the trashing of issue 2897 (which has taken an inordinate amount of time and energy, also for working on _this_ issue, before I finally dropped it), a mere large improvement over the status quo is nothing that people are willing to accept from me.  This patch does not _need_ work, but I am reworking it nevertheless and so committing it would wreak havoc with the complete rework of the commit series that is necessary for that.

     
  • Google Importer

    Google Importer - 2012-10-17

    Originally posted by: dak@gnu.org

    Ok, Rietveld just sucks.  I restarted the large upload for <URL:http://codereview.appspot.com/6635050> about a dozen times since it bombed out in the middle with urllib2.HTTPError: HTTP Error 500: Internal Server Error
    .  It did not complete the last time either, but it should cover most areas anyway.  This is not useful for downloading anyway, but it is available as origin/dev/syntax on the git repository.  Now that's the _large_ version including converting \override and \revert to complete new syntax, this time with dot in the middle as well.

    I'll prepare and upload the small version which only converts the necessary stuff and leaves the rest of the syntax untouched in convert-ly soonish.

     
  • Google Importer

    Google Importer - 2012-10-17

    Originally posted by: dak@gnu.org

    This is the non-invasive version of the full Issue 2883 patch.

    The sole difference is a different python/convertrules.py file, and a
    consequently much more confined conversion as the last commit.  It
    does not show the full potential of the approach, obviously.

    Run scripts/auxiliar/update-with-convert-ly.sh

    Change \footnote user interface and behavior to match \hide/\omit etc.

    This does the following changes to the footnote user interface for
    footnotes in music rather than in markups:

    Time-based footnote syntax:

        \footnote [mark] offset #'Grob text \default
    ->  \footnote [mark] offset text [ Context. ] Grob

    Like with any override, you now need to specify Context if it is not
    supposed to be Bottom, like with Staff.TimeSignature.

    Music-based footnote syntax:

        \footnote [mark] offset text music
    ->  stays identical

        \footnote [mark] offset #'Grob text music
    ->  \single\footnote [mark] offset text Grob music

    Specifying Context.Grob is possible, but Context gets ignored.

    Let \overrideProperty accept nested properties

    Change \tweak syntax to symbol syntax

    Instead of \tweak #'color, \tweak color is used.
    Instead of \tweak Accidental #'color, \tweak Accidental.color is used.

    convert-ly rule for \alterbroken, \accidentalStyle, \overrideProperty

    This is required since not all of the old call forms can be
    automatically recognized anymore, in particular not when the
    Scheme-only form #"Context.GrobName" is being used.

    Change \accidentalStyle to get a symbol list as argument

    This changes the syntax of \accidentalStyle to accept specs like
    Voice.piano-cautionary .

    Make \alterBroken, \hide, \omit, \overrideProperty, \shape take unquoted Context.Grob specs

    This changes the syntax of the named commands to accept
    Voice.Accidental and similar specifications without any quoting.

    Replace the rather fuzzy list-or-symbol? with symbol-list-or-symbol?

    list-or-symbol? was previously used in the meaning of
    symbol-list-or-symbol? only, and there is no point in not checking the
    list members for actually being symbols, in order to avoid ugly
    surprises later.

    Add symbol-list-or-music? predicate

    This is of interest for commands like \hide which accept either music
    (to see an override) or a grob specification like Accidental or
    Voice.Accidental.

    Allow the string "xxx.yyy" to parse as a symbol list

    This changes the parser to let xxx.yyy be a valid way of specifying a
    function argument required to be #'(xxx yyy).

    Allow property and grob paths to be constructed from strings

    Add symbol-list? predicate

    Allow LilyPond strings to stand in for symbols when parsing

    Bare words and quote-enclosed words meeting word syntax can now be
    used when a function argument expects to see a symbol.

    Let \accidentalStyle detect its optional context argument by looking at its letter case

    This is a fishy stopgap measure to let \accidentalStyle able to
    distinguish #'Voice "default" from "default" alone while we generate
    symbols from from #'Voice as well as "default".  If the first letter
    is uppercase, the symbol is considered to be a context specification.

    Factor SCM_IDENTIFIER out from embedded_scm_arg*

    SCM_IDENTIFIER indicates "active Scheme" introduced with $ that is
    subject to copying and reinterpretation.  While the parser had its own
    *_IDENTIFIER category for everything interpreted specially, the
    fallback SCM_IDENTIFIER itself never needed special or different
    treatment from material generated with # (SCM_TOKEN).  As the various
    *_IDENTIFIER types are faded out, this is changing.  As a consequence,
    SCM_IDENTIFIER no longer shares the non-terminals with other
    Scheme-type definitions.

    parser.yy: make is_regular_identifier match the lexer definition

    is_regular_identifier checks now for valid identifiers employing the
    definition of words that is also used in the lexer: letters, and
    characters outside of the ASCII range, interspersed with single - and
    _ characters.

    parser.yy: FRACTION does not require a closed expression before it

    FRACTION items can't trail any other valid expression without
    separating '*' or similar, so the argument list before them does not
    need to be of "closed" type.

    Assignments can't contain literal lyric music (wrong lexer mode)

    Since assignments can't happen in lyrics mode (only in INITIAL mode or
    the initial music mode), there is no point in supporting
    non-mode-switching items on the right side of assignments that can
    only occur in lyrics mode.

    http://codereview.appspot.com/6651053

    Labels: -Patch-review Patch-new

     
  • Google Importer

    Google Importer - 2012-10-17

    Originally posted by: k-ohara5...@oco.net

    I suggest letting the documentation (and other convert-ly-ed files) continue with the old form
       \override Grob property = #value
    even if we accept
       \override Context.Grob = #value

    My reasons are (1) the simple forms of \tweak and \override with simple arguments without dots are by far the most common, and (2) the space helps me remember that in
       \override Context.Grob property.subproperty.detail = #value
    I will always need to tell LilyPond the Grob and the property, occasionally with dotted forms when I need to be more specific.

    It would be helpful to upload the functional changes only (http://codereview.appspot.com/6733044) and not the automated changes.  Reviewers would then need to run convert-ly on selected Documentation/ themselves. (Link in parentheses to hide it from patchy.)

     
  • Google Importer

    Google Importer - 2012-10-17

    Originally posted by: dak@gnu.org

    Patchy the autobot says: Significant loss of properties.  Lots of messages like
    +  \revert TabVoice.Stem
    +                        #'no-stem-extend
    +/tmp/build-lilypond-autobuild/out/share/lilypond/current/ly/property-init.ly:470:24: warning: Ignoring non-music expression

    Labels: -Patch-new Patch-needs_work

     
  • Google Importer

    Google Importer - 2012-10-18

    Originally posted by: dak@gnu.org

    Regarding comment #20: there is no point in accommodating a demanded "simplification" if it is not also exposed in the documentation.

    With regard to uploading only functional changes: the small version of the patch including _necessary_ conversions is required for getting useful feedback from Patchy.

    I am actually rather pissed that "make test" does not give any indication about gazillions of warnings.  Which genius considered it a good idea to squash all of them?  At one time we had them deliver errors.

    It would appear that by now our code base is delivering _lots_ of warnings because of the decision to not act on them and hide them.

     
  • Google Importer

    Google Importer - 2012-10-18

    Originally posted by: dak@gnu.org

    This is the non-invasive version of the full Issue 2883 patch.

    The sole difference is a different python/convertrules.py file, and a
    consequently much more confined conversion as the last commit.  It
    does not show the full potential of the approach, obviously.

    Run scripts/auxiliar/update-with-convert-ly.sh

    Change \footnote user interface and behavior to match \hide/\omit etc.

    This does the following changes to the footnote user interface for
    footnotes in music rather than in markups:

    Time-based footnote syntax:

        \footnote [mark] offset #'Grob text \default
    ->  \footnote [mark] offset text [ Context. ] Grob

    Like with any override, you now need to specify Context if it is not
    supposed to be Bottom, like with Staff.TimeSignature.

    Music-based footnote syntax:

        \footnote [mark] offset text music
    ->  stays identical

        \footnote [mark] offset #'Grob text music
    ->  \single\footnote [mark] offset text Grob music

    Specifying Context.Grob is possible, but Context gets ignored.

    Let \overrideProperty accept nested properties

    Change \tweak syntax to symbol syntax

    Instead of \tweak #'color, \tweak color is used.
    Instead of \tweak Accidental #'color, \tweak Accidental.color is used.

    convert-ly rule for \alterbroken, \accidentalStyle, \overrideProperty

    This is required since not all of the old call forms can be
    automatically recognized anymore, in particular not when the
    Scheme-only form #"Context.GrobName" is being used.

    Change \accidentalStyle to get a symbol list as argument

    This changes the syntax of \accidentalStyle to accept specs like
    Voice.piano-cautionary .

    Make \alterBroken, \hide, \omit, \overrideProperty, \shape take unquoted Context.Grob specs

    This changes the syntax of the named commands to accept
    Voice.Accidental and similar specifications without any quoting.

    Replace the rather fuzzy list-or-symbol? with symbol-list-or-symbol?

    list-or-symbol? was previously used in the meaning of
    symbol-list-or-symbol? only, and there is no point in not checking the
    list members for actually being symbols, in order to avoid ugly
    surprises later.

    Add symbol-list-or-music? predicate

    This is of interest for commands like \hide which accept either music
    (to see an override) or a grob specification like Accidental or
    Voice.Accidental.

    Allow the string "xxx.yyy" to parse as a symbol list

    This changes the parser to let xxx.yyy be a valid way of specifying a
    function argument required to be #'(xxx yyy).

    Allow property and grob paths to be constructed from strings

    Add symbol-list? predicate

    Allow LilyPond strings to stand in for symbols when parsing

    Bare words and quote-enclosed words meeting word syntax can now be
    used when a function argument expects to see a symbol.

    Let \accidentalStyle detect its optional context argument by looking at its letter case

    This is a fishy stopgap measure to let \accidentalStyle able to
    distinguish #'Voice "default" from "default" alone while we generate
    symbols from from #'Voice as well as "default".  If the first letter
    is uppercase, the symbol is considered to be a context specification.

    Factor SCM_IDENTIFIER out from embedded_scm_arg*

    SCM_IDENTIFIER indicates "active Scheme" introduced with $ that is
    subject to copying and reinterpretation.  While the parser had its own
    *_IDENTIFIER category for everything interpreted specially, the
    fallback SCM_IDENTIFIER itself never needed special or different
    treatment from material generated with # (SCM_TOKEN).  As the various
    *_IDENTIFIER types are faded out, this is changing.  As a consequence,
    SCM_IDENTIFIER no longer shares the non-terminals with other
    Scheme-type definitions.

    parser.yy: make is_regular_identifier match the lexer definition

    is_regular_identifier checks now for valid identifiers employing the
    definition of words that is also used in the lexer: letters, and
    characters outside of the ASCII range, interspersed with single - and
    _ characters.

    parser.yy: FRACTION does not require a closed expression before it

    FRACTION items can't trail any other valid expression without
    separating '*' or similar, so the argument list before them does not
    need to be of "closed" type.

    Assignments can't contain literal lyric music (wrong lexer mode)

    Since assignments can't happen in lyrics mode (only in INITIAL mode or
    the initial music mode), there is no point in supporting
    non-mode-switching items on the right side of assignments that can
    only occur in lyrics mode.

    http://codereview.appspot.com/6651053

    Labels: -Patch-needs_work Patch-new

     
  • Google Importer

    Google Importer - 2012-10-18

    Originally posted by: dak@gnu.org

    Again regarding comment #20: there is not really perfect choice in that matter.  While I have invested considerable effort in making sure that both forms of \override/\revert work, for music functions like \overrideProperty or \tweak there is no such leeway.  We need to decide whether to have dots or not, and the only thing working consistently here is dots everywhere.

    In the current form of the patch, the interface for \overrideProperty still is non-dotted, but ultimately I don't see much of an option.  Abolishing the non-dotted forms _hard_ from the parser would break upward-compatibility (having to employ convert-ly thoroughly) but would simplify the parser code in that area significantly.  Since we don't really have the option for doing this sort of ambiguity resolution with music functions, it might make sense to bite the bullet and just go for consistent dotting in any path.

     
  • Google Importer

    Google Importer - 2012-10-18

    Originally posted by: dak@gnu.org

    Patchy the autobot says: passes tests.  Due to various renames, various log file name changes, and shifts in profiling data.  Significant changes with display-lily-tests (outputs now invalid syntax for directed \tweak), also oscillations in garbage collection problems in bar-line-define-bar-glyph.ly which clearly seems broken and should never have been committed in this state.

    Labels: -Patch-new Patch-review

     
1 2 > >> (Page 1 of 2)
MongoDB Logo MongoDB