Improve interactive package management support
This commit is contained in:
parent
595109209a
commit
e7a1e0b4a2
1 changed files with 115 additions and 109 deletions
|
@ -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))))))
|
||||
|
||||
|
||||
;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue