Talon side
On the Talon side, we would like to do the following:
1. Make "before", "after" and "to" into "insertion modes"
We'll have a new list called cursorless_insertion_mode, which will consist of "before", "after" and "to".
These terms should also be removed from both cursorless_position and cursorless_source_destination_connective.
Note that "end of" and "start of" remain as position modifiers.
2. Add new capture for destinations
Replace the <cursorless_positional_target> capture with the following:
@mod.capture(
rule=(
"{user.cursorless_insertion_mode} <user.cursorless_target> "
"({user.cursorless_list_connective} {user.cursorless_insertion_mode} <user.cursorless_target>)*"
)
)
def cursorless_destination(m) -> list[dict]:
return {
"type": "destinationList",
"destinations": [
{
"type": "destination",
"insertionMode": insertion_mode,
"target": target,
}
for insertion_mode, target in zip(m.cursorless_insertion_mode, m.cursorless_target)
]
}
Note that we are using the cursorless_target capture as part of this capture, which can contain its own "and"s. That's how we support "after air and bat and before cap".
We would then use this new cursorless_destination capture wherever we use cursorless_positional_target today.
Note that we might instead want to do something like we do with targets, where the primitive destination can appear at the top level when there is no "and"
Problems
- We already have
"before" and "after" in positions.csv, and "to" in connectives.csv, but ideally we'd move them into the same file as each other
Talon side
On the Talon side, we would like to do the following:
1. Make
"before","after"and"to"into "insertion modes"We'll have a new list called
cursorless_insertion_mode, which will consist of"before","after"and"to".These terms should also be removed from both
cursorless_positionandcursorless_source_destination_connective.Note that
"end of"and"start of"remain as position modifiers.2. Add new capture for destinations
Replace the
<cursorless_positional_target>capture with the following:Note that we are using the
cursorless_targetcapture as part of this capture, which can contain its own"and"s. That's how we support"after air and bat and before cap".We would then use this new
cursorless_destinationcapture wherever we usecursorless_positional_targettoday.Note that we might instead want to do something like we do with targets, where the primitive destination can appear at the top level when there is no "and"
Problems
"before"and"after"inpositions.csv, and"to"inconnectives.csv, but ideally we'd move them into the same file as each other