[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Direction operators in event-function
From: |
David Kastrup |
Subject: |
Re: Direction operators in event-function |
Date: |
Tue, 23 Oct 2018 09:54:22 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Urs Liska <address@hidden> writes:
> Am 21.10.2018 um 18:17 schrieb David Kastrup:
>> David Kastrup <address@hidden> writes:
>>
>>> Urs Liska <address@hidden> writes:
>>>
>>>> What I would *like* to do is a function like
>>>>
>>>> propagate-direction =
>>>> #(define-event-function (text)(markup?)
>>>> #{
>>>> -\tweak direction #UP
>>>> -(
>>>> -\tweak direction #UP
>>>> -\markup #text
>>>> #})
>>>>
>>>> but instead of hard-coding #UP I'd like to calculate the values based
>>>> on something. For example let the text have the opposite direction of
>>>> the slur and have the slur accept the ^\_ operator.
>>> Even assuming PostEvents are fixed, you'd still be stuck having to
>>> look at one event from another, independent one. You'd be missing a
>>> reliable handle for that. You'd need to use an engraver for doing
>>> that kind of interaction.
>> Correction: you could put a callback into a direction tweak on the text
>> event and this callback could check the _text_ event's direction and
>> then assume the _opposite_. So after "assuming PostEvents are fixed"
>> should more or less work for this particular scenario,
>
> My impression is: no. When I tried that I got a
> "calculation-in-progress" error.
Event properties are not evaluated using callbacks, so checking the text
event's direction cannot result in calculation-in-progress. You
probably checked the text grob's direction instead.
--
David Kastrup
Re: Direction operators in event-function, David Kastrup, 2018/10/29