From a5fd0b4d1e4dfea0f51c811f94c7cb1b96afcf30 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sat, 27 Jun 2026 23:59:26 -0400 Subject: fix(theme-studio): capture unversioned local checkouts in the package inventory build-inventory.el grouped faces by their defining file and pulled the package name only from versioned directories (/elpa/PKG-VERSION/). Locally-developed packages live in unversioned directories (/elpa/PKG/), so every one of them was silently excluded from the studio. Make the version suffix optional so unversioned checkouts are captured too. Verified against a clean wttrin load: wttrin-key resolves to /elpa/wttrin/wttrin.elc and the regex extracts "wttrin". The inventory itself needs regenerating in a clean Emacs to pick these up. --- scripts/theme-studio/build-inventory.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/theme-studio/build-inventory.el b/scripts/theme-studio/build-inventory.el index 04d821453..4455c4096 100644 --- a/scripts/theme-studio/build-inventory.el +++ b/scripts/theme-studio/build-inventory.el @@ -13,8 +13,11 @@ (let ((h (make-hash-table :test 'equal))) (dolist (f (face-list)) (let* ((file (ignore-errors (symbol-file f 'defface))) + ;; Match /elpa/PKG-VERSION/ and also /elpa/PKG/ (unversioned local dev + ;; checkouts cloned in place), so locally-developed packages are + ;; captured too. The version suffix is optional. (pkg (and (stringp file) - (string-match "/\\(?:elpa\\|straight/build\\|site-lisp\\)/\\([a-zA-Z0-9._-]+?\\)-[0-9][^/]*/" file) + (string-match "/\\(?:elpa\\|straight/build\\|site-lisp\\)/\\([a-zA-Z0-9._-]+?\\)\\(?:-[0-9][^/]*\\)?/" file) (match-string 1 file)))) (when pkg (push (symbol-name f) (gethash pkg h))))) (let (al) -- cgit v1.2.3