HeadlinesBriefing favicon HeadlinesBriefing.com

Ghostel.el Brings Ghostty VT Engine to Emacs

Hacker News •
×

Ghostel.el introduces a new terminal emulator for Emacs built on libghostty-vt, the same VT engine powering the standalone Ghostty terminal. A native Zig module handles terminal state, rendering, and local PTY I/O, while Elisp manages keymaps, buffers, and remote process integration via TRAMP. This two-layer architecture mirrors emacs-libvterm but swaps libvterm for Ghostty's modern engine, delivering features libvterm lacks: the Kitty graphics protocol for inline images, Kitty keyboard protocol, rich underline styles, OSC 8 hyperlinks, OSC 4/10/11 color queries, and synchronized output (DEC 2026). The native module downloads automatically on first use, requiring no toolchain for most users.

The emulator ships with five eat.el-style input modes — semi-char (default), char, Emacs, copy, and line — plus mouse selection and scrollback search outside copy mode. Shell integration enables automatic directory tracking and prompt navigation for local bash, zsh, and fish sessions, with TRAMP support for remote hosts via automatic injection or manual setup. Extensions integrate with evil-mode, compilation-mode (including live mode switching), Eshell, and Comint. Users can call Elisp functions from the shell through a whitelisted command mechanism, and password prompts are detected automatically.

Performance benchmarks show the native PTY path outperforming Emacs' built-in PTY handling, with burst absorption tested against a 10 MB cat output and typing latency measurements documented. The comparison table against vterm and eat highlights Ghostel's protocol support advantage, though vterm retains broader platform maturity. The renderer owns buffer position preservation, avoiding semantic patching in Elisp during redraws — a design choice that reduces flicker and improves scrollback stability.