Re: input/regression/multi-measure-rest-reminder: a demo of user-defined grobs (issue 557380044 by hanwenn@gmail.com)

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: input/regression/multi-measure-rest-reminder: a demo of user-defined grobs (issue 557380044 by hanwenn@gmail.com)

jonas.hahnfeld
On 2020/02/10 21:28:53, hahnjo wrote:
> Thanks for providing a test. Not able to run it right now, maybe
tomorrow.

Looks good to me (modulo the nits), see
https://sourceforge.net/p/testlilyissues/issues/5747/ for how the output
looks like.

https://codereview.appspot.com/557380044/

Reply | Threaded
Open this post in threaded view
|

Re: input/regression/multi-measure-rest-reminder: a demo of user-defined grobs (issue 557380044 by hanwenn@gmail.com)

hanwenn
Reply | Threaded
Open this post in threaded view
|

Re: input/regression/multi-measure-rest-reminder: a demo of user-defined grobs (issue 557380044 by hanwenn@gmail.com)

Thomas Morley-2
In reply to this post by jonas.hahnfeld
Sorry being that late to the party.
Though, I'm confused.
Iiuc a new grob called MultiMeasureRestReminder should be created.
Alas, if I try to insert
\override Voice.MultiMeasureRestReminder.after-line-breaking = #'()
I get:
warning: not a grob name, `MultiMeasureRestReminder'

What am I missing?



https://codereview.appspot.com/557380044/

Reply | Threaded
Open this post in threaded view
|

Re: input/regression/multi-measure-rest-reminder: a demo of user-defined grobs (issue 557380044 by hanwenn@gmail.com)

Thomas Morley-2
In reply to this post by jonas.hahnfeld

https://codereview.appspot.com/557380044/diff/569320045/input/regression/multi-measure-rest-reminder.ly
File input/regression/multi-measure-rest-reminder.ly (right):

https://codereview.appspot.com/557380044/diff/569320045/input/regression/multi-measure-rest-reminder.ly#newcode26
input/regression/multi-measure-rest-reminder.ly:26:
#(set-object-property!  'MultiMeasureRestReminder 'translation-type?
ly:grob-properties?)
To make further overrides possible, add:
#(set-object-property! 'MultiMeasureRestReminder 'is-grob? #t)

Would solve the issue in my recent comment

https://codereview.appspot.com/557380044/

Reply | Threaded
Open this post in threaded view
|

Re: input/regression/multi-measure-rest-reminder: a demo of user-defined grobs (issue 557380044 by hanwenn@gmail.com)

hanwenn
In reply to this post by jonas.hahnfeld

https://codereview.appspot.com/557380044/diff/569320045/input/regression/multi-measure-rest-reminder.ly
File input/regression/multi-measure-rest-reminder.ly (right):

https://codereview.appspot.com/557380044/diff/569320045/input/regression/multi-measure-rest-reminder.ly#newcode26
input/regression/multi-measure-rest-reminder.ly:26:
#(set-object-property!  'MultiMeasureRestReminder 'translation-type?
ly:grob-properties?)
On 2020/02/16 13:45:30, thomasmorley651 wrote:
> To make further overrides possible, add:
> #(set-object-property! 'MultiMeasureRestReminder 'is-grob? #t)
>
> Would solve the issue in my recent comment

Feel free to send a change!

I don't understand why we need is-grob? if the symbol is already marked
with translation-type? == ly:grob-properties?  

David?

https://codereview.appspot.com/557380044/

Reply | Threaded
Open this post in threaded view
|

Re: input/regression/multi-measure-rest-reminder: a demo of user-defined grobs (issue 557380044 by hanwenn@gmail.com)

David Kastrup
In reply to this post by jonas.hahnfeld
On 2020/02/17 10:01:29, hanwenn wrote:
>
https://codereview.appspot.com/557380044/diff/569320045/input/regression/multi-measure-rest-reminder.ly
> File input/regression/multi-measure-rest-reminder.ly (right):
>
>
https://codereview.appspot.com/557380044/diff/569320045/input/regression/multi-measure-rest-reminder.ly#newcode26
> input/regression/multi-measure-rest-reminder.ly:26:
#(set-object-property!

> 'MultiMeasureRestReminder 'translation-type? ly:grob-properties?)
> On 2020/02/16 13:45:30, thomasmorley651 wrote:
> > To make further overrides possible, add:
> > #(set-object-property! 'MultiMeasureRestReminder 'is-grob? #t)
> >
> > Would solve the issue in my recent comment
>
> Feel free to send a change!
>
> I don't understand why we need is-grob? if the symbol is already
marked with
> translation-type? == ly:grob-properties?  
>
> David?

Comparatively unrelated things.  At any rate, "the symbol is marked" is
historical baggage and we should instead of using "object-properties"
use an explicit weak hashtable for such things since that would make it
possible to _reset_ the hashtable between user files and thus make sure
that user-defined properties don't bleed from one file to the next.  I
just haven't got around to doing this change yet which will break all
user-created grobs (and some other things implemented in the same
manner) and provide a more official way of extension.

At any rate, is-grob? is the way of checking that something is a grob
name syntactically.  translation-type?, in contrast, is the type of the
context property storing the current grob definition.  Historically,
this was an alist I think, and mixing \set and \override on the same
property consequently could cause fascinating crashes.

Using the alist directly did not allow for reliably overriding and
reverting nested context properties.  People patched around that area
for years, further obfuscating the logical impossibility of getting this
done correctly and getting the errors to become more obscure and trigger
in different circumstances.  So at one point of time, I introduced the
ly:grob-properties? data structure tracking nested overrides separately
and "cooking" the resulting alist only on an as-needed base.  That it is
needed for nothing else is not inherently related to it being tied to a
named grob.

https://codereview.appspot.com/557380044/

Reply | Threaded
Open this post in threaded view
|

Re: input/regression/multi-measure-rest-reminder: a demo of user-defined grobs (issue 557380044 by hanwenn@gmail.com)

Thomas Morley-2
In reply to this post by jonas.hahnfeld
On 2020/02/17 10:01:29, hanwenn wrote:
>
https://codereview.appspot.com/557380044/diff/569320045/input/regression/multi-measure-rest-reminder.ly
> File input/regression/multi-measure-rest-reminder.ly (right):
>
>
https://codereview.appspot.com/557380044/diff/569320045/input/regression/multi-measure-rest-reminder.ly#newcode26
> input/regression/multi-measure-rest-reminder.ly:26:
#(set-object-property!
> 'MultiMeasureRestReminder 'translation-type? ly:grob-properties?)
> On 2020/02/16 13:45:30, thomasmorley651 wrote:
> > To make further overrides possible, add:
> > #(set-object-property! 'MultiMeasureRestReminder 'is-grob? #t)
> >
> > Would solve the issue in my recent comment
>
> Feel free to send a change!

Done.
https://sourceforge.net/p/testlilyissues/issues/5772/
https://codereview.appspot.com/547670044




https://codereview.appspot.com/557380044/

Reply | Threaded
Open this post in threaded view
|

Re: input/regression/multi-measure-rest-reminder: a demo of user-defined grobs (issue 557380044 by hanwenn@gmail.com)

hanwenn
In reply to this post by jonas.hahnfeld
commit e3be140a8141f0236cd489cd97e7fcf735653a0b
Author: Han-Wen Nienhuys <[hidden email]>
Date:   Mon Feb 10 22:10:35 2020 +0100

    input/regression/multi-measure-rest-reminder: a demo of user-defined
grobs
   


https://codereview.appspot.com/557380044/