From eb4aa232836f069ca671c6651a0e2f5dff4f7c34 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Fri, 26 Jun 2026 05:10:29 -0400 Subject: refactor(term): finish ghostel retirement (phase 5) Remove the dead ghostel app from theme-studio: the GHOSTEL_FACES/SEED data, the registry row, the renderGhostelPreview previewer, and the package_seed test, then regenerate the tool. ansi-color stays since eat inherits it. Rename testutil-ghostel-buffers to testutil-terminal-buffers and drop make-fake-ghostel-buffer; the toggle-filter test now uses the eat fixture, since agents are eat. Fix the comments that still called the agent buffers ghostel (they're eat now) in eat-config and the ai-term and auto-dim test docstrings. I also package-deleted the unused ghostel ELPA package. Full suite green; the remaining ghostel mentions are accurate migration history. --- scripts/theme-studio/app.js | 2 +- scripts/theme-studio/face_data.py | 23 +++++------------------ scripts/theme-studio/previews.js | 10 +--------- scripts/theme-studio/test_generate.py | 1 - scripts/theme-studio/theme-studio.html | 14 +++----------- 5 files changed, 10 insertions(+), 40 deletions(-) (limited to 'scripts') diff --git a/scripts/theme-studio/app.js b/scripts/theme-studio/app.js index 2f26e138a..bcba9c4c7 100644 --- a/scripts/theme-studio/app.js +++ b/scripts/theme-studio/app.js @@ -558,7 +558,7 @@ function buildPkgTable(){ PREVIEWS_J const PACKAGE_PREVIEWS={ autodim:renderAutodimPreview,markdown:renderMarkdownPreview, - org:renderOrgPreview,magit:renderMagitPreview,elfeed:renderElfeedPreview,ghostel:renderGhostelPreview,eat:renderEatPreview, + org:renderOrgPreview,magit:renderMagitPreview,elfeed:renderElfeedPreview,eat:renderEatPreview, dashboard:renderDashboardPreview,mu4e:renderMu4ePreview,gnus:renderGnusPreview,orgfaces:renderOrgFacesPreview,lsp:renderLspPreview,gitgutter:renderGitGutterPreview, flycheck:renderFlycheckPreview,dired:renderDiredPreview,dirvish:renderDirvishPreview,calibredb:renderCalibredbPreview, erc:renderErcPreview,orgdrill:renderOrgdrillPreview,orgnoter:renderOrgnoterPreview,signel:renderSignelPreview, diff --git a/scripts/theme-studio/face_data.py b/scripts/theme-studio/face_data.py index 56a660b82..f149c5441 100644 --- a/scripts/theme-studio/face_data.py +++ b/scripts/theme-studio/face_data.py @@ -131,18 +131,6 @@ ELFEED_SEED={ "elfeed-log-date-face":{"fg":"steel"},"elfeed-log-error-level-face":{"fg":"terracotta","bold":True}, "elfeed-log-warn-level-face":{"fg":"gold"},"elfeed-log-info-level-face":{"fg":"sage"}, "elfeed-log-debug-level-face":{"fg":"pewter"}} -# ghostel (terminal): the 16 ANSI colors plus default and the fake cursor. -GHOSTEL_FACES=("ghostel-default ghostel-fake-cursor ghostel-fake-cursor-box " - "ghostel-color-black ghostel-color-red ghostel-color-green ghostel-color-yellow " - "ghostel-color-blue ghostel-color-magenta ghostel-color-cyan ghostel-color-white " - "ghostel-color-bright-black ghostel-color-bright-red ghostel-color-bright-green ghostel-color-bright-yellow " - "ghostel-color-bright-blue ghostel-color-bright-magenta ghostel-color-bright-cyan ghostel-color-bright-white").split() -GHOSTEL_SEED={ - "ghostel-default":{"fg":"#cdced1"},"ghostel-fake-cursor":{"fg":"#000000","bg":"silver"},"ghostel-fake-cursor-box":{"fg":"silver"}, - "ghostel-color-black":{"fg":"pewter"},"ghostel-color-red":{"fg":"terracotta"},"ghostel-color-green":{"fg":"emerald"},"ghostel-color-yellow":{"fg":"gold"}, - "ghostel-color-blue":{"fg":"blue"},"ghostel-color-magenta":{"fg":"regal"},"ghostel-color-cyan":{"fg":"sage"},"ghostel-color-white":{"fg":"silver"}, - "ghostel-color-bright-black":{"fg":"steel"},"ghostel-color-bright-red":{"fg":"#de4949"},"ghostel-color-bright-green":{"fg":"#84b068"},"ghostel-color-bright-yellow":{"fg":"#eed376"}, - "ghostel-color-bright-blue":{"fg":"#7a9abe"},"ghostel-color-bright-magenta":{"fg":"#b07fd0"},"ghostel-color-bright-cyan":{"fg":"#7fc0a8"},"ghostel-color-bright-white":{"fg":"white"}} # eat (F12 terminal, pure-elisp): the 16 named ANSI palette faces (which :inherit # ansi-color-*), the SGR attribute faces, and the shell-prompt annotation faces. # No seed -- the faces are exposed editable but left at their own defaults until @@ -156,11 +144,11 @@ EAT_FACES=("eat-term-color-black eat-term-color-red eat-term-color-green eat-ter "eat-shell-prompt-annotation-success eat-shell-prompt-annotation-running eat-shell-prompt-annotation-failure").split() EAT_SEED={} # ansi-color (built-in, not in the inventory): the 16 ANSI palette faces that every -# ANSI consumer resolves -- vterm, eshell, compilation, and ghostel (whose -# ghostel-color-* faces :inherit these). Theming ansi-color-* drives the 16 -# colors everywhere at once. Seed mirrors the ghostel palette so the two agree. +# ANSI consumer resolves -- vterm, eshell, compilation, and eat (whose +# eat-term-color-* faces :inherit these). Theming ansi-color-* drives the 16 +# colors everywhere at once. # Note: a face left unset here inherits nothing extra; a consumer that sets its -# own color directly (e.g. a seeded ghostel-color-red) overrides this inheritance. +# own color directly (e.g. a seeded ansi-color-red) overrides this inheritance. ANSI_COLOR_FACES=("ansi-color-black ansi-color-red ansi-color-green ansi-color-yellow " "ansi-color-blue ansi-color-magenta ansi-color-cyan ansi-color-white " "ansi-color-bright-black ansi-color-bright-red ansi-color-bright-green ansi-color-bright-yellow " @@ -367,7 +355,6 @@ BESPOKE_APP_SPECS=[ ("mu4e","mu4e","mu4e",MU4E_FACES,"mu4e-",MU4E_SEED), ("gnus","gnus","gnus",GNUS_FACES,"gnus-",GNUS_SEED), ("org-faces","org-faces","orgfaces",ORGFACES_FACES,"org-faces-",ORGFACES_SEED), - ("ghostel","ghostel","ghostel",GHOSTEL_FACES,"ghostel-",GHOSTEL_SEED), ("ansi-color","ansi-color","ansicolor",ANSI_COLOR_FACES,"ansi-color-",ANSI_COLOR_SEED), ("eat","emulate a terminal (eat)","eat",EAT_FACES,"eat-",EAT_SEED), ("auto-dim-other-buffers","auto-dim","autodim",AUTODIM_FACES,"auto-dim-other-buffers-",AUTODIM_SEED), @@ -392,7 +379,7 @@ BESPOKE_APP_SPECS=[ # the app label can stay clean and the "who reuses this" context rides the app # dropdown's tooltip instead. Apps not listed here get no hover. APP_HOVERS={ - "ansi-color":"The 16 ANSI palette faces. Reused by vterm, eshell, compilation, ghostel, and eat, whose own color faces inherit these.", + "ansi-color":"The 16 ANSI palette faces. Reused by vterm, eshell, compilation, and eat, whose own color faces inherit these.", "shr":"Simple HTML Renderer. Reused by eww, nov (epub reading), and mu4e / message for HTML mail.", "gnus":"Article-view faces, reused by mu4e's article view.", "dired":"Directory-listing faces, reused by dirvish (a dired frontend).", diff --git a/scripts/theme-studio/previews.js b/scripts/theme-studio/previews.js index 15e885da1..9209d521a 100644 --- a/scripts/theme-studio/previews.js +++ b/scripts/theme-studio/previews.js @@ -151,14 +151,6 @@ function renderElfeedPreview(){const a='elfeed',L=[]; L.push(os(a,'elfeed-log-date-face','02:24:03')+' '+os(a,'elfeed-log-error-level-face','ERROR')+' failed: bad.example'); L.push(os(a,'elfeed-log-date-face','02:24:04')+' '+os(a,'elfeed-log-debug-level-face','DEBUG')+' parsed 340 entries'); return previewLines(L);} -function renderGhostelPreview(){const a='ghostel',L=[]; - L.push(os(a,'ghostel-default','craig@host')+' '+os(a,'ghostel-color-green','~/code')+' $ ls'+os(a,'ghostel-fake-cursor',' ')+os(a,'ghostel-fake-cursor-box','[ ]')); - L.push(''); - L.push(os(a,'ghostel-default','normal:')+' '+os(a,'ghostel-color-black','black')+' '+os(a,'ghostel-color-red','red')+' '+os(a,'ghostel-color-green','green')+' '+os(a,'ghostel-color-yellow','yellow')+' '+os(a,'ghostel-color-blue','blue')+' '+os(a,'ghostel-color-magenta','magenta')+' '+os(a,'ghostel-color-cyan','cyan')+' '+os(a,'ghostel-color-white','white')); - L.push(os(a,'ghostel-default','bright:')+' '+os(a,'ghostel-color-bright-black','black')+' '+os(a,'ghostel-color-bright-red','red')+' '+os(a,'ghostel-color-bright-green','green')+' '+os(a,'ghostel-color-bright-yellow','yellow')+' '+os(a,'ghostel-color-bright-blue','blue')+' '+os(a,'ghostel-color-bright-magenta','magenta')+' '+os(a,'ghostel-color-bright-cyan','cyan')+' '+os(a,'ghostel-color-bright-white','white')); - L.push(''); - L.push(os(a,'ghostel-default','default terminal output, 256-color text and a blinking ')+os(a,'ghostel-fake-cursor','cursor')+'.'); - return previewLines(L);} function renderDashboardPreview(){const a='dashboard',L=[]; L.push(os(a,'dashboard-text-banner',' [ dashboard banner image ]')); L.push(os(a,'dashboard-banner-logo-title','Emacs: The Editor That Saves Your Soul')); @@ -328,7 +320,7 @@ function renderEatPreview(){const a='eat',L=[],c=(f,t)=>os(a,'eat-term-color-'+f L.push(c('bright-black','| * ')+c('yellow','7a8b9c0')+' expose eat faces to studio'); L.push(c('bright-black','| * ')+c('yellow','1d2e3f4')+' add eat-term-color docstrings'); L.push(c('bright-black','|/ ')); - L.push(c('bright-black','* ')+c('yellow','5f6a7b8')+' toggle eat instead of ghostel on f12'); + L.push(c('bright-black','* ')+c('yellow','5f6a7b8')+' default video player to mpv'); L.push(c('bright-black','* ')+c('yellow','2c3d4e5')+' calendar-sync robustness fixes'); L.push(''); // 4. test run -- pass green, skip yellow, fail red, bold summary, faint detail diff --git a/scripts/theme-studio/test_generate.py b/scripts/theme-studio/test_generate.py index 3bc78bdf8..d4744cdea 100644 --- a/scripts/theme-studio/test_generate.py +++ b/scripts/theme-studio/test_generate.py @@ -619,7 +619,6 @@ class GeneratedDefaults(unittest.TestCase): def test_representative_package_inherits_are_selected(self): self.assertEqual(self.package_seed("elfeed", "elfeed-search-filter-face")["inherit"], "mode-line-buffer-id") - self.assertEqual(self.package_seed("ghostel", "ghostel-default")["inherit"], "default") def test_syntax_defaults_capture_font_lock_styles(self): self.assertEqual(generate.MAP["kw"], "#d3d3d3") diff --git a/scripts/theme-studio/theme-studio.html b/scripts/theme-studio/theme-studio.html index b7414817f..b3f2de26f 100644 --- a/scripts/theme-studio/theme-studio.html +++ b/scripts/theme-studio/theme-studio.html @@ -297,7 +297,7 @@