Comment #11 on issue 153 by reinhold...@gmail.com: \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?
_______________________________________________
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond