<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kitty-graphics, branch v0.4.0</title>
<subtitle></subtitle>
<id>http://git.cashmere.rs/kitty-graphics/atom/?h=v0.4.0</id>
<link rel='self' href='http://git.cashmere.rs/kitty-graphics/atom/?h=v0.4.0'/>
<link rel='alternate' type='text/html' href='http://git.cashmere.rs/kitty-graphics/'/>
<updated>2026-04-04T01:57:52Z</updated>
<entry>
<title>docs: v0.4.0 changelog + demo GIFs (kitty + foot/sixel)</title>
<updated>2026-04-04T01:57:52Z</updated>
<author>
<name>cashmere</name>
<email>cashmere@autistici.org</email>
</author>
<published>2026-04-04T01:57:52Z</published>
<link rel='alternate' type='text/html' href='http://git.cashmere.rs/kitty-graphics/commit/?id=7e4faffa32d6f0ef885fceb0a9ecd93b3fe5c43f'/>
<id>urn:sha1:7e4faffa32d6f0ef885fceb0a9ecd93b3fe5c43f</id>
<content type='text'>
Add CHANGELOG.org with full 0.4.0 release notes covering sixel support,
text sizing protocol, agent-shell, and bug fixes. Replace demo GIFs with
backend-specific showcases: kitty.gif (truecolor) and foot.gif (sixel).
</content>
</entry>
<entry>
<title>feat: add inline mpv video playback via Kitty graphics protocol</title>
<updated>2026-04-03T16:13:19Z</updated>
<author>
<name>cashmere</name>
<email>cashmere@autistici.org</email>
</author>
<published>2026-04-03T16:13:19Z</published>
<link rel='alternate' type='text/html' href='http://git.cashmere.rs/kitty-graphics/commit/?id=1d477511816c63e9d2ddb41a68b0f23836c9d07b'/>
<id>urn:sha1:1d477511816c63e9d2ddb41a68b0f23836c9d07b</id>
<content type='text'>
Spawn mpv with --vo=kitty to paint video frames into a terminal
region that Emacs controls. Emacs reserves overlay space and
coordinates mpv's screen position via JSON IPC on scroll/resize.

New public API:
- kitty-gfx-play-video: play video file inline at point
- kitty-gfx-stop-video: stop playback and cleanup
- kitty-gfx-toggle-video: pause/resume

Requires: mpv with --vo=kitty support, Kitty terminal.
Gated behind kitty-gfx-enable-video defcustom (nil by default).
</content>
</entry>
<entry>
<title>fix: text sizing rendering — column guard, CPU optimization, preview mode</title>
<updated>2026-04-02T21:37:13Z</updated>
<author>
<name>cashmere</name>
<email>cashmere@autistici.org</email>
</author>
<published>2026-04-02T21:37:13Z</published>
<link rel='alternate' type='text/html' href='http://git.cashmere.rs/kitty-graphics/commit/?id=dd1e18c9b1a06e6eb0f1c8aef94871f9c9cf2889'/>
<id>urn:sha1:dd1e18c9b1a06e6eb0f1c8aef94871f9c9cf2889</id>
<content type='text'>
Remove hardcoded column-1 guard that broke heading placement with
display-line-numbers-mode and org-indent-mode. Headings were never
placed (placed=0 hidden=37) because posn-at-point returns terminal
columns offset by body-left, not buffer column 1.

CPU optimizations reduce position queries by 86% and heading
placements by 76%:
- Early window-range exit skips posn-at-point for off-screen overlays
- Emitted flag prevents redundant OSC 66 re-emission
- Single fold-check instead of duplicate calls
- Strip text properties to prevent org-modern payload corruption

Add preview mode that temporarily disables conflicting minor modes
(org-modern, org-appear, org-indent, visual-line, olivetti) and
unfolds all headings for clean OSC 66 rendering. Modes are restored
when heading sizes are toggled off.

Add row-based collision detection to prevent overlapping multicell
blocks when adjacent headings occupy the same terminal rows.

Deferred display property shows heading text as fallback until first
successful OSC 66 emission, preventing invisible headings.
</content>
</entry>
<entry>
<title>fix: Sixel backend parity improvements</title>
<updated>2026-03-29T07:07:06Z</updated>
<author>
<name>cashmere</name>
<email>cashmere@autistici.org</email>
</author>
<published>2026-03-29T07:07:06Z</published>
<link rel='alternate' type='text/html' href='http://git.cashmere.rs/kitty-graphics/commit/?id=7691a94d26190324d3f7b6ff22068fa4fc57c121'/>
<id>urn:sha1:7691a94d26190324d3f7b6ff22068fa4fc57c121</id>
<content type='text'>
Close gaps identified in Sixel vs Kitty audit:

- image-mode: mode-name now shows Image[Sixel] or Image[Kitty]
  based on active backend (was hardcoded to Image[Kitty])
- LaTeX preview: docstring updated to reference kitty-graphics
  package name, not Kitty protocol specifically
- sixel-cleanup-all: now erases visible Sixel images from terminal
  cells before cleaning disk/memory state (prevents pixel artifacts
  on mode disable)
- sixel-place: LRU eviction for .six temp files, capped at
  kitty-gfx-cache-size (default 64), oldest evicted on overflow

Remaining by-design differences (protocol limitations, not bugs):
- Sixel re-emits raw pixel data on scroll (no placement IDs)
- Sixel erases by overwriting with spaces (no protocol-level delete)
- Sixel detection is env-var based (no DA1 query yet)
</content>
</entry>
<entry>
<title>fix: skip heading rendering when folded to same visual line</title>
<updated>2026-03-29T06:39:08Z</updated>
<author>
<name>cashmere</name>
<email>cashmere@autistici.org</email>
</author>
<published>2026-03-29T06:39:08Z</published>
<link rel='alternate' type='text/html' href='http://git.cashmere.rs/kitty-graphics/commit/?id=97f0dbc31d9e7eed6ac3ae3300968a3d231270fe'/>
<id>urn:sha1:97f0dbc31d9e7eed6ac3ae3300968a3d231270fe</id>
<content type='text'>
When org folds headings (S-TAB overview mode), the newline after
each heading becomes invisible, causing multiple headings to appear
on the same visual line.  posn-at-point then reports col &gt; 1 for
headings that follow the fold ellipsis of a previous heading.

Placing scaled text at col &gt; 1 causes horizontal drift — headings
rendered mid-line overlapping with fold ellipsis and each other.

Fix: org headings always start at buffer column 0.  If the computed
terminal column is not 1, the heading is in a folded context where
rendering at scale would be wrong.  Skip it (treat as not visible),
erase any previous placement, and let the refresh cycle re-place
it when unfolded.

Root cause identified via debug log analysis showing:
  Before fold: all headings at col=1 (correct)
  After S-TAB: headings at col=21/24 on same row (wrong)
</content>
</entry>
<entry>
<title>fix: use ECH erase + pre-erase pattern from mdfried</title>
<updated>2026-03-29T06:31:03Z</updated>
<author>
<name>cashmere</name>
<email>cashmere@autistici.org</email>
</author>
<published>2026-03-29T06:31:03Z</published>
<link rel='alternate' type='text/html' href='http://git.cashmere.rs/kitty-graphics/commit/?id=11da531e49fca10ac7dab149ac9790d0c5e76bb9'/>
<id>urn:sha1:11da531e49fca10ac7dab149ac9790d0c5e76bb9</id>
<content type='text'>
Replace space-writing erase with ECH escape (\e[NX) which erases
characters at the cursor without moving it — more efficient and
cleaner terminal state.

Changes:
- kitty-gfx--erase-heading-at: new low-level function using ECH,
  disables DECAWM during erase to prevent wrapping artifacts,
  erases all rows of multicell blocks (not just topmost)
- kitty-gfx--erase-heading: now delegates to erase-heading-at
- kitty-gfx--place-heading: pre-erases target area before emitting
  OSC 66, preventing ghost artifacts from partial overwrites

Adapted from mdfried's "erase-character dance" pattern which erases
the full multicell area using ECH before every OSC 66 emission.
</content>
</entry>
<entry>
<title>docs: deep research on OSC 66 implementations</title>
<updated>2026-03-29T06:28:44Z</updated>
<author>
<name>cashmere</name>
<email>cashmere@autistici.org</email>
</author>
<published>2026-03-29T06:28:44Z</published>
<link rel='alternate' type='text/html' href='http://git.cashmere.rs/kitty-graphics/commit/?id=807a7ae4fa4741733f4c1d05b0c42c723439a0cc'/>
<id>urn:sha1:807a7ae4fa4741733f4c1d05b0c42c723439a0cc</id>
<content type='text'>
Comprehensive analysis of 5 OSC 66 implementations:
- mdfried (Rust): erase-character dance, fractional scaling with
  s=2 base, unicode chunking for wide chars, bug history
- neovim#32539: architecture analysis confirming our overlay approach
- render-markdown.nvim#560: ecosystem blocked on neovim core
- opentui (TS+Zig): separator convention, ST vs BEL terminator
- foot!1927 (C): width-only impl, variation selector bugs

Key actionable findings: ECH erase, s=2 fractional tiers,
wide-char chunking, pre-erase before emission.
</content>
</entry>
<entry>
<title>chore: bump to 0.4.0, extend debug-state for headings</title>
<updated>2026-03-29T05:07:11Z</updated>
<author>
<name>cashmere</name>
<email>cashmere@autistici.org</email>
</author>
<published>2026-03-29T05:07:11Z</published>
<link rel='alternate' type='text/html' href='http://git.cashmere.rs/kitty-graphics/commit/?id=71d5c4402248e45eb2c713830dd012d3bd4c9d13'/>
<id>urn:sha1:71d5c4402248e45eb2c713830dd012d3bd4c9d13</id>
<content type='text'>
- Version bump 0.3.0 → 0.4.0 (text sizing feature complete)
- kitty-gfx-debug-state: show text-sizing-support status in header,
  distinguish heading vs image overlays, display heading-specific
  properties (text, scale, level, cell-s) instead of image properties
  (id, pid, file)
</content>
</entry>
<entry>
<title>feat: nuke-and-repaint for fold/unfold heading cleanup</title>
<updated>2026-03-29T05:06:09Z</updated>
<author>
<name>cashmere</name>
<email>cashmere@autistici.org</email>
</author>
<published>2026-03-29T05:06:09Z</published>
<link rel='alternate' type='text/html' href='http://git.cashmere.rs/kitty-graphics/commit/?id=c6e4967b52eacb13360e649cddbaf9afcd6213dc'/>
<id>urn:sha1:c6e4967b52eacb13360e649cddbaf9afcd6213dc</id>
<content type='text'>
Add heading-aware org-cycle handling:

- kitty-gfx--nuke-headings: erases ALL heading multicell blocks
  in the current buffer, clearing their cached positions.  This
  is the "nuke" phase — a clean slate for the terminal.
- kitty-gfx--on-org-cycle: now handles both image and heading
  overlays.  Images get their placements deleted (existing logic),
  headings get their multicell blocks erased (nuke phase).
  The subsequent scheduled refresh is the "repaint" phase:
  kitty-gfx--overlay-screen-pos checks in-folded-region-p, so
  folded headings return nil and won't be re-emitted, while
  visible headings get fresh OSC 66 emission at correct positions.

The nuke-and-repaint strategy avoids incremental erase complexity
(which failed in two prior prototypes) by simply erasing everything
and letting the refresh cycle figure out what's still visible.
</content>
</entry>
<entry>
<title>feat: heading-aware scroll and buffer-change handling</title>
<updated>2026-03-29T04:54:09Z</updated>
<author>
<name>cashmere</name>
<email>cashmere@autistici.org</email>
</author>
<published>2026-03-29T04:54:09Z</published>
<link rel='alternate' type='text/html' href='http://git.cashmere.rs/kitty-graphics/commit/?id=e5ee5bb0e498c66b473e7eecc8c31e29f503d85c'/>
<id>urn:sha1:e5ee5bb0e498c66b473e7eecc8c31e29f503d85c</id>
<content type='text'>
Fix scroll/buffer-switch behavior for heading overlays:

- on-window-change: preserve heading overlay position caches
  (images clear theirs for re-placement, but headings need
  old→new comparison to erase multicell blocks properly)
- on-buffer-change: erase heading multicell blocks when their
  buffer becomes hidden, preventing ghost artifacts if the new
  buffer's content doesn't fully overwrite the heading cells
- on-buffer-change: preserve heading caches for visible buffers
  (same rationale as on-window-change)

The existing two-phase refresh already handles scroll correctly:
phase 1 detects position changes and erases moved headings,
phase 2 re-emits all visible headings.  These fixes ensure the
cache state is correct for that comparison to work.
</content>
</entry>
</feed>
