lilypond-devel
[Top][All Lists]
Advanced

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

Re: Issue 2024: Let #{ ... #} pass its $ handling to environment cloning


From: dak
Subject: Re: Issue 2024: Let #{ ... #} pass its $ handling to environment cloning (issue 5341049)
Date: Tue, 08 Nov 2011 17:24:03 +0000

Reviewers: Trevor Daniels,

Message:
On 2011/11/08 16:37:25, Trevor Daniels wrote:
I don't claim to understand much of this, but the resulting
simplification seems
worth the pain to me.

Obviously to me as well.  I want to stress that I did _no_ manual
changes to Documentation and regtests, and even converted
scm/music-functions.scm (with a manual call of convert-ly as it can't be
done automatically, missing a version string) with convert-ly.

The expectation that convert-ly will generate many
changes to (advanced) user code suggests changes.tely needs a clear
notice
adding explaining what has been done.

Not just changes.tely: quite a bit more documentation is warranted (and
will be forthcoming).  However, most of it makes the best sense once
ly:export has actually been removed, and # has lost its feature of
immediate execution.

The behavior of $ is actually easy to explain: $something-in-scheme is
perfectly equivalent to \id once id has been set (where is is allowed)
with id=#something-in-scheme.

Basically equivalent to the most common of the half dozen special cases
previously just available in #{ ... #}.

The five functions add-grace-property, remove-grace-property,
empty-music, set-accidental-style and set-time-signature really need to
get replaced by sensibly named music functions in a separate step. They
are responsible for a user interface oddity that is now even more
apparent.  Once that has been done, $ should no longer crop up in the
documentation in places where it does not actually belong, given the
respective topic and level of its surrounding material.

That would make it easier to pick the right point for addressing it in
detail.

I'll incorporate your detailed comments likely sometime tomorrow, as I
have choir practice soon.


Description:
Issue 2024: Let #{ ... #} pass its $ handling to environment cloning

Consists of the patches:

Adapt docs to new $ and #{ ... #} behavior


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


Let #{ ... #} pass its $ handling to environment cloning

Includes convertrules.py rules

Permit ly:parser-clone to receive an environment


lexer.ll: add $ for immediate export.



Purpose is to make $ generally available rather than to have it just
in #{ ... #}, let it completely replace the need for ly:export, and to
let #{ ... #} import its lexical environment into its embedded Scheme
expressions via # or $.

Unfortunately, you will likely have to bump PATCHLEVEL in VERSION
manually for testing, as dev/staging is still locked at 2.15.17 which
is too small after running convert-ly.

Please review this at http://codereview.appspot.com/5341049/

Affected files:
  M Documentation/cs/usage/running.itely
  M Documentation/de/extending/scheme-tutorial.itely
  M Documentation/de/notation/pitches.itely
  M Documentation/de/notation/rhythms.itely
  M Documentation/de/usage/running.itely
  M Documentation/es/extending/programming-interface.itely
  M Documentation/es/extending/scheme-tutorial.itely
  M Documentation/es/notation/pitches.itely
  M Documentation/es/notation/rhythms.itely
  M Documentation/es/usage/running.itely
  M Documentation/extending/programming-interface.itely
  M Documentation/extending/scheme-tutorial.itely
  M Documentation/fr/notation/pitches.itely
  M Documentation/fr/notation/rhythms.itely
  M Documentation/fr/usage/running.itely
  M Documentation/hu/learning/fundamental.itely
  M Documentation/hu/usage/running.itely
  M Documentation/it/usage/running.itely
  M Documentation/ja/notation/pitches.itely
  M Documentation/ja/notation/rhythms.itely
  M Documentation/ja/usage/running.itely
  M Documentation/ly-examples/aucun-snippet.ly
  M Documentation/ly-examples/bach-bwv610.ly
  M Documentation/ly-examples/cary-layout.ily
  M Documentation/notation/pitches.itely
  M Documentation/notation/rhythms.itely
  M Documentation/snippets/adding-orchestral-cues-to-a-vocal-score.ly
  M Documentation/snippets/arabic-improvisation.ly
  M Documentation/snippets/center-text-below-hairpin-dynamics.ly
  M Documentation/snippets/chords-headword.ly
  M Documentation/snippets/conducting-signs,-measure-grouping-signs.ly
  M Documentation/snippets/fretted-headword.ly
  M Documentation/snippets/generating-random-notes.ly
  M Documentation/snippets/heavily-customized-polymetric-time-signatures.ly
  M Documentation/snippets/incipit.ly
  M Documentation/snippets/new/chords-headword.ly
  M Documentation/snippets/new/conducting-signs,-measure-grouping-signs.ly
  M Documentation/snippets/new/fretted-headword.ly
  M Documentation/snippets/new/incipit.ly
  M Documentation/snippets/new/score-for-diatonic-accordion.ly
  M Documentation/snippets/score-for-diatonic-accordion.ly
  M Documentation/snippets/tweaking-grace-layout-within-music.ly
  M Documentation/usage/running.itely
  M input/regression/accidental-contemporary.ly
  M input/regression/accidental-piano.ly
  M input/regression/accidental-voice.ly
  M input/regression/baerenreiter-sarabande.ly
  M input/regression/display-lily-tests.ly
  M input/regression/flags-straight-stockhausen-boulez.ly
  M input/regression/lily-in-scheme.ly
  M input/regression/markup-scheme.ly
  M input/regression/measure-grouping.ly
  M input/regression/mensural-ligatures.ly
  M input/regression/metronome-range.ly
  M input/regression/metronome-text.ly
  M input/regression/morgenlied.ly
  M input/regression/mozart-hrn-3.ly
  M input/regression/page-breaks.ly
  M input/regression/rest-ledger.ly
  M input/regression/spacing-accidental-stretch.ly
  M input/regression/typography-demo.ly
  M lily/include/lily-lexer.hh
  M lily/include/lily-parser.hh
  M lily/lexer.ll
  M lily/lily-parser-scheme.cc
  M lily/lily-parser.cc
  M lily/parse-scm.cc
  M ly/bagpipe.ly
  M ly/chord-modifiers-init.ly
  M ly/engraver-init.ly
  M ly/music-functions-init.ly
  M ly/spanners-init.ly
  M ly/titling-init.ly
  M python/convertrules.py
  M scm/music-functions.scm
  M scm/parser-ly-from-scheme.scm





reply via email to

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