Ghostel.el: Terminal emulator powered by libghostty

Ghostel.el: Terminal emulator powered by libghostty

Ghostel is an Emacs terminal emulator powered by libghostty-vt - the same VT engine that drives the Ghostty terminal. A native dynamic module written in Zig handles terminal state, rendering, and local PTY I/O; Elisp manages keymaps, buffers, commands, and remote process integration.

Ghostel 是一个由 libghostty-vt 驱动的 Emacs 终端模拟器,该引擎也是 Ghostty 终端的核心。它使用由 Zig 编写的本地动态模块来处理终端状态、渲染和本地 PTY I/O;而 Elisp 则负责管理键位映射、缓冲区、命令以及远程进程集成。

Ghostel is inspired by emacs-libvterm and follows the same two-layer design, but uses Ghostty’s modern VT engine instead of libvterm. This brings the Kitty keyboard and graphics protocols, rich underline styles, OSC 8 hyperlinks, OSC 4/10/11 color queries, and synchronized output (DEC 2026) - none of which libvterm supports. See Ghostel vs vterm and eat for a detailed comparison.

Ghostel 的灵感来源于 emacs-libvterm,并遵循相同的双层设计,但它使用 Ghostty 现代化的 VT 引擎取代了 libvterm。这带来了 Kitty 键盘和图形协议、丰富的下划线样式、OSC 8 超链接、OSC 4/10/11 颜色查询以及同步输出(DEC 2026)等功能——这些都是 libvterm 所不支持的。详细对比请参阅“Ghostel 与 vterm 及 eat 的比较”。

The native module is downloaded automatically on first use, so no toolchain is required for the common case. Open a terminal with M-x ghostel.

原生模块会在首次使用时自动下载,因此在一般情况下无需配置工具链。使用 M-x ghostel 即可打开终端。


Table of Contents / 目录

  1. Quick Start / 快速入门 1.1. Shell integration at a glance / Shell 集成概览 1.2. Input modes at a glance / 输入模式概览
  2. Requirements / 系统要求
  3. Installation / 安装 3.1. MELPA 3.2. use-package with :vc (Emacs 30+) 3.3. use-package with :load-path 3.4. Manual / 手动安装 3.5. Native module / 原生模块 3.6. Platform notes / 平台说明 3.6.1. Windows
  4. Building from source / 从源码构建 4.1. Bundled terminfo / 捆绑的 terminfo
  5. Shell integration / Shell 集成
  6. Input modes / 输入模式 6.1. Mode-switch keybindings / 模式切换快捷键 6.2. Semi-char mode (default) / 半字符模式(默认) 6.3. Char mode / 字符模式 6.4. Emacs mode / Emacs 模式 6.5. Copy mode / 复制模式 6.6. Mouse selection / 鼠标选择 6.7. Line mode / 行模式 6.8. Scrollback search outside copy mode / 非复制模式下的回滚搜索
  7. Features / 功能特性 7.1. Terminal emulation / 终端模拟 7.2. Process model / 进程模型 7.3. Bookmarks / 书签 7.4. Links and file detection / 链接与文件检测 7.5. Clipboard / 剪贴板 7.6. Input / 输入 7.7. Password prompt detection / 密码提示检测 7.8. Shell integration features / Shell 集成特性 7.9. Rendering / 渲染 7.10. Inline images (Kitty graphics protocol) / 内联图像(Kitty 图形协议) 7.10.1. Limitations / 局限性 7.11. Calling Elisp from the shell / 从 Shell 调用 Elisp 7.12. Notifications and progress / 通知与进度 7.13. Color palette / 调色板
  8. TRAMP (Remote Terminals) / TRAMP(远程终端) 8.1. Remote shell integration / 远程 Shell 集成 8.1.1. Option 1: Automatic injection / 选项 1:自动注入 8.1.2. Option 2: Manual setup / 选项 2:手动设置 8.2. Remote xterm-ghostty terminfo 8.2.1. TRAMP-launched ghostel 8.2.2. Outbound ssh from a local ghostel buffer / 从本地 ghostel 缓冲区发起 SSH 8.2.3. Manual install / 手动安装 8.2.4. Drop the Ghostty advertisement entirely / 完全移除 Ghostty 广告
  9. Configuration / 配置
  10. Extensions / 扩展
  11. Commands / 命令
  12. Running tests / 运行测试
  13. Performance / 性能
  14. Ghostel vs vterm and eat / Ghostel 与 vterm 及 eat 的对比
  15. Architecture / 架构
  16. Contributing / 贡献
  17. Changelog / 更新日志
  18. License / 许可证
  19. Indices / 索引