On Tue, 2016-08-09 at 22:12 +0100, Richard Shann wrote:
> On Tue, 2016-08-09 at 22:15 +0200, Andreas Schneider wrote:
> > Thank you. I changed the scripts to
> > 
> > (ToggleDirective "chord" "prefix" (cons "ToggleStartLigature"  "(lig")
> > "\\[ " )
> > (d-DirectivePut-chord-override "ToggleStartLigature" DENEMO_OVERRIDE_AFFIX)
> > 
> 
> It occurred to me after writing, I think you can pass the override in to
> the ToggleDirective procedure, I would need to look up the definition


Hmm, well it is mentioned in the Manual:

 (ToggleDirective type field tag content . overrides) ; four strings and
an arbitrary number of tags (numbers) for overrides. 
It's defined in actions/denemo-modules/directives.scm which explains it
a bit more.

BUT more importantly, it is a bad idea just to set the override after
the ToggleDirective call, since ToggleDirective is a toggle, so called a
second time the ToggleDirective call will delete the directive, and then
the line setting the override will create a largely empty (and so
harmless but confusing) directive with that tag and override (and
everything else empty). 
So put the override as the last parameter of the ToggleDirective call.

Richard


> (in actions/denemo.scm or more likely actions/denemo-modules/xxx.scm)
> but it would be something like
> 
> (ToggleDirective "chord" "prefix" (cons "ToggleStartLigature"  "(lig" 
> DENEMO_OVERRIDE_AFFIX)
> 
> I think there's another optional parameter to say whether the cursor
> should move right after executing it...
> 
> Richard
> 
> 
> 
> > and
> > 
> > (ToggleDirective "chord" "postfix" (cons "ToggleEndLigature"  "lig)") "
> > \\]" )
> > 
> > Now everything seems to work, including for different note lengths
> > (thanks for noting the need to test that).
> > 
> > Andreas
> > 
> > _______________________________________________
> > Denemo-devel mailing list
> > [email protected]
> > https://lists.gnu.org/mailman/listinfo/denemo-devel
> 
> 
> 
> _______________________________________________
> Denemo-devel mailing list
> [email protected]
> https://lists.gnu.org/mailman/listinfo/denemo-devel



_______________________________________________
Denemo-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/denemo-devel

Reply via email to