about summary refs log tree commit diff stats
path: root/.emacs.d/lisp/init-packages.el
diff options
context:
space:
mode:
authorDavid Morgan <djm_uk@protonmail.com>2021-12-22 12:59:15 +0000
committerDavid Morgan <djm_uk@protonmail.com>2021-12-22 12:59:15 +0000
commit0baa06d84ce0ee9f4b3f5ced636229ce5ceed90c (patch)
tree0be1b7fa53dc90d7634d576a90e7edf2461d9ec1 /.emacs.d/lisp/init-packages.el
parent91155c30eae0ce91e6cd99b3233b4b1f539dab7e (diff)
downloaddotfiles-0baa06d84ce0ee9f4b3f5ced636229ce5ceed90c.tar.gz
Remove code to manually fetch vertico extensions
Because they're built in now
(Also sneak in an extra package upgrade fix)
Diffstat (limited to '.emacs.d/lisp/init-packages.el')
-rw-r--r--.emacs.d/lisp/init-packages.el31
1 files changed, 11 insertions, 20 deletions
diff --git a/.emacs.d/lisp/init-packages.el b/.emacs.d/lisp/init-packages.el
index 70dc5e8..d236bca 100644
--- a/.emacs.d/lisp/init-packages.el
+++ b/.emacs.d/lisp/init-packages.el
@@ -31,32 +31,23 @@
   :config
   (paradox-enable))
 
-(defvar vertico-extensions-dir (expand-file-name "site-lisp/vertico-extensions" user-emacs-directory))
-(defvar vertico-extensions '("vertico-directory" "vertico-repeat"))
-
-(defun fetch-vertico-extensions ()
-  "Download the latest versions of the required vertico extensions into vertico-extensions-dir."
-  (dolist (extension vertico-extensions)
-    (let ((ext-file (format "%s.el" extension)))
-      (url-copy-file
-       (format "https://raw.githubusercontent.com/minad/vertico/main/extensions/%s" ext-file)
-       (expand-file-name ext-file vertico-extensions-dir)
-       t))))
-
-(unless (file-directory-p vertico-extensions-dir)
-  (make-directory vertico-extensions-dir t)
-  (fetch-vertico-extensions))
-
 (use-package epl
   :config
+  ;; TODO make a copy of the built-in check for system packages work instead
   (defvar my/system-packages '("vterm"))
   (defun my/upgrade-packages ()
     (interactive)
     (epl-refresh)
-    (when-let ((upgrades (seq-filter (lambda (p) (not (member (epl-package-name p) my/system-packages)))
-                                     (mapcar 'epl-upgrade-available (epl-find-upgrades)))))
-      (epl-upgrade upgrades))
-    (fetch-vertico-extensions)
+    (when-let ((upgrades (seq-filter (lambda (u)
+                                       (not (member
+                                             (epl-package-name (epl-upgrade-available  u))
+                                             my/system-packages)))
+                                     (epl-find-upgrades))))
+      ;; TODO why doesn't this work?
+      ;; (epl-upgrade (mapcar 'epl-upgrade-available upgrades)
+      (dolist (upgrade upgrades)
+        (epl-package-install (epl-upgrade-available upgrade) 'force)
+        (epl-package-delete (epl-upgrade-installed upgrade))))
     (message "Package upgrade finished.")))
 
 (provide 'init-packages)