bug-lilypond
[Top][All Lists]
Advanced

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

Re: Issue 153 in lilypond: \once \set fails to restore previous setting


From: lilypond
Subject: Re: Issue 153 in lilypond: \once \set fails to restore previous setting
Date: Thu, 07 Jul 2011 16:19:38 +0000


Comment #11 on issue 153 by address@hidden: \once \set fails to restore previous setting
http://code.google.com/p/lilypond/issues/detail?id=153

See
   Property_iterator::once_finalization (SCM ctx, SCM music)
   Property_iterator::do_quit ()
in lily/property-iterator.cc. \once\set installs a finalization hook via add_finalization, which will be called at the end of the moment (see Global_context::run_iterator_on_me). So, yes even though \set is processed by an iterator, it can be properly applied to just one moment.

And of course, set is associated with a time from a user's perspective: It is placed between two notes (events, whatever), so \once\set should apply to just the following moment.

Cheers,
Reinhold

PS: Just in case anyone is looking into where to start trying to fix that bug. You just need to look at the Property_iterator (lily/property-iterator.cc), which processes all \set and for \once\set also sends an UnsetProperty event in once_finalizations. Unfortunately, \unset does not revert to the value before the \set... Maybe there is a way to cache the old value for \once\set in Property_iterator?




reply via email to

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