From 02d1c7b009f109a83a6c62ae56f4a3a9ba2d21e3 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Tue, 26 May 2026 15:06:42 -0500 Subject: refactor: remove the dead state-to-todo mapping subsystem `pearl-state-to-todo-mapping` and its derived regex stopped doing real work once keyword rendering moved to slugifying the Linear state name (`pearl--state-name-to-keyword`) and the keyword-to-state direction moved to resolving through the team's workflow states. The defcustom fed only `pearl--get-todo-states-pattern`, which had no caller left, and the two cache vars existed only to serve that dead function. State extraction reads `org-get-todo-state` off the buffer's `#+TODO` line, so nothing live touched the mapping. I removed the defcustom, both cache vars, and the dead function, and dropped the three pattern tests that exercised it. Removing the defcustom orphaned the mapping bindings that ~12 test setup macros still carried. They were passing through slugification rather than the map, so I stripped them too and kept the `org-todo-keywords` bindings the temp buffers actually need. Also dropped the stale README config row. --- tests/test-pearl-format.el | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'tests/test-pearl-format.el') diff --git a/tests/test-pearl-format.el b/tests/test-pearl-format.el index ece64d3..96ec395 100644 --- a/tests/test-pearl-format.el +++ b/tests/test-pearl-format.el @@ -32,15 +32,10 @@ (require 'testutil-fixtures (expand-file-name "testutil-fixtures.el")) (defmacro test-pearl--with-default-mapping (&rest body) - "Run BODY with the default state mapping and a clean pattern cache." + "Run BODY. Kept as a thin wrapper: the renderer slugifies the state name now, +so these tests no longer need a state mapping bound." (declare (indent 0)) - `(let ((pearl-state-to-todo-mapping - '(("Todo" . "TODO") ("In Progress" . "IN-PROGRESS") - ("In Review" . "IN-REVIEW") ("Backlog" . "BACKLOG") - ("Blocked" . "BLOCKED") ("Done" . "DONE"))) - (pearl-todo-states-pattern nil) - (pearl--todo-states-pattern-source nil)) - ,@body)) + `(progn ,@body)) (defun test-pearl--norm-full () "A normalized fully-populated issue." -- cgit v1.2.3