Re: Issue 1391 in lilypond: Enhancement: warning message when an property is set in the wrong context

2010-11-10 Thread Werner LEMBERG
 A warning message would be printed, possibly along the lines of


   overriding property `stencil' for grob `BarLine' has no effect in
   context `Voice'
 
 I would like to state that I consider that a step in the wrong
 direction.  If we make Lilypond smart enough to figure out what is
 wrong, we should use that smartness for doing the right thing
 instead of educating the user.
 
 Lilypond once had subvoices (threads?).  They have been eliminated,
 as far as I understand, because they were causing more confusion
 than good, and an elemental part of that confusion was that they
 made it harder to figure out just what context you wanted to be
 setting your properties for.
 
 If we give Lilypond that knowledge, then we should make it pick the
 right context itself.

Hmm.  You mean that a user should never need to specify the context of
a grob, and lilypond should be able to automatically walk over all
contexts to find the right one?  This sounds useful.  And, similar to
languages like C++, it should be possible to explicitly select the
context in case there is ever a situation where this is necessary $(Q#|(B
currently, I'm not aware that an engraver can be part of two contexts
at the same time, but...


Werner

___
bug-lilypond mailing list
bug-lilypond@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Issue 1391 in lilypond: Enhancement: warning message when an property is set in the wrong context

2010-11-10 Thread David Kastrup
lilyp...@googlecode.com writes:

 Status: Accepted
 Owner: 
 Labels: Type-Enhancement Priority-Medium Warning

 New issue 1391 by v.villenave: Enhancement: warning message when an
 property is set in the wrong context
 http://code.google.com/p/lilypond/issues/detail?id=1391

 This feature was suggested by Werner:
 http://lists.gnu.org/archive/html/lilypond-devel/2010-11/msg00229.html

 It would be very helpful to many users that when typing e.g.
   {
 ...
 \override BarLine #'stencil = ##f
 ...
   }

 instead of (in the appropriate context):

   \override Staff.BarLine #'stencil = ##f

 A warning message would be printed, possibly along the lines of

   overriding property `stencil' for grob `BarLine' has no effect in
   context `Voice'

I would like to state that I consider that a step in the wrong
direction.  If we make Lilypond smart enough to figure out what is
wrong, we should use that smartness for doing the right thing instead of
educating the user.

Lilypond once had subvoices (threads?).  They have been eliminated, as
far as I understand, because they were causing more confusion than good,
and an elemental part of that confusion was that they made it harder to
figure out just what context you wanted to be setting your properties
for.

If we give Lilypond that knowledge, then we should make it pick the
right context itself.

That way, one could, if one wanted, reintroduce subvoice contexts
without changing the meaning of existing valid sources (namely sources
that don't fiddle with non-working properties in the wrong context).

And we _have_ snippets fiddling with typesetting stuff two times, using
transparent parts for each pass, that would work much more elegant with
the equivalent of subvoices.

-- 
David Kastrup


___
bug-lilypond mailing list
bug-lilypond@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-lilypond


Issue 1391 in lilypond: Enhancement: warning message when an property is set in the wrong context

2010-11-10 Thread lilypond

Status: Accepted
Owner: 
Labels: Type-Enhancement Priority-Medium Warning

New issue 1391 by v.villenave: Enhancement: warning message when an  
property is set in the wrong context

http://code.google.com/p/lilypond/issues/detail?id=1391

This feature was suggested by Werner:
http://lists.gnu.org/archive/html/lilypond-devel/2010-11/msg00229.html

It would be very helpful to many users that when typing e.g.
  {
...
\override BarLine #'stencil = ##f
...
  }

instead of (in the appropriate context):

  \override Staff.BarLine #'stencil = ##f

A warning message would be printed, possibly along the lines of

  overriding property `stencil' for grob `BarLine' has no effect in
  context `Voice'




___
bug-lilypond mailing list
bug-lilypond@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Issue 1391 in lilypond: Enhancement: warning message when an property is set in the wrong context

2010-11-10 Thread David Kastrup
Graham Percival gra...@percival-music.ca writes:

 On Wed, Nov 10, 2010 at 01:18:49PM +0100, Werner LEMBERG wrote:
  I would like to state that I consider that a step in the wrong
  direction.  If we make Lilypond smart enough to figure out what is
  wrong, we should use that smartness for doing the right thing
  instead of educating the user.
 
 Hmm.  You mean that a user should never need to specify the context of
 a grob, and lilypond should be able to automatically walk over all
 contexts to find the right one?  This sounds useful.

More like if a user specifies a context (whether explicitly, or
implicitly by using the current one) not supporting a particular
grob/property, then Lilypond will walk through the parents until finding
one that does it.  Or put differently: where a context does not
support a particular grob/property on its own, it inherits the
respective grobs from its parenting context.

 It's not possible in all cases -- consider trying to set the staff
 name to Violins for the staffgroup containing violin 1 and
 violin 2 -- but it could be done for most cases.  The real
 question is whether it's worth doing for most cases, and whether
 the automatic method might increase confusion.

The automatic method has the advantage that we can introduce layers of
rather lightweight contexts without affecting existing semantics.
Chords can be formed in a subcontext of their own, and manipulated
accordingly.  Subvoices can be used for tasks now done using multiple
versions pasted over each other using transparency and disabling
collision detection.  I mean, ugh.

-- 
David Kastrup

___
bug-lilypond mailing list
bug-lilypond@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-lilypond