Files
emacs-doom/patches/0001-ns-add-accessibility-base-classes-and-text-extractio.patch
Daneel d6fc21f975 patches: fix Zoom, j/k line-read, fold/unfold, C-n/C-p (regression fixes)
Four regressions introduced during review-based refactoring:

1. ZOOM FOCUS JUMPING (P0008 fix in P0000 scope):
   ns_accessibility_enabled guard was added to ns_zoom_track_completion,
   ns_update_end fallback, and ns_draw_window_cursor.  Zoom works
   independently of VoiceOver; ns_accessibility_enabled is only set when
   a screen reader (VoiceOver) activates the AT layer.  Users who use
   Zoom without VoiceOver got no cursor tracking at all.
   Fix: remove ns_accessibility_enabled from all three Zoom call sites;
   guard only with ns_zoom_enabled_p() as in the original.

2. j/k (ANY SINGLE-STEP LINE COMMAND) READS ONLY FIRST WORD:
   The code only treated C-n/C-p (isCtrlNP) as sequential line moves.
   All other line-movement commands (evil j/k, outline-next-heading,
   org-next-visible-heading, etc.) were classified as 'discontiguous'
   jumps, causing VoiceOver to re-anchor and read only a word.
   Fix: detect single-step moves structurally via NSString line-range
   adjacency (NSMaxRange(oldLine) == newLine.location for forward,
   NSMaxRange(newLine) == oldLine.location for backward).  Any command
   that moves exactly one line is sequential --- no command-name
   whitelisting needed, no package-specific code.

3. ORG FOLD/UNFOLD NOT REFRESHING VOICEOVER (P0007):
   BUF_CHARS_MODIFF misses text-property changes such as 'invisible
   used by org-fold-core (org >= 29), outline-mode, hideshow-mode.
   Fix: use BUF_MODIFF; cost is acceptable (rebuild only on VoiceOver
   queries at human interaction speed, not at redisplay speed).

4. C-n/C-p DROPPED LINE-READ (P0005):
   FocusedUIElementChanged posted for ALL emacsMovedCursor moves raced
   with AXSelectedTextChanged(granularity=line) and caused VoiceOver
   to drop the line-read.  Fix: skip FocusedUIElementChanged for
   sequential moves (isCtrlNP or singleLineMove).
2026-03-02 21:10:12 +01:00

23 KiB