[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: report a programming error when trying to align on empty parent (iss
From: |
janek . lilypond |
Subject: |
Re: report a programming error when trying to align on empty parent (issue 7533046) |
Date: |
Sat, 23 Mar 2013 15:44:02 +0000 |
On Thu, Mar 21, 2013 at 1:21 PM, Janek Warchoł
<address@hidden> wrote:
On Thu, Mar 21, 2013 at 9:14 AM, <address@hidden> wrote:
I don't know the logic of the code and its uses, so this is basically
my
unqualified gut feeling and nothing else. [...]
It is telling that (presumably after looking at the code at least
once) you don't know what the logic of the code is. [...]
I'll write some more complete explanation and send it to the list.
It took a lot of time and became much longer than i expected, but
eventually i've written a detailed explanation of how alignment in
Lilypond works - this should "put [this] function into perspective":
http://lists.gnu.org/archive/html/lilypond-user/2013-03/msg00956.html
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? Or do we want users to write
\version "2.17.12"
{ c' e' f' d' }
\addlyrics {
la le
\override LyricText #'stencil = ##f
\override LyricText #'X-extent = #'(0 . 0)
li lo
}
Bottom line: this patch is about consistency. If we care about grobs
having non-empty extents, we should report programming errors in all
self-alignment methods. If we don't care, we should not report any
programming errors about this.
I hope this makes this issue clear. I'd really like to move forward
with this.
best,
Janek
https://codereview.appspot.com/7533046/
- report a programming error when trying to align on empty parent (issue 7533046), janek . lilypond, 2013/03/18
- Re: report a programming error when trying to align on empty parent (issue 7533046), mtsolo, 2013/03/19
- Re: report a programming error when trying to align on empty parent (issue 7533046), dak, 2013/03/21
- Re: report a programming error when trying to align on empty parent (issue 7533046), janek . lilypond, 2013/03/21
- Re: report a programming error when trying to align on empty parent (issue 7533046), dak, 2013/03/21
- Re: report a programming error when trying to align on empty parent (issue 7533046),
janek . lilypond <=
- Re: report a programming error when trying to align on empty parent (issue 7533046), janek . lilypond, 2013/03/24