-
Notifications
You must be signed in to change notification settings - Fork 600
feat(docs): named-range create / list / delete / replace-content commands #692
Copy link
Copy link
Open
Labels
P2Normal priority bug or improvement with limited blast radius.Normal priority bug or improvement with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Metadata
Metadata
Assignees
Labels
P2Normal priority bug or improvement with limited blast radius.Normal priority bug or improvement with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Motivation
Named ranges are the API-native way to maintain a stable anchor inside a doc even as text around it changes. They survive edits to surrounding paragraphs in a way that "find text and compute index" does not. For round-trip workflows (a script writes content, later wants to update just one section), named ranges are the durable solution; text-based locate is a fallback.
The Docs API supports CreateNamedRange, DeleteNamedRange, and ReplaceNamedRangeContent. gog already emits CreateNamedRange via the sed bookmark brace (
{B=name}ininternal/cmd/docs_sed_brace_structural.go), and DeleteNamedRange is exposed in the sheets path (internal/cmd/sheets_named_ranges.go), but neither is reachable as a top-level docs subcommand. ReplaceNamedRangeContent is not emitted anywhere.Depends on
find-rangeprimitive — only for the--at=<text>mode ofnamed-range create. The--start=N --end=Nmode is independent. If feat(docs): add find-range primitive that maps text to Document index ranges #682 has not landed yet, this issue can ship with index-only addressing and gain--at=<text>later as a non-breaking addition.Repro
Proposed surface
Acceptance criteria
documents.get.References
Document.namedRangesfield: https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Document