doom/doctor: fix 'org not installed' error

Also indents missing package warnings correctly and makes them harder to
mistake for system packages.

Fixes #2284
This commit is contained in:
Henrik Lissner 2020-05-14 16:33:03 -04:00
parent c682079783
commit 68b5f687bd
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -157,15 +157,17 @@ in."
(condition-case-unless-debug ex
(let ((doctor-file (doom-module-path (car key) (cdr key) "doctor.el"))
(packages-file (doom-module-path (car key) (cdr key) "packages.el")))
(cl-loop for name in (let (doom-packages
(cl-loop with doom-format-indent = 6
for name in (let (doom-packages
doom-disabled-packages)
(load packages-file 'noerror 'nomessage)
(mapcar #'car doom-packages))
unless (or (doom-package-get name :disable)
(eval (doom-package-get name :ignore))
(plist-get (doom-package-get name :recipe) :local-repo)
(doom-package-built-in-p name)
(doom-package-installed-p name))
do (print! (error "%s is not installed") name))
do (print! (error "Missing emacs package: %S") name))
(let ((inhibit-message t))
(load doctor-file 'noerror 'nomessage)))
(file-missing (error! "%s" (error-message-string ex)))