On 8/19/11 10:15 AM, "David Kastrup" <d...@gnu.org> wrote: > > Up to now, \once \revert is not really documented nor used. I have not > yet dug through the existing code in order to figure out what it does if > anything (most likely ignoring \once, but not sure).
I would expect that \once \revert would revert an \override for the current time step only (meaning events whose start time is the current moment). For any events whose start time is other than the current moment, the \override would continue to apply. > > In order to not have the override/revert stack get into unexpected > interactions, I want to change \once\override to be impervious to normal > reverts. This seems to me to be a wise decision. \once \override is a statement that you are creating an override for everything happening at the current moment; reverts would not seem to apply. > > That would mean that \once\revert is an obvious candidate for reverting > a \once\override before its time. However, I have no idea whether there > is an actual sensible use for that functionality. I can see no sensible use for that functionality. You would have conflicting statements about what should happen at this time. > > \once\revert could also mean to let a current non-once override become > inactive just for the current time step. As I mentioned above, I think this is the logically consistent meaning. > That's likely harder to > implement, I think. You have *clearly* studied this and thought about it much more than I (and I'm grateful for your tackling this issue). I would think that a \once command would not need a stack. \once means "create a new setting from the current setting, and apply it at this moment, but don't carry it forward". But again, you have much more basis for your observations than I have for mine. > Again, I have no idea whether there is an actual > sensible use for that either, and it looks rather ad-hoc. I have no idea whether there is a sensible use, either, but it is logically consistent, IMO. > > IF one wanted to get crazy, one could use \once\revert for one of the > two things, and \revert\once for the other. Which one for which, and > would anybody remember that? I agree that this would be crazy. But if we were going to do it, \once \revert should revert an \override, but only for the current moment, and \revert \once should revert a \once \override, IMO. But I would not be in favor of this proposal. > > Since the parser permits \once\revert, I tend towards making it match > the last \once\override. It likely does not make much sense, but then > it is sort of easy to understand. I lean to the opposite use, as I have described. To me, \once \override x = #y \once \revert x should be an undefined state, since there are two conflicting commands. Why should the second one have preference over the first? Just because it comes later in the text stream? I'd be fine with having the documentation say something like When two \once commands conflict, the resulting state is indeterminate. You should never have two \once commands at the same musical moment that affect the same property setting. In fact, I think I would be in favor of removing \once \revert from the parser. The semantics of \once \revert can be confusing, and the same behavior could be achieved with a \once \override. But I would be open to arguments from those who see good uses of \once \revert. Thanks, Carl _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel