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 | bd5fbb81df428cf2a7874778c857aec75edaea16 (patch) | |
| tree | 6e4ae6b8859910b8b50091cad4949702e1a2177a /scripts/theme-studio/build-inventory.el | |
| parent | 0f623674e4bbf436ae33b604ac3c21eb224da759 (diff) | |
| download | dotemacs-bd5fbb81df428cf2a7874778c857aec75edaea16.tar.gz dotemacs-bd5fbb81df428cf2a7874778c857aec75edaea16.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.
Diffstat (limited to 'scripts/theme-studio/build-inventory.el')
| -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) |
