[email protected] wrote Saturday, March 23, 2013 3:44 PM > If i got everything right, you'll see in that explanation that an empty > extent isn't harmful (at least in self-alignment) - it just results in > offset being 0. > So, the question is: in general, is it ok if a grob has empty extent? > Or should extent always be some Interval (possibly zero)? > In other words: if an alignment method is called on an empty grob (see > example below), should it just say "well, i received an empty object, so > what? I can't do anything with it, so i'll move on", or shout "hey, > there are empty grobs flying around! Do something about it!". > > Example: if we override grob's stencil to #f, the extent will be #f as > well: > > \version "2.17.12" > { c' e' f' d' } > \addlyrics { la le \override LyricText #'stencil = ##f li lo } > > - the above code reports "programming error: cannot align on self: empty > element". Do we consider above code (and the use of \omit as currently > defined) a good practice?
A 'programming error' should be issued only when an internal inconsistency in LilyPond's code or data structures is detected. Any such message should always result in a bug being reported and tracked. If the problem is due to suspect user code a warning or error should be issued. In this case maybe a warning is appropriate. Trevor _______________________________________________ lilypond-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-devel
