Bending Emacs - Episode 6: Overlays
4 points by xenodium
4 points by xenodium
i once spent an inordinate amount of time trying to optimize beacon.el (once i'd gotten it to play nice with collapsed org-mode headers). i was desperate for a way to get pixel-perfect information about windows/frames/lines/point without eg. creating excess overlays (keeping a pool?), paying to populate the whole data-structure returned by position-at-point -- in practice, caching to the maximum extent. Custom blending modes was fun. But it got hairy for a bunch of reasons!
xdisp.c). I thought anything was possible with elisp? /joverlay, display, and composition) can change how regions are rendered, and i think each of those 3 can replace a region with new text that has it's own properties, which may or may not allow nesting.Every time I see someone using beacon afk i promise myself i'll find my old checkout(s), straighten them out, build vm/snapshot tests, and publish it, but i'm not sure i will >u< Might try re-writing it an 8th+ time as a C "extension" though, for speed and robustness
i usually tell this story to poke fun at the limits of elisp