PALE, Canvas, and Stuff demos

~1450 words. ~7 minutes.

tags: emacs demos programming

Table of Contents

The various demos relating this were seriously getting out of hand. I hope to properly demo them, and provide some background.

I will try to keep improving and updating this page regularly.

In-tree PALE days (tiling)

PALE stands for “Picture and Animation Library for Emacs”, it grew out of struggles with rendering in Emacs Reader. Wherein quickly changing the page image would lead to memory leaks– the reason for the delay in implementing text-features (like selection and friends). We eventually decided that ‘tiling’ that is, dividing the page into smaller images would be a good solution, (though we ended up finding an easier to implement solution later).

PALE rendering a bouncing square.
PALE rendering gradient animations
Pale rendering 20 bouncing squares inside an Emacs buffer.
Emacs playing the video of RMS singing the hacker song using PALE.

Separate PALE repository (tiling)

Divya was so excited by PALE's video playing that he just extracted PALE into a separate repository.

PALE rendering smooth in 30 FPS without major flickering.
bad apple video playing in an emacs buffer.

Canvas API

Minad (Daniel Mandler) saw Divya's posts, and basically said,

wow, that is so much work, actually I had an idea to add a canvas into Emacs long ago, let me just do that: here is a patch.

funny animation with a lot of colored rectangles and emacs logos appearing everywhere, with a red falling star-like streak appearing in the background, chaos.
funny animation with a lot of colored rectangles and emacs logos appearing everywhere, with a red falling star-like streak appearing in the background, chaos. With a FPS counter at around 400 at the bottom (minibuffer).

Minad ported Doom to Emacs.

doom running inside an emacs buffer.
Simple cube rendered by OpenGL inside Emacs

Divya ported SuperTuxKart to Emacs.

SuperTuxKart inside Emacs at 60FPS

PALE

Divya ported PALE to Canvas (no more tiling hacks).

A 1080p video playing inside Emacs
Emacs killing a video being played inside a canvas and yanking it in different buffers.

ob-canvas

Daniel added shaders to org-babel.

Emacs displaying an Org mode buffer with an Org babel block generating an animated graphic.
Emacs with Org Babel rendering via a GL shader
Hypnomacs

Author: tusharhero

emailreplace [at] with @, and put the domain for username, and vice versa: sdf.org [at] tusharhero

© tusharhero 2024-2025, check licenses page for details.

Date: 2026-02-17 Tue 17:42

Emacs 31.0.50 (Org mode 9.7.11)