Re: [frogs] Patch for removing oldaddlyrics function |
[ Thread Index | Date Index | More lilynet.net/frogs Archives ]
Hi Carl, Updated patch attached. Cheers, Ian Carl D. Sorensen wrote: On 2/1/09 3:46 PM, "Patrick McCarty" <pnorcks@xxxxxxxxx> wrote:Hi Ian, On Sun, Feb 1, 2009 at 1:30 PM, Ian Hulin <ian@xxxxxxxxxxxx> wrote:From delving into the history, it looks like convertly has already done stuff with this.in stages: 1. A \newaddlyrics was added 2. \addlyrics was -> \oldaddlyrics 3. \newaddlyrics -> \addlyrics. So I don't think I need to do anything more than change music-functions-init.ly.After removing the \oldaddlyrics function, any LilyPond files that contain this function will fail to compile with LilyPond 2.12, 2.10, .... , so some sort of convert-ly rule should be added. Looking through the mailing list archives, I've gathered that a search-and-replace convert-ly rule is not possible. Mats suggests to add a warning: http://lists.gnu.org/archive/html/lilypond-devel/2009-01/msg00167.html -PatrickIan, Just trying to make sure you understand. Old versions of lilypond used \addlyrics. If you run convert-ly on one of those, it will change \addlyrics to \oldaddlyrics. But there is not convert-ly rule that deals with those \oldaddlyrics calls, which can be generated by convert-ly, without any input from a user. You're proposing to remove that function, which will break any of those legacy lilypond files. So a convert-ly rule should be added that doesn't automatically fix things, but prints a warning message saying essentially "\oldaddlyrics has been removed. You will need to convert manually to \addlyrics or \lyricsto". HTH, Carl --- ---- Join the Frogs! ______________________________________________ This email has been scanned by Netintelligence http://www.netintelligence.com/email |
Author: Ian Hulin <ian@xxxxxxxxxxxx> 2009-02-02 14:06:11 Committer: Ian Hulin <ian@xxxxxxxxxxxx> 2009-02-02 14:06:11 Parent: 813d15e956789c53b0164da763c6812ded5b1e59 (Frogs Task 1- \mapMusic to \pageBreak, rework after feedback.) Branch: master Follows: release/2.12.1-1 Precedes: For V2.12.3 - Remove Obsolete function oldaddlyrics update music-functions-init.ly and add warning to convertrules.py. Signed-off-by: Ian Hulin <ian@xxxxxxxxxxxx> -------------------------- ly/music-functions-init.ly -------------------------- index 61a8197..ecd3be0 100644 @@ -1,4 +1,4 @@ -% -*-Scheme-*- +% -*-Scheme-*- \version "2.12.0" @@ -20,6 +20,7 @@ addQuote = (add-quotable parser name music) (make-music 'SequentialMusic 'void #t)) + afterGraceFraction = #(cons 6 8) @@ -345,20 +346,6 @@ entire music expression (@var(mus))." ) (music-map proc mus)) -% -% TODO \addlyrics, \lyricmode \lyricsto and other lyrics functions are currently -% not documented via docstrings here as they are not classed as Identifiers. -% -oldaddlyrics = -#(define-music-function (parser location music lyrics) (ly:music? ly:music?) -(_i "Obsolete function @code{oldaddlyrics} @var(lyrics) was used to add a block - of lyrics text to a music expression. - Please use @code(addlyrics) @var{lyrics} or - @code{lyricsto} @var(voicename) @var(lyrics) and @code{lyricmode) instead.") - (make-music 'OldLyricCombineMusic - 'origin location - 'elements (list music lyrics))) - overrideProperty = #(define-music-function (parser location name property value) ---------------------------- python/convertrules.py ---------------------------- index ad2c0cd..854de40 100644 @@ -2864,6 +2864,17 @@ chord-shape call.\n")) raise FatalConversionError () return str +@rule ((2, 12, 3), + _ ("Remove support for oldaddlyrics") +def conv(str): + if re.search(r'\\oldaddlyrics', str): + stderr_write ("\n") + stderr_write (NOT_SMART % _("oldaddlyrics is no longer supported - \n \ + use addlyrics or lyricsto instead.\n")) + stderr_write (UPDATE_MANUALLY) + raise FatalConversionError () + return str + # Guidelines to write rules (please keep this at the end of this file) # # - keep at most one rule per version; if several conversions should be done,
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |