The renderer (shared by both engines) is now lossless: synthesized glue carries the original text it replaced (ekp-glue), soft line breaks carry the whitespace swallowed around the break (ekp-soft-break), break hyphens are marked (ekp-soft-hyphen), and paragraph-edge whitespace survives as zero-display ekp-hidden text. Orphaned ekp--combine-glues-and-boxes / ekp--interleave removed. New ekp-region.el: - ekp-justify-region / ekp-unjustify-region: in-place justification with exact structural restore (character- and property-exact), robust to edits made while justified - ekp-auto-justify-mode: keeps the buffer justified at the window width; debounced re-flow on window resize, incremental per-paragraph re-justification after edits (served by the paragraph cache) - fix found in live GUI testing: buffer-local members of window-size-change-functions receive the WINDOW as argument and may run with an unrelated buffer current; the handler now resolves window and buffer explicitly (regression test included) Tests: 47 ERT (36 core + 11 region) passing; 300-case fuzz 0 failures (C/elisp parity unchanged); byte-compile clean with error-on-warn. Verified interactively in GUI Emacs: justified at 1403px maximized, auto-reflowed to 614px on frame resize. docs: interactive-use section in readme.md / readme_zh.md ci: byte-compile list includes ekp-region.el Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
54 lines
1.8 KiB
YAML
54 lines
1.8 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
test:
|
|
name: elisp-only (Emacs ${{ matrix.emacs-version }})
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
# 29.1 is the declared floor (Package-Requires); 30.1 is current stable
|
|
emacs-version: ['29.1', '30.1']
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: purcell/setup-emacs@master
|
|
with:
|
|
version: ${{ matrix.emacs-version }}
|
|
- name: Byte-compile (warnings are errors)
|
|
run: |
|
|
emacs -Q --batch -L . \
|
|
--eval '(setq byte-compile-error-on-warn t)' \
|
|
-f batch-byte-compile ekp.el ekp-utils.el ekp-hyphen.el ekp-region.el
|
|
- name: Run ERT suite (C-module tests auto-skip)
|
|
run: tests/run-tests.sh emacs
|
|
|
|
test-c-module:
|
|
name: full suite + C parity (apt Emacs)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install Emacs
|
|
run: sudo apt-get update && sudo apt-get install -y emacs-nox
|
|
- name: Ensure emacs-module.h is findable
|
|
run: |
|
|
if [ ! -e /usr/include/emacs-module.h ]; then
|
|
HDR=$(dpkg -L emacs-common emacs-bin-common 2>/dev/null | grep -m1 '/emacs-module\.h$' || true)
|
|
[ -n "$HDR" ] || HDR=$(sudo find /usr -name emacs-module.h 2>/dev/null | head -1)
|
|
test -n "$HDR" || { echo 'emacs-module.h not found'; exit 1; }
|
|
sudo install -m 644 "$HDR" /usr/local/include/
|
|
fi
|
|
- name: Build C module
|
|
run: make -C ekp_c
|
|
- name: Run ERT suite (with C module)
|
|
run: tests/run-tests.sh emacs
|
|
- name: Property fuzz (300 cases, C vs elisp parity)
|
|
run: emacs -Q --batch -L . -l tests/ekp-fuzz.el
|