From 6a9ec62ec621e982a7122425b92b874c9fea2587 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Fri, 26 Jun 2026 00:04:15 -0400 Subject: refactor(term): retire ghostel, migrate copy-mode and tmux-history to eat-config Complete the EAT consolidation by removing ghostel. ai-term and F12 already run on EAT, so ghostel's only remaining users were the dashboard launcher and term-config itself. Migrate the terminal-generic pieces into eat-config: the tmux copy-mode (C- enters it, the same UX and keybinding as before, since agents run EAT over tmux) and the tmux-history capture, swapping ghostel-send-string for a pty write and the mode checks to eat-mode. Repoint the dashboard "Launch Terminal" to the eshell/EAT toggle, swap the face-diagnostic terminal-mode check to eat-mode, and refresh auto-dim's comment. Delete term-config.el and its init require. EAT's default semi-char non-bound-keys already lets windmove, buffer-move, and the Emacs essentials reach the terminal. Tests retargeted; the obsolete ghostel-keymap-exceptions tests are dropped. --- tests/test-term-config--f8-in-term.el | 42 ----------------------------------- 1 file changed, 42 deletions(-) delete mode 100644 tests/test-term-config--f8-in-term.el (limited to 'tests/test-term-config--f8-in-term.el') diff --git a/tests/test-term-config--f8-in-term.el b/tests/test-term-config--f8-in-term.el deleted file mode 100644 index 6cee4ff46..000000000 --- a/tests/test-term-config--f8-in-term.el +++ /dev/null @@ -1,42 +0,0 @@ -;;; test-term-config--f8-in-term.el --- F8 reaches Emacs from inside a ghostel buffer -*- lexical-binding: t; -*- - -;;; Commentary: -;; is a global binding (`cj/main-agenda-display', set in org-agenda-config). -;; ghostel's semi-char mode forwards every key NOT in `ghostel-keymap-exceptions' -;; to the terminal program, so a plain typed while point is in a ghostel -;; buffer would be sent to the program instead of opening the agenda. Unlike the -;; F9 family, F8 is NOT re-bound in `ghostel-mode-map' -- it simply falls through -;; to the global map once the semi-char map stops forwarding it, so the only -;; wiring term-config.el adds is the keymap-exceptions entry plus the rebuild. -;; These tests require ghostel (so term-config's `with-eval-after-load' fires) -;; BEFORE term-config, then confirm the exception landed and the rebuilt -;; semi-char map no longer forwards . `(require 'ghostel)' does not load the -;; native module, so this stays light. - -;;; Code: - -(require 'ert) -(require 'package) - -(setq package-user-dir (expand-file-name "elpa" user-emacs-directory)) -(package-initialize) -(add-to-list 'load-path (expand-file-name "modules" user-emacs-directory)) -(require 'ghostel) -(require 'term-config) - -(ert-deftest test-term-config-f8-in-keymap-exceptions () - "Regression: is in `ghostel-keymap-exceptions' so semi-char mode lets it -reach Emacs instead of forwarding it to the terminal program. This is what lets -the global agenda binding work from inside a ghostel buffer." - (should (member "" ghostel-keymap-exceptions))) - -(ert-deftest test-term-config-f8-not-forwarded-by-semi-char-map () - "Regression: the rebuilt semi-char map must no longer forward to the pty. -`add-to-list' updates the exceptions list but not the already-built map -- only -`ghostel--rebuild-semi-char-keymap' (run in term-config's :init) drops the -forwarding binding so falls through to the global agenda command." - (should-not (eq (keymap-lookup ghostel-semi-char-mode-map "") - 'ghostel--send-event))) - -(provide 'test-term-config--f8-in-term) -;;; test-term-config--f8-in-term.el ends here -- cgit v1.2.3