Replace the physical ekp-region renderer with ekp-buffer text-property projection backed by shared semantic layout plans and stable live-edit transactions. Optimize the C-backed resize hot path, and add deterministic performance, ERT, GUI, fuzz, release, and documentation coverage for task017 through task032. BREAKING CHANGE: require ekp-buffer instead of ekp-region and rename module-owned ekp-region-* settings to ekp-buffer-*.
5.5 KiB
5.5 KiB
Issue: Semantic Live Prefix 2026-07-29
issue016 [ ] Live editing freezes native rows instead of projecting a semantic hard-line prefix
- Status: The whole-hard-line commit result is retained, but per-edit
replanning is superseded by
issue019/task031. - Summary: Before
task028, live editing committed completed native visual rows independently. User testing showed that earlier soft-wrapped rows in the same hard line did not become globally KP-aligned while the user continued typing. The behavior was row-local, not a dynamic projection of one semantic hard-line plan. - Environment: Graphical Emacs 30.2;
ekp-auto-justify-mode; mixed Latin/CJK hard lines that wrap across multiple visual rows. - Repro:
- Enable
ekp-auto-justify-mode. - Type one long hard line that naturally soft-wraps into multiple rows.
- Continue editing on the current unfinished row without inserting a hard newline.
- Observe the rows before point.
- Enable
- Expected vs Actual:
- Expected: EKP sends the complete current hard-line source text to the
existing
ekp-layout-planand projects only the complete semantic lines before the line containing the latest real source edit. Those preceding lines may change breaks and glue together whenever text, width, font, or layout options change. The editing-frontier line and all following source stay naturally editable. Point-only navigation does not change the projection. - Actual before
task028: the live model derived native visual rows and committed them one at a time. Once a row was treated as completed, later edits could not let the whole hard-line KP plan revise earlier breaks and glue as a single semantic decision.
- Expected: EKP sends the complete current hard-line source text to the
existing
- Root Cause:
ekp-bufferowned live editing but used native visual-row boundaries as the persistent layout unit. That was the wrong owner boundary. Core DP already computed the correct complete-text plan; the buffer layer needed to consume that plan and decide which prefix was safe to project, not invent a row-freezing live algorithm. - Required Outcome: Replace native-row commitment with semantic prefix
projection:
- keep the core DP, C ABI, DP schema, and
ekp-layout-plancontract unchanged; - pass the full current hard line to
ekp-layout-plan; - find the plan line containing the latest real source edit;
- project only the complete plan lines before that line;
- leave the edit-frontier plan line and all following source natural;
- compare old/new line signatures so unchanged prefixes are not reinstalled;
- cache recent full hard-line plans in
ekp-bufferonly; - fail closed to native display for conflicts, oversized hard lines, or stale generations;
- never use overlays or insert source layout characters.
- keep the core DP, C ABI, DP schema, and
- Fix:
task028replaces the native-row commit state with one current whole-hard-line semantic plan.task029makes the latest real source edit, rather than transient point, own the natural-suffix frontier.ekp-bufferprojects only prior lines, owns break whitespace on the preceding semantic line, keeps the editable suffix property-free, reuses a 16-entry buffer-local plan LRU, and updates changed projection suffixes from common-prefix line signatures. The core DP, C ABI, schema, andekp-layout-plancontract are unchanged. - Refinement:
issue017/task029supersede the point-driven boundary portion oftask028. The persistent natural-suffix boundary belongs to the latest source edit; transient point motion is display read-only. - Later Refinement:
issue019/task031supersede immediate whole-hard-line replanning after every edit. The plan remains authoritative at structural commits; stable same-row editing is owned by a saved committed projection and local dirty transaction. - Verification:
- Public-path and edge-case ERT pass in the 181-test default suite, the
seed-
20260729suite, and 181 isolated Emacs processes. C/Elisp fuzz passes 300/300. - Warning-as-error compilation, checkdoc, the CI-pinned package-lint, release, dictionary, pinned-source, no-overlay, and source-clean gates pass.
- The main dynamic GUI run
/private/tmp/ekp-semantic-live-v4-vFZTkrexercises typing, deletion, backward/forward point motion, yank, real undo, narrow/restore resize, and hard newline. Its 38 checkpoints have exact source text, zero overlays,hscroll=0, no pending transaction, no failed assertion, and a reviewed temporal verdict of PASS. - The 44-column split-window run
/private/tmp/ekp-semantic-split-v3-uPwuOiproves native incremental soft wrapping, one semantic projected prefix line, a natural active line, exact source text, zero overlays,hscroll=0, clean disable, and a reviewed temporal verdict of PASS. - A subsequent task029 audit could not reproduce the original 6.399 ms
append p99 with the current checked-in benchmark. At its synthetic
80-pixel width, repeated GC-excluded runs instead record one plan per
unique append and roughly 33–85 ms p99.
issue018/task030track this separate performance debt. Point motion remains a zero-work path at about 0.03 ms p99. - Final independent code review returns APPROVE; independent architecture review returns CLEAR. Both reviewed the latest font-context invalidation delta.
- Public-path and edge-case ERT pass in the 181-test default suite, the
seed-
- User Confirmation: Pending. Keep this issue open until the user personally confirms the delivered editing behavior.
- Resolved At: Unresolved.
- Resolved By: Pending.
- Commit: Pending.