mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Improve interactive package management support
This commit is contained in:
@ -335,6 +335,8 @@ package.el as appropriate."
|
||||
(defun doom//packages-install ()
|
||||
"Interactive command for installing missing packages."
|
||||
(interactive)
|
||||
(if (not noninteractive)
|
||||
(doom-packages--async-run 'doom//packages-install)
|
||||
(message! "Looking for packages to install...")
|
||||
(let ((packages (reverse (doom-get-missing-packages))))
|
||||
(cond ((not packages)
|
||||
@ -381,12 +383,14 @@ package.el as appropriate."
|
||||
""))))
|
||||
|
||||
(message! (bold (green "Finished!")))
|
||||
(doom//reload-load-path)))))
|
||||
(doom//reload-load-path))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom//packages-update ()
|
||||
"Interactive command for updating packages."
|
||||
(interactive)
|
||||
(if (not noninteractive)
|
||||
(doom-packages--async-run 'doom//packages-update)
|
||||
(message! "Looking for outdated packages...")
|
||||
(doom-refresh-packages-maybe doom-debug-mode)
|
||||
(let ((packages (sort (doom-get-outdated-packages) #'doom--sort-alpha)))
|
||||
@ -421,12 +425,14 @@ package.el as appropriate."
|
||||
(if result "✓ DONE" "✕ FAILED"))))))
|
||||
|
||||
(message! (bold (green "Finished!")))
|
||||
(doom//reload-load-path)))))
|
||||
(doom//reload-load-path))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom//packages-autoremove ()
|
||||
"Interactive command for auto-removing orphaned packages."
|
||||
(interactive)
|
||||
(if (not noninteractive)
|
||||
(doom-packages--async-run 'doom//packages-autoremove)
|
||||
(message! "Looking for orphaned packages...")
|
||||
(let ((packages (doom-get-orphaned-packages)))
|
||||
(cond ((not packages)
|
||||
@ -462,7 +468,7 @@ package.el as appropriate."
|
||||
pkg)))))
|
||||
|
||||
(message! (bold (green "Finished!")))
|
||||
(doom//reload-load-path)))))
|
||||
(doom//reload-load-path))))))
|
||||
|
||||
|
||||
;;
|
||||
|
Reference in New Issue
Block a user