diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-27 23:59:26 -0400 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-27 23:59:26 -0400 |
| commit | a5fd0b4d1e4dfea0f51c811f94c7cb1b96afcf30 (patch) | |
| tree | 7fb773fa845a00fe3d10db2e235a56c254cedcde | |
| parent | 1eb2d2aceb62721402248561556581d587640395 (diff) | |
| download | dotemacs-a5fd0b4d1e4dfea0f51c811f94c7cb1b96afcf30.tar.gz dotemacs-a5fd0b4d1e4dfea0f51c811f94c7cb1b96afcf30.zip | |
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.
| -rw-r--r-- | scripts/theme-studio/build-inventory.el | 5 |
1 files changed, 4 insertions, 1 deletions
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) |
