live_select
Select a paragraph or position the cursor at its start in an open Word or LibreOffice document to highlight a passage for discussion.
Instructions
Show the user a place in Word or LibreOffice: select a paragraph, or with mode cursor only put the cursor at its start, by address (at, p142#a7b2a7b2) or by a find_phrase from para.locate (matched loosely per match_level). paragraphs_after moves on that many paragraphs. Use it to point at a passage you are discussing; live.places offers several as buttons. Changes only the selection; needs live.open. STALE_ADDRESS when at no longer matches, ANCHOR_NOT_FOUND or ANCHOR_AMBIGUOUS for a phrase.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| at | No | Paragraph address, e.g. `p142#a7b2a7b2`. | |
| doc | Yes | Path to the document, or the file name of one open in a live app. | |
| mode | No | `select` (default) selects the paragraph; `cursor` only puts the cursor at its start, so typing or Delete cannot replace it. | |
| front | No | Bring the app's window to the front (default true); the reply's `front` says whether it came. | |
| engine | No | Always the live engine; may be left out. | |
| find_phrase | No | A phrase that occurs once in the document (`\r` for a paragraph mark), as `para.locate` gives it. | |
| match_level | No | How loosely `find_phrase` matches. `default` (the default) ignores case, accents and punctuation; `loose` symbols too. Either tries the levels from verbatim on and takes the first that matches, so one verbatim paragraph beats looser ones. `exact` is `para.locate`'s rule: case ignored, nothing else, no retry. Two meanings of exact: the request's `exact` allows a case difference, the reply's does not. The reply's `match_level` (`exact` character for character, `case`, `default`, `loose`) names the level that matched, with `matched_text` when it is not `exact`. | |
| paragraphs_after | No | Select the paragraph this many after the one named. | |
| find_phrase_across | No | `para.locate`'s `find_phrase_across`, for a phrase spanning a mark. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Always true on success. | |
| op | Yes | The operation that ran. | |
| api | Yes | API version (1.0). | |
| doc | No | The document read or written: path, sha256 and paragraph count. | |
| next | Yes | Cursor for the next page (pass as cursor), or null. | |
| result | Yes | What the operation returns. | |
| warnings | Yes | Things to know about the result. |