Commit Graph

8 Commits

Author SHA1 Message Date
b83a061322 patches: review fixes — eassert, blank lines, Texinfo doc
- nsterm.m: Remove 2 stray blank lines at start of
  ns_ax_event_is_line_nav_key body
- nsterm.m: Add eassert([NSThread isMainThread]) to ensureTextCache
  for explicit main-thread contract enforcement
- New 0002 patch: Texinfo section in doc/emacs/macos.texi documenting
  VoiceOver accessibility, Zoom tracking, completion announcements
- README.txt: Updated file listing and patch index
2026-02-27 17:15:18 +01:00
65c799dc3f patches: review fixes — specpdl protection, overlay_modiff tracking, binary search, enum cleanup
M1: accessibilityRangeForPosition uses specpdl unwind protection for
    block_input/unblock_input (consistent with all other methods).
M2: Track BUF_OVERLAY_MODIFF in ensureTextCache — overlay-only changes
    (timer-based completion highlight) now invalidate the text cache.
M3: Detect narrowing/widening by comparing cachedTextStart vs BUF_BEGV.
m1: Binary search (O(log n)) for visible runs in both
    accessibilityIndexForCharpos and charposForAccessibilityIndex.
m3: Add EmacsAXSpanTypeNone = -1 to enum instead of (EmacsAXSpanType)-1 cast.
m5: Add TODO comment in ns_ax_mode_line_text about non-CHAR_GLYPH limitation.
README: Remove resolved overlay_modiff limitation, document binary search
    and narrowing detection, update architecture section.
2026-02-27 16:56:05 +01:00
765725aaef patches: fix review B1/W1-5 — unwind protection, dealloc leak, DEFSYM nav, lineRange, buffer validation, select-window
B1: setAccessibilitySelectedTextRange: — add record_unwind_protect_void(unblock_input)
    before block_input to prevent permanently blocked input if Fset_marker signals.
W1: EmacsAccessibilityInteractiveSpan — add -dealloc releasing spanLabel/spanValue
    (MRC copy properties leaked on every span rebuild cycle).
W2: ns_ax_event_is_line_nav_key — replace 8x intern_c_string with DEFSYM'd symbols
    (Qns_ax_next_line etc.) to avoid per-cursor-move obarray lookups.
W3: accessibilityRangeForLine: — rewrite from O(n chars) characterAtIndex loop to
    O(lines) lineRangeForRange, matching accessibilityLineForIndex: pattern.
W4: accessibilityChildrenInNavigationOrder — validate buffer before calling
    ns_ax_scan_interactive_spans to prevent Lisp signals in dispatch_sync context.
W5: EmacsAccessibilityBuffer setAccessibilityFocused: — add Fselect_window so
    VoiceOver focus actually switches the Emacs selected window, with proper
    unwind protection for block_input.
2026-02-27 16:38:12 +01:00
936c251f11 patches: comprehensive review fixes — B1/W1-4/M1-4
B1: setAccessibilityFocused: on EmacsAccessibilityBuffer now checks
    ![NSThread isMainThread] and dispatches to main via dispatch_async.
    Prevents data race + AppKit thread violation from AX server thread.

W1: accessibilityInsertionPointLineNumber and accessibilityLineForIndex:
    now use lineRangeForRange iteration — O(lines) instead of O(chars).

W2: ns_ax_scan_interactive_spans skips non-interactive regions using
    Fnext_single_property_change for each scannable property and
    Fnext_single_char_property_change for keymap overlays.

W3: ns_ax_event_is_line_nav_key inspects Vthis_command against known
    navigation command symbols (next-line, previous-line, evil variants,
    dired variants) instead of raw key codes. Tab/backtab fallback
    retained via last_command_event.

W4: DEFSYM symbols renamed with ns_ax_ prefix (Qns_ax_button, etc.)
    to avoid linker collisions with other Emacs source files.
    Lisp symbol strings unchanged.

M3: Removed dead enum values (CheckBox, TextField, PopUpButton) and
    corresponding dead switch cases.

M4: Improved accessibilityStyleRangeForIndex: comment documenting the
    line-granularity simplification.

README: Updated stats, KNOWN LIMITATIONS, DEFSYM docs, test numbering.
2026-02-27 16:14:47 +01:00
60e9ea2c59 patches: update README — document async notification posting
Add deadlock prevention section to THREADING MODEL, note async
posting in NOTIFICATION STRATEGY, add design decision 6a, and
add deadlock regression test case (#24) to testing checklist.
2026-02-27 15:44:22 +01:00
d29a33fcfb fix: add missing 'static BOOL' return type to ns_ax_find_completion_overlay_range
The function definition lacked a return type, causing:
  nsterm.m:7149:1: error: a type specifier is required for all declarations

Added 'static BOOL' — the function returns YES/NO and is file-scoped.
Updated patch line counts in header and README accordingly.
2026-02-27 15:21:47 +01:00
0b43fd25e3 patches: review fixes — memory leak, dead code, unwind-protect, protocol conformance
B1: Fix memory leak in ns_ax_scan_interactive_spans — [spans copy]
    returned +1 retained object never released by caller.
    Now returns [[spans copy] autorelease].

B2: Remove dead function ns_ax_utf16_length_for_buffer_range —
    defined but never called anywhere in the patch.

B3: Add specpdl unwind protection in
    EmacsAccessibilityInteractiveSpan setAccessibilityFocused: —
    if Fselect_window signals, block_input is now always matched
    by unblock_input via record_unwind_protect_void.

W2: Document ns_ax_event_is_line_nav_key fragility in README
    Known Limitations (raw keycodes vs command symbols).

W4: Add comment for #include intervals.h (TEXT_PROP_MEANS_INVISIBLE).

M3: accessibilityBoundsForRange: on EmacsView now delegates to the
    focused EmacsAccessibilityBuffer for accurate per-range geometry,
    with cursor-rect fallback for Zoom.

M4: Add <NSAccessibility> protocol conformance to
    EmacsAccessibilityBuffer @interface declaration.

W1: Expanded commit message listing all new types, functions, DEFSYM
    additions, and threading model.
2026-02-27 15:12:40 +01:00
4eb370f6f0 patches: add README.txt — full VoiceOver architecture documentation
QA PASS 93.2/100. Covers: architecture, threading model, notification
strategy, text cache, completion announcements, interactive spans,
Zoom integration, design decisions, known limitations, testing checklist.
2026-02-27 13:59:08 +01:00