<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kitty-graphics/kitty-graphics.el, branch experiment/pre-redisplay-functions</title>
<subtitle></subtitle>
<id>http://git.cashmere.rs/kitty-graphics/atom/kitty-graphics.el?h=experiment%2Fpre-redisplay-functions</id>
<link rel='self' href='http://git.cashmere.rs/kitty-graphics/atom/kitty-graphics.el?h=experiment%2Fpre-redisplay-functions'/>
<link rel='alternate' type='text/html' href='http://git.cashmere.rs/kitty-graphics/'/>
<updated>2026-03-10T11:10:44Z</updated>
<entry>
<title>experiment: add pre-redisplay-functions as alternative refresh trigger</title>
<updated>2026-03-10T11:10:44Z</updated>
<author>
<name>cashmere</name>
<email>cashmere@autistici.org</email>
</author>
<published>2026-03-10T11:10:44Z</published>
<link rel='alternate' type='text/html' href='http://git.cashmere.rs/kitty-graphics/commit/?id=007e9081b5333ae5fa91b22d85d7c3359b3e5e12'/>
<id>urn:sha1:007e9081b5333ae5fa91b22d85d7c3359b3e5e12</id>
<content type='text'>
Add feature flag (kitty-gfx-use-pre-redisplay) to compare
post-command-hook vs pre-redisplay-functions as the scheduling
trigger for image refresh. Includes instrumentation counters
(trigger count, skipped count) logged per refresh cycle for
quantitative comparison.

Results: pre-redisplay-functions fires ~36x more often than
post-command-hook for identical user activity (3176 vs 89 refresh
cycles in comparable sessions). Emacs redraws far more often than
users run commands (cursor blink, timers, internal redraws), and
pre-redisplay-functions fires per-window on every redisplay.
The current post-command-hook approach remains superior.
</content>
</entry>
<entry>
<title>feat: robustness overhaul — LRU cache, better error handling, reduced flicker</title>
<updated>2026-02-27T07:29:34Z</updated>
<author>
<name>cashmere</name>
<email>cashmere@autistici.org</email>
</author>
<published>2026-02-27T07:29:34Z</published>
<link rel='alternate' type='text/html' href='http://git.cashmere.rs/kitty-graphics/commit/?id=e8f259d8c03126d548ec28dd9a4bcc41096ab9f9'/>
<id>urn:sha1:e8f259d8c03126d548ec28dd9a4bcc41096ab9f9</id>
<content type='text'>
- LRU image cache with configurable size and eviction (kitty-gfx-cache-size)
- Cache stores only image IDs; dimensions computed fresh each time
- Leading-edge debounce for faster initial refresh response
- Targeted placement deletion on buffer/window change (no more delete-all flicker)
- Cell pixel size re-queried on window resize
- Image overflow check prevents visual corruption at window bottom
- convert-to-png returns nil on failure instead of passing non-PNG data
- unwind-protect for temp file cleanup in display-image paths
- kill-buffer-hook checks cross-buffer image sharing before deleting
- ignore-errors around all send-string-to-terminal calls
- Millisecond-precision debug logging throughout
- Dead overlay pruning in refresh cycle
- GIF removed from supported formats (multi-frame issues)
- Window-size-change hook in image-mode for split/unsplit re-render
</content>
</entry>
<entry>
<title>chore: update URL to GitHub repository</title>
<updated>2026-02-27T02:58:22Z</updated>
<author>
<name>cashmere</name>
<email>cashmere@autistici.org</email>
</author>
<published>2026-02-27T02:58:22Z</published>
<link rel='alternate' type='text/html' href='http://git.cashmere.rs/kitty-graphics/commit/?id=f7bd1f752f40b4607813835c7e9ac0311c58097b'/>
<id>urn:sha1:f7bd1f752f40b4607813835c7e9ac0311c58097b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fix: image-mode compatibility with evil-mode and centered image positioning</title>
<updated>2026-02-26T10:25:49Z</updated>
<author>
<name>cashmere</name>
<email>cashmere@autistici.org</email>
</author>
<published>2026-02-26T10:25:49Z</published>
<link rel='alternate' type='text/html' href='http://git.cashmere.rs/kitty-graphics/commit/?id=1d6cbdc79b6152064d4306de2e0ef4af6b91533c'/>
<id>urn:sha1:1d6cbdc79b6152064d4306de2e0ef4af6b91533c</id>
<content type='text'>
- Use kitty-gfx-image-mode major-mode to avoid evil-collection overriding
  zoom keybindings with native image functions that fail in terminal
- Add evil normal-state bindings for +/=/-/0/q when evil is loaded
- Use special-mode-map as parent instead of image-mode-map to prevent
  image-mode-window-put and image--change-size errors
- Fix centered image column calculation: detect when posn-col-row is
  inflated by overlay display properties and fall back to body-left
- Clear buffer-modified-p after image-mode renders
- Add debug logging to centered display and image-mode-render paths
</content>
</entry>
<entry>
<title>feat: add image-mode centering and zoom controls</title>
<updated>2026-02-26T09:22:06Z</updated>
<author>
<name>cashmere</name>
<email>cashmere@autistici.org</email>
</author>
<published>2026-02-26T09:22:06Z</published>
<link rel='alternate' type='text/html' href='http://git.cashmere.rs/kitty-graphics/commit/?id=23170c89bb32325ed9d64ba21dcf5e265e93e8f9'/>
<id>urn:sha1:23170c89bb32325ed9d64ba21dcf5e265e93e8f9</id>
<content type='text'>
Images in image-mode now display centered in the window with
+/-/0 keybindings for zoom in/out/reset.

- Add kitty-gfx--image-scale buffer-local variable
- Add kitty-gfx--image-mode-render for centered display at scale
- Add kitty-gfx-image-increase-size (1.25x per press)
- Add kitty-gfx-image-decrease-size (0.8x per press)
- Add kitty-gfx-image-reset-size (back to 1.0)
- Bind +/-/0 in the image-mode keymap
</content>
</entry>
<entry>
<title>feat: add doc-view integration for PDF viewing with zoom</title>
<updated>2026-02-26T09:21:26Z</updated>
<author>
<name>cashmere</name>
<email>cashmere@autistici.org</email>
</author>
<published>2026-02-26T09:21:26Z</published>
<link rel='alternate' type='text/html' href='http://git.cashmere.rs/kitty-graphics/commit/?id=fec2c3be44f3aff47e052fd8ff6e17114edeb74c'/>
<id>urn:sha1:fec2c3be44f3aff47e052fd8ff6e17114edeb74c</id>
<content type='text'>
PDFs now render via Kitty graphics in terminal doc-view-mode.
Pages display centered in the window with n/p navigation and
+/-/0 zoom controls.

- Advise doc-view-mode-p to bypass display-graphic-p guard
  while preserving per-type tool availability checks
- Advise doc-view-insert-image to render pages via Kitty
  using the centered display helper with zoom scale
- Advise doc-view-enlarge and doc-view-scale-reset to update
  the buffer-local scale factor and re-render
</content>
</entry>
<entry>
<title>feat: add centered display helper, bump default sizes, relax refresh</title>
<updated>2026-02-26T09:20:00Z</updated>
<author>
<name>cashmere</name>
<email>cashmere@autistici.org</email>
</author>
<published>2026-02-26T09:20:00Z</published>
<link rel='alternate' type='text/html' href='http://git.cashmere.rs/kitty-graphics/commit/?id=021253c4c70b4c99a0c889a03bd1fa01abe2ca9b'/>
<id>urn:sha1:021253c4c70b4c99a0c889a03bd1fa01abe2ca9b</id>
<content type='text'>
- Add kitty-gfx--display-image-centered: centers images in the
  window with optional zoom scale parameter for full-window modes
- Bump kitty-gfx-max-width 80-&gt;120, kitty-gfx-max-height 24-&gt;40
- Relax refresh visibility check to only require overlay start
  on screen (allows images larger than window for zoom-in)
</content>
</entry>
<entry>
<title>feat: add LaTeX fragment preview in org-mode via Kitty graphics</title>
<updated>2026-02-26T09:18:42Z</updated>
<author>
<name>cashmere</name>
<email>cashmere@autistici.org</email>
</author>
<published>2026-02-26T09:18:42Z</published>
<link rel='alternate' type='text/html' href='http://git.cashmere.rs/kitty-graphics/commit/?id=b60fcceb5be147e7ec6237935aed8e5879fd1f75'/>
<id>urn:sha1:b60fcceb5be147e7ec6237935aed8e5879fd1f75</id>
<content type='text'>
C-c C-x C-l now renders LaTeX fragments as images in terminal Emacs.
Bypasses org's display-graphic-p guard since the latex+dvipng pipeline
works fine without a GUI.

- Advise org-latex-preview to handle terminal color fallbacks
  (unspecified-fg -&gt; Black) and suppress clear-image-cache
- Advise org--make-preview-overlay to display generated PNGs via
  kitty-gfx-display-image instead of Emacs image specs
- Add kitty-gfx--org-clear-latex-preview for C-u cleanup
- Add LaTeX test fragments to test-kitty-gfx.org
</content>
</entry>
<entry>
<title>fix: hide images when org headings are collapsed</title>
<updated>2026-02-26T09:17:11Z</updated>
<author>
<name>cashmere</name>
<email>cashmere@autistici.org</email>
</author>
<published>2026-02-26T09:17:11Z</published>
<link rel='alternate' type='text/html' href='http://git.cashmere.rs/kitty-graphics/commit/?id=b2398257cd020ba4ce00a44cf30c0cd362a067b6'/>
<id>urn:sha1:b2398257cd020ba4ce00a44cf30c0cd362a067b6</id>
<content type='text'>
Add fold-aware visibility detection so images disappear when their
containing heading is folded and reappear when expanded.

- Add kitty-gfx--in-folded-region-p: checks org-fold (9.6+) then
  falls back to overlay-based invisibility, ignoring cosmetic
  org-link bracket hiding
- Update kitty-gfx--overlay-screen-pos to skip folded overlays
- Add kitty-gfx--on-org-cycle hook: deletes terminal placements
  before clearing cache, then schedules refresh
</content>
</entry>
<entry>
<title>feat: Add README.org and kitty-graphics.el</title>
<updated>2026-02-24T04:57:29Z</updated>
<author>
<name>cashmere</name>
<email>cashmere@autistici.org</email>
</author>
<published>2026-02-24T04:46:44Z</published>
<link rel='alternate' type='text/html' href='http://git.cashmere.rs/kitty-graphics/commit/?id=c9ddca60818ab2e3853a42cd5bb90ff6360d1f11'/>
<id>urn:sha1:c9ddca60818ab2e3853a42cd5bb90ff6360d1f11</id>
<content type='text'>
</content>
</entry>
</feed>
