Created
May 5, 2024 02:51
-
-
Save seokbeomKim/2eeb003ac1481f81aa478d2e71950943 to your computer and use it in GitHub Desktop.
Bug report - doom doctor
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; -*- lisp-interaction -*- | |
;; vim: set ft=lisp: | |
;; command=("emacs" "--load" "/home/sukbeom/.config/emacs/bin/doom" "--" "doctor") | |
;; date="2024-05-05 11-42-03" | |
;;;; ENVIRONMENT | |
GNU Emacs v29.3 nil | |
Doom core v3.0.0-pre HEAD -> master, origin/master, origin/HEAD 9620bb45a 2024-04-18 14:20:48 -0400 | |
Doom modules v24.04.0-pre HEAD -> master, origin/master, origin/HEAD 9620bb45a 2024-04-18 14:20:48 -0400 | |
;;;; 0 | |
((memq find-at-startup t) | |
((debugger-may-continue . t) | |
(inhibit-redisplay) | |
(inhibit-debugger . t) | |
(inhibit-changing-match-data))) | |
;;;; 1 | |
((straight--modifications find-at-startup) | |
((symbol . find-at-startup))) | |
;;;; 2 | |
((or | |
(straight--modifications 'find-at-startup) | |
(and | |
(straight--modifications 'find-when-checking) | |
straight--allow-find)) | |
nil) | |
;;;; 3 | |
((if | |
(or | |
(straight--modifications 'find-at-startup) | |
(and | |
(straight--modifications 'find-when-checking) | |
straight--allow-find)) | |
nil | |
(throw '--cl-block-straight--package-might-be-modified-p-- nil)) | |
nil) | |
;;;; 4 | |
((progn | |
(if local-repo nil | |
(throw '--cl-block-straight--package-might-be-modified-p-- nil)) | |
(if | |
(or | |
(straight--modifications 'find-at-startup) | |
(and | |
(straight--modifications 'find-when-checking) | |
straight--allow-find)) | |
nil | |
(throw '--cl-block-straight--package-might-be-modified-p-- nil)) | |
(straight--make-package-modifications-available) | |
(if | |
(straight--checkhash local-repo straight--cached-package-modifications) | |
(gethash local-repo straight--cached-package-modifications) | |
(or | |
(not | |
(stringp last-mtime)) | |
(let | |
((temp-buffer | |
(generate-new-buffer " *temp*" t))) | |
(save-current-buffer | |
(set-buffer temp-buffer) | |
(unwind-protect | |
(progn | |
(let | |
((newer-or-newermt nil) | |
(mtime-or-file nil)) | |
(if | |
(straight--find-supports 'newermt) | |
(progn | |
(setq newer-or-newermt "-newermt") | |
(setq mtime-or-file last-mtime)) | |
(setq newer-or-newermt "-newer") | |
(setq mtime-or-file | |
(straight--make-mtime last-mtime))) | |
(let* | |
((default-directory | |
(straight--repos-dir local-repo)) | |
(results | |
(straight--process-output straight-find-executable "." "-name" ".git" "-prune" "-o" newer-or-newermt mtime-or-file "-print"))) | |
(not | |
(string-empty-p results))))) | |
(and | |
(buffer-name temp-buffer) | |
(kill-buffer temp-buffer)))))))) | |
nil) | |
;;;; 5 | |
((or | |
(null build-info) | |
(catch '--cl-block-nil-- | |
(let | |
((tail straight--build-keywords)) | |
(while tail | |
(let | |
((keyword | |
(car tail))) | |
(if | |
(equal | |
(plist-get recipe keyword) | |
(plist-get last-recipe keyword)) | |
nil | |
(throw '--cl-block-nil-- t)) | |
(setq tail | |
(cdr tail)))) | |
nil)) | |
(and | |
(not no-build) | |
(not | |
(file-exists-p | |
(straight--build-dir package)))) | |
(progn | |
(if local-repo nil | |
(throw '--cl-block-straight--package-might-be-modified-p-- nil)) | |
(if | |
(or | |
(straight--modifications 'find-at-startup) | |
(and | |
(straight--modifications 'find-when-checking) | |
straight--allow-find)) | |
nil | |
(throw '--cl-block-straight--package-might-be-modified-p-- nil)) | |
(straight--make-package-modifications-available) | |
(if | |
(straight--checkhash local-repo straight--cached-package-modifications) | |
(gethash local-repo straight--cached-package-modifications) | |
(or | |
(not | |
(stringp last-mtime)) | |
(let | |
((temp-buffer | |
(generate-new-buffer " *temp*" t))) | |
(save-current-buffer | |
(set-buffer temp-buffer) | |
(unwind-protect | |
(progn | |
(let | |
((newer-or-newermt nil) | |
(mtime-or-file nil)) | |
(if | |
(straight--find-supports 'newermt) | |
(progn | |
(setq newer-or-newermt "-newermt") | |
(setq mtime-or-file last-mtime)) | |
(setq newer-or-newermt "-newer") | |
(setq mtime-or-file | |
(straight--make-mtime last-mtime))) | |
(let* | |
((default-directory | |
(straight--repos-dir local-repo)) | |
(results | |
(straight--process-output straight-find-executable "." "-name" ".git" "-prune" "-o" newer-or-newermt mtime-or-file "-print"))) | |
(not | |
(string-empty-p results))))) | |
(and | |
(buffer-name temp-buffer) | |
(kill-buffer temp-buffer))))))))) | |
nil) | |
;;;; 6 | |
((let* | |
((--cl-rest-- recipe) | |
(package | |
(car | |
(cdr | |
(plist-member --cl-rest-- ':package)))) | |
(local-repo | |
(car | |
(cdr | |
(plist-member --cl-rest-- ':local-repo)))) | |
(build-info | |
(gethash package straight--build-cache)) | |
(last-mtime | |
(nth 0 build-info)) | |
(last-recipe | |
(nth 2 build-info))) | |
(or | |
(null build-info) | |
(catch '--cl-block-nil-- | |
(let | |
((tail straight--build-keywords)) | |
(while tail | |
(let | |
((keyword | |
(car tail))) | |
(if | |
(equal | |
(plist-get recipe keyword) | |
(plist-get last-recipe keyword)) | |
nil | |
(throw '--cl-block-nil-- t)) | |
(setq tail | |
(cdr tail)))) | |
nil)) | |
(and | |
(not no-build) | |
(not | |
(file-exists-p | |
(straight--build-dir package)))) | |
(progn | |
(if local-repo nil | |
(throw '--cl-block-straight--package-might-be-modified-p-- nil)) | |
(if | |
(or | |
(straight--modifications 'find-at-startup) | |
(and | |
(straight--modifications 'find-when-checking) | |
straight--allow-find)) | |
nil | |
(throw '--cl-block-straight--package-might-be-modified-p-- nil)) | |
(straight--make-package-modifications-available) | |
(if | |
(straight--checkhash local-repo straight--cached-package-modifications) | |
(gethash local-repo straight--cached-package-modifications) | |
(or | |
(not | |
(stringp last-mtime)) | |
(let | |
((temp-buffer | |
(generate-new-buffer " *temp*" t))) | |
(save-current-buffer | |
(set-buffer temp-buffer) | |
(unwind-protect | |
(progn | |
(let | |
((newer-or-newermt nil) | |
(mtime-or-file nil)) | |
(if | |
(straight--find-supports 'newermt) | |
(progn | |
(setq newer-or-newermt "-newermt") | |
(setq mtime-or-file last-mtime)) | |
(setq newer-or-newermt "-newer") | |
(setq mtime-or-file | |
(straight--make-mtime last-mtime))) | |
(let* | |
((default-directory | |
(straight--repos-dir local-repo)) | |
(results | |
(straight--process-output straight-find-executable "." "-name" ".git" "-prune" "-o" newer-or-newermt mtime-or-file "-print"))) | |
(not | |
(string-empty-p results))))) | |
(and | |
(buffer-name temp-buffer) | |
(kill-buffer temp-buffer)))))))))) | |
((recipe :type git :host github :repo "melpa/melpa" :build nil :package "melpa" :local-repo "melpa") | |
(no-build . t) | |
(--cl-rest-- :type git :host github :repo "melpa/melpa" :build nil :package "melpa" :local-repo "melpa") | |
(package . "melpa") | |
(local-repo . "melpa") | |
(build-info "2024-05-05 11:40:19" nil | |
(:type git :host github :repo "melpa/melpa" :build nil :package "melpa" :local-repo "melpa")) | |
(last-mtime . "2024-05-05 11:40:19") | |
(last-recipe :type git :host github :repo "melpa/melpa" :build nil :package "melpa" :local-repo "melpa"))) | |
;;;; 7 | |
((catch '--cl-block-straight--package-might-be-modified-p-- | |
(let* | |
((--cl-rest-- recipe) | |
(package | |
(car | |
(cdr | |
(plist-member --cl-rest-- ':package)))) | |
(local-repo | |
(car | |
(cdr | |
(plist-member --cl-rest-- ':local-repo)))) | |
(build-info | |
(gethash package straight--build-cache)) | |
(last-mtime | |
(nth 0 build-info)) | |
(last-recipe | |
(nth 2 build-info))) | |
(or | |
(null build-info) | |
(catch '--cl-block-nil-- | |
(let | |
((tail straight--build-keywords)) | |
(while tail | |
(let | |
((keyword | |
(car tail))) | |
(if | |
(equal | |
(plist-get recipe keyword) | |
(plist-get last-recipe keyword)) | |
nil | |
(throw '--cl-block-nil-- t)) | |
(setq tail | |
(cdr tail)))) | |
nil)) | |
(and | |
(not no-build) | |
(not | |
(file-exists-p | |
(straight--build-dir package)))) | |
(progn | |
(if local-repo nil | |
(throw '--cl-block-straight--package-might-be-modified-p-- nil)) | |
(if | |
(or | |
(straight--modifications 'find-at-startup) | |
(and | |
(straight--modifications 'find-when-checking) | |
straight--allow-find)) | |
nil | |
(throw '--cl-block-straight--package-might-be-modified-p-- nil)) | |
(straight--make-package-modifications-available) | |
(if | |
(straight--checkhash local-repo straight--cached-package-modifications) | |
(gethash local-repo straight--cached-package-modifications) | |
(or | |
(not | |
(stringp last-mtime)) | |
(let | |
((temp-buffer | |
(generate-new-buffer " *temp*" t))) | |
(save-current-buffer | |
(set-buffer temp-buffer) | |
(unwind-protect | |
(progn | |
(let | |
((newer-or-newermt nil) | |
(mtime-or-file nil)) | |
(if | |
(straight--find-supports 'newermt) | |
(progn | |
(setq newer-or-newermt "-newermt") | |
(setq mtime-or-file last-mtime)) | |
(setq newer-or-newermt "-newer") | |
(setq mtime-or-file | |
(straight--make-mtime last-mtime))) | |
(let* | |
((default-directory | |
(straight--repos-dir local-repo)) | |
(results | |
(straight--process-output straight-find-executable "." "-name" ".git" "-prune" "-o" newer-or-newermt mtime-or-file "-print"))) | |
(not | |
(string-empty-p results))))) | |
(and | |
(buffer-name temp-buffer) | |
(kill-buffer temp-buffer))))))))))) | |
nil) | |
;;;; 8 | |
((straight--package-might-be-modified-p | |
(:type git :host github :repo "melpa/melpa" :build nil :package "melpa" :local-repo "melpa") | |
t) | |
((recipe :type git :host github :repo "melpa/melpa" :build nil :package "melpa" :local-repo "melpa") | |
(no-build . t))) | |
;;;; 9 | |
((or | |
(and straight--packages-to-rebuild | |
(or | |
(eq straight--packages-to-rebuild :all) | |
(gethash package straight--packages-to-rebuild)) | |
(not | |
(gethash package straight--packages-not-to-rebuild)) | |
(puthash package t straight--packages-not-to-rebuild)) | |
(straight--package-might-be-modified-p recipe no-build)) | |
nil) | |
;;;; 10 | |
((let* | |
((no-build | |
(or | |
(null local-repo) | |
(straight--build-disabled-p recipe) | |
(if | |
(let | |
((object no-build)) | |
(and | |
(not | |
(memq object | |
'(no-build t))) | |
(functionp object))) | |
(funcall no-build package) | |
no-build))) | |
(modified | |
(or | |
(and straight--packages-to-rebuild | |
(or | |
(eq straight--packages-to-rebuild :all) | |
(gethash package straight--packages-to-rebuild)) | |
(not | |
(gethash package straight--packages-not-to-rebuild)) | |
(puthash package t straight--packages-not-to-rebuild)) | |
(straight--package-might-be-modified-p recipe no-build)))) | |
(let | |
((func | |
(intern | |
(format "straight-recipes-%s-version" package))) | |
(table | |
(gethash | |
(intern package) | |
straight--recipe-lookup-cache))) | |
(if | |
(or modified | |
(not | |
(fboundp func)) | |
(not | |
(equal | |
(and table | |
(gethash 'version table)) | |
(funcall func)))) | |
(progn | |
(remhash | |
(intern package) | |
straight--recipe-lookup-cache)))) | |
(if no-build nil | |
(straight--add-package-to-load-path recipe)) | |
(run-hook-with-args 'straight-use-package-prepare-functions package) | |
(let | |
((tail | |
'(native-comp-deferred-compilation-deny-list native-comp-jit-compilation-deny-list))) | |
(while tail | |
(let | |
((list-var | |
(car tail))) | |
(if | |
(boundp list-var) | |
(progn | |
(let* | |
((build | |
(and t | |
(car | |
(cdr | |
(plist-member recipe :build)))))) | |
(if build | |
(if | |
(and | |
(eq | |
(car-safe build) | |
:not) | |
(member 'native-compile | |
(cdr build))) | |
(progn | |
(set list-var | |
(let* | |
((va | |
(format "^%s" | |
(straight--build-dir package))) | |
(vlist | |
(symbol-value list-var))) | |
(if | |
(cl-member va vlist :test #'string=) | |
vlist | |
(cons va vlist)))))) | |
nil)))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(and modified | |
(not no-build)) | |
(progn | |
(run-hook-with-args 'straight-use-package-pre-build-functions package) | |
(straight--build-package recipe cause))) | |
(straight--declare-successful-build recipe) | |
(if no-build nil | |
(let | |
((tail | |
(straight--get-dependencies package))) | |
(while tail | |
(let | |
((dependency | |
(car tail))) | |
(straight-use-package | |
(intern dependency) | |
nil nil cause) | |
(setq tail | |
(cdr tail))))) | |
(straight--add-package-to-info-path recipe) | |
(straight--activate-package-autoloads recipe)) | |
(if | |
(and interactive | |
(not already-registered)) | |
(progn | |
(straight--output | |
(concat "If you want to keep %s, put " "(straight-use-package %s%S) " "in your init-file.") | |
package "'" | |
(intern package))))) | |
((no-clone closure | |
(t) | |
(_package available) | |
(not available)) | |
(no-build) | |
(cause) | |
(interactive) | |
(recipe :type git :host github :repo "melpa/melpa" :build nil :package "melpa" :local-repo "melpa") | |
(package . "melpa") | |
(local-repo . "melpa") | |
(already-registered) | |
(available . t) | |
(no-build . t))) | |
;;;; 11 | |
((let | |
((already-registered | |
(gethash package straight--success-cache)) | |
(available | |
(or | |
(null local-repo) | |
(straight--repository-is-available-p recipe)))) | |
(if | |
(if | |
(let | |
((object no-clone)) | |
(and | |
(not | |
(memq object | |
'(no-clone t))) | |
(functionp object))) | |
(funcall no-clone package available) | |
no-clone) | |
(progn | |
(throw '--cl-block-straight-use-package-- nil))) | |
(if available nil | |
(straight--clone-repository recipe cause)) | |
(straight--make-build-cache-available) | |
(let* | |
((no-build | |
(or | |
(null local-repo) | |
(straight--build-disabled-p recipe) | |
(if | |
(let | |
((object no-build)) | |
(and | |
(not | |
(memq object | |
'(no-build t))) | |
(functionp object))) | |
(funcall no-build package) | |
no-build))) | |
(modified | |
(or | |
(and straight--packages-to-rebuild | |
(or | |
(eq straight--packages-to-rebuild :all) | |
(gethash package straight--packages-to-rebuild)) | |
(not | |
(gethash package straight--packages-not-to-rebuild)) | |
(puthash package t straight--packages-not-to-rebuild)) | |
(straight--package-might-be-modified-p recipe no-build)))) | |
(let | |
((func | |
(intern | |
(format "straight-recipes-%s-version" package))) | |
(table | |
(gethash | |
(intern package) | |
straight--recipe-lookup-cache))) | |
(if | |
(or modified | |
(not | |
(fboundp func)) | |
(not | |
(equal | |
(and table | |
(gethash 'version table)) | |
(funcall func)))) | |
(progn | |
(remhash | |
(intern package) | |
straight--recipe-lookup-cache)))) | |
(if no-build nil | |
(straight--add-package-to-load-path recipe)) | |
(run-hook-with-args 'straight-use-package-prepare-functions package) | |
(let | |
((tail | |
'(native-comp-deferred-compilation-deny-list native-comp-jit-compilation-deny-list))) | |
(while tail | |
(let | |
((list-var | |
(car tail))) | |
(if | |
(boundp list-var) | |
(progn | |
(let* | |
((build | |
(and t | |
(car | |
(cdr | |
(plist-member recipe :build)))))) | |
(if build | |
(if | |
(and | |
(eq | |
(car-safe build) | |
:not) | |
(member 'native-compile | |
(cdr build))) | |
(progn | |
(set list-var | |
(let* | |
((va | |
(format "^%s" | |
(straight--build-dir package))) | |
(vlist | |
(symbol-value list-var))) | |
(if | |
(cl-member va vlist :test #'string=) | |
vlist | |
(cons va vlist)))))) | |
nil)))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(and modified | |
(not no-build)) | |
(progn | |
(run-hook-with-args 'straight-use-package-pre-build-functions package) | |
(straight--build-package recipe cause))) | |
(straight--declare-successful-build recipe) | |
(if no-build nil | |
(let | |
((tail | |
(straight--get-dependencies package))) | |
(while tail | |
(let | |
((dependency | |
(car tail))) | |
(straight-use-package | |
(intern dependency) | |
nil nil cause) | |
(setq tail | |
(cdr tail))))) | |
(straight--add-package-to-info-path recipe) | |
(straight--activate-package-autoloads recipe)) | |
(if | |
(and interactive | |
(not already-registered)) | |
(progn | |
(straight--output | |
(concat "If you want to keep %s, put " "(straight-use-package %s%S) " "in your init-file.") | |
package "'" | |
(intern package))))) | |
(puthash package t straight--success-cache) | |
t) | |
((no-clone closure | |
(t) | |
(_package available) | |
(not available)) | |
(no-build) | |
(cause) | |
(interactive) | |
(recipe :type git :host github :repo "melpa/melpa" :build nil :package "melpa" :local-repo "melpa") | |
(package . "melpa") | |
(local-repo . "melpa") | |
(already-registered) | |
(available . t))) | |
;;;; 12 | |
(((closure | |
((local-repo . "melpa") | |
(package . "melpa") | |
(recipe :type git :host github :repo "melpa/melpa" :build nil :package "melpa" :local-repo "melpa") | |
(interactive) | |
(cause) | |
(no-build) | |
(no-clone closure | |
(t) | |
(_package available) | |
(not available))) | |
nil | |
(let | |
((already-registered | |
(gethash package straight--success-cache)) | |
(available | |
(or | |
(null local-repo) | |
(straight--repository-is-available-p recipe)))) | |
(if | |
(if | |
(let | |
((object no-clone)) | |
(and | |
(not | |
(memq object | |
'(no-clone t))) | |
(functionp object))) | |
(funcall no-clone package available) | |
no-clone) | |
(progn | |
(throw '--cl-block-straight-use-package-- nil))) | |
(if available nil | |
(straight--clone-repository recipe cause)) | |
(straight--make-build-cache-available) | |
(let* | |
((no-build | |
(or | |
(null local-repo) | |
(straight--build-disabled-p recipe) | |
(if | |
(let | |
((object no-build)) | |
(and | |
(not | |
(memq object | |
'(no-build t))) | |
(functionp object))) | |
(funcall no-build package) | |
no-build))) | |
(modified | |
(or | |
(and straight--packages-to-rebuild | |
(or | |
(eq straight--packages-to-rebuild :all) | |
(gethash package straight--packages-to-rebuild)) | |
(not | |
(gethash package straight--packages-not-to-rebuild)) | |
(puthash package t straight--packages-not-to-rebuild)) | |
(straight--package-might-be-modified-p recipe no-build)))) | |
(let | |
((func | |
(intern | |
(format "straight-recipes-%s-version" package))) | |
(table | |
(gethash | |
(intern package) | |
straight--recipe-lookup-cache))) | |
(if | |
(or modified | |
(not | |
(fboundp func)) | |
(not | |
(equal | |
(and table | |
(gethash 'version table)) | |
(funcall func)))) | |
(progn | |
(remhash | |
(intern package) | |
straight--recipe-lookup-cache)))) | |
(if no-build nil | |
(straight--add-package-to-load-path recipe)) | |
(run-hook-with-args 'straight-use-package-prepare-functions package) | |
(let | |
((tail | |
'(native-comp-deferred-compilation-deny-list native-comp-jit-compilation-deny-list))) | |
(while tail | |
(let | |
((list-var | |
(car tail))) | |
(if | |
(boundp list-var) | |
(progn | |
(let* | |
((build | |
(and t | |
(car | |
(cdr | |
(plist-member recipe :build)))))) | |
(if build | |
(if | |
(and | |
(eq | |
(car-safe build) | |
:not) | |
(member 'native-compile | |
(cdr build))) | |
(progn | |
(set list-var | |
(let* | |
((va | |
(format "^%s" | |
(straight--build-dir package))) | |
(vlist | |
(symbol-value list-var))) | |
(if | |
(cl-member va vlist :test #'string=) | |
vlist | |
(cons va vlist)))))) | |
nil)))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(and modified | |
(not no-build)) | |
(progn | |
(run-hook-with-args 'straight-use-package-pre-build-functions package) | |
(straight--build-package recipe cause))) | |
(straight--declare-successful-build recipe) | |
(if no-build nil | |
(let | |
((tail | |
(straight--get-dependencies package))) | |
(while tail | |
(let | |
((dependency | |
(car tail))) | |
(straight-use-package | |
(intern dependency) | |
nil nil cause) | |
(setq tail | |
(cdr tail))))) | |
(straight--add-package-to-info-path recipe) | |
(straight--activate-package-autoloads recipe)) | |
(if | |
(and interactive | |
(not already-registered)) | |
(progn | |
(straight--output | |
(concat "If you want to keep %s, put " "(straight-use-package %s%S) " "in your init-file.") | |
package "'" | |
(intern package))))) | |
(puthash package t straight--success-cache) | |
t))) | |
((no-clone closure | |
(t) | |
(_package available) | |
(not available)) | |
(no-build) | |
(cause) | |
(interactive) | |
(recipe :type git :host github :repo "melpa/melpa" :build nil :package "melpa" :local-repo "melpa") | |
(package . "melpa") | |
(local-repo . "melpa"))) | |
;;;; 13 | |
((funcall | |
(closure | |
((local-repo . "melpa") | |
(package . "melpa") | |
(recipe :type git :host github :repo "melpa/melpa" :build nil :package "melpa" :local-repo "melpa") | |
(interactive) | |
(cause) | |
(no-build) | |
(no-clone closure | |
(t) | |
(_package available) | |
(not available))) | |
nil | |
(let | |
((already-registered | |
(gethash package straight--success-cache)) | |
(available | |
(or | |
(null local-repo) | |
(straight--repository-is-available-p recipe)))) | |
(if | |
(if | |
(let | |
((object no-clone)) | |
(and | |
(not | |
(memq object | |
'(no-clone t))) | |
(functionp object))) | |
(funcall no-clone package available) | |
no-clone) | |
(progn | |
(throw '--cl-block-straight-use-package-- nil))) | |
(if available nil | |
(straight--clone-repository recipe cause)) | |
(straight--make-build-cache-available) | |
(let* | |
((no-build | |
(or | |
(null local-repo) | |
(straight--build-disabled-p recipe) | |
(if | |
(let | |
((object no-build)) | |
(and | |
(not | |
(memq object | |
'(no-build t))) | |
(functionp object))) | |
(funcall no-build package) | |
no-build))) | |
(modified | |
(or | |
(and straight--packages-to-rebuild | |
(or | |
(eq straight--packages-to-rebuild :all) | |
(gethash package straight--packages-to-rebuild)) | |
(not | |
(gethash package straight--packages-not-to-rebuild)) | |
(puthash package t straight--packages-not-to-rebuild)) | |
(straight--package-might-be-modified-p recipe no-build)))) | |
(let | |
((func | |
(intern | |
(format "straight-recipes-%s-version" package))) | |
(table | |
(gethash | |
(intern package) | |
straight--recipe-lookup-cache))) | |
(if | |
(or modified | |
(not | |
(fboundp func)) | |
(not | |
(equal | |
(and table | |
(gethash 'version table)) | |
(funcall func)))) | |
(progn | |
(remhash | |
(intern package) | |
straight--recipe-lookup-cache)))) | |
(if no-build nil | |
(straight--add-package-to-load-path recipe)) | |
(run-hook-with-args 'straight-use-package-prepare-functions package) | |
(let | |
((tail | |
'(native-comp-deferred-compilation-deny-list native-comp-jit-compilation-deny-list))) | |
(while tail | |
(let | |
((list-var | |
(car tail))) | |
(if | |
(boundp list-var) | |
(progn | |
(let* | |
((build | |
(and t | |
(car | |
(cdr | |
(plist-member recipe :build)))))) | |
(if build | |
(if | |
(and | |
(eq | |
(car-safe build) | |
:not) | |
(member 'native-compile | |
(cdr build))) | |
(progn | |
(set list-var | |
(let* | |
((va | |
(format "^%s" | |
(straight--build-dir package))) | |
(vlist | |
(symbol-value list-var))) | |
(if | |
(cl-member va vlist :test #'string=) | |
vlist | |
(cons va vlist)))))) | |
nil)))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(and modified | |
(not no-build)) | |
(progn | |
(run-hook-with-args 'straight-use-package-pre-build-functions package) | |
(straight--build-package recipe cause))) | |
(straight--declare-successful-build recipe) | |
(if no-build nil | |
(let | |
((tail | |
(straight--get-dependencies package))) | |
(while tail | |
(let | |
((dependency | |
(car tail))) | |
(straight-use-package | |
(intern dependency) | |
nil nil cause) | |
(setq tail | |
(cdr tail))))) | |
(straight--add-package-to-info-path recipe) | |
(straight--activate-package-autoloads recipe)) | |
(if | |
(and interactive | |
(not already-registered)) | |
(progn | |
(straight--output | |
(concat "If you want to keep %s, put " "(straight-use-package %s%S) " "in your init-file.") | |
package "'" | |
(intern package))))) | |
(puthash package t straight--success-cache) | |
t))) | |
nil) | |
;;;; 14 | |
((progn | |
(funcall now)) | |
nil) | |
;;;; 15 | |
((if now | |
(progn | |
(funcall now))) | |
nil) | |
;;;; 16 | |
((if | |
(assq id straight--transaction-alist) | |
nil | |
(setq straight--transaction-alist | |
(cons | |
(cons id later) | |
straight--transaction-alist)) | |
(if now | |
(progn | |
(funcall now)))) | |
nil) | |
;;;; 17 | |
((progn | |
(if | |
(or manual straight--transaction-alist) | |
nil | |
(straight--transaction-finalize-at-top-level)) | |
(if | |
(assq id straight--transaction-alist) | |
nil | |
(setq straight--transaction-alist | |
(cons | |
(cons id later) | |
straight--transaction-alist)) | |
(if now | |
(progn | |
(funcall now))))) | |
nil) | |
;;;; 18 | |
((progn | |
(let | |
((--cl-keys-- --cl-rest--)) | |
(while --cl-keys-- | |
(cond | |
((memq | |
(car --cl-keys--) | |
'(:now :later :manual :allow-other-keys)) | |
(if | |
(cdr --cl-keys--) | |
nil | |
(error "Missing argument for %s" | |
(car --cl-keys--))) | |
(setq --cl-keys-- | |
(cdr | |
(cdr --cl-keys--)))) | |
((car | |
(cdr | |
(memq ':allow-other-keys --cl-rest--))) | |
(setq --cl-keys-- nil)) | |
(t | |
(error "Keyword argument %s not one of (:now :later :manual)" | |
(car --cl-keys--)))))) | |
(progn | |
(if | |
(or manual straight--transaction-alist) | |
nil | |
(straight--transaction-finalize-at-top-level)) | |
(if | |
(assq id straight--transaction-alist) | |
nil | |
(setq straight--transaction-alist | |
(cons | |
(cons id later) | |
straight--transaction-alist)) | |
(if now | |
(progn | |
(funcall now)))))) | |
nil) | |
;;;; 19 | |
((let* | |
((now | |
(car | |
(cdr | |
(plist-member --cl-rest-- ':now)))) | |
(later | |
(car | |
(cdr | |
(plist-member --cl-rest-- ':later)))) | |
(manual | |
(car | |
(cdr | |
(plist-member --cl-rest-- ':manual))))) | |
(progn | |
(let | |
((--cl-keys-- --cl-rest--)) | |
(while --cl-keys-- | |
(cond | |
((memq | |
(car --cl-keys--) | |
'(:now :later :manual :allow-other-keys)) | |
(if | |
(cdr --cl-keys--) | |
nil | |
(error "Missing argument for %s" | |
(car --cl-keys--))) | |
(setq --cl-keys-- | |
(cdr | |
(cdr --cl-keys--)))) | |
((car | |
(cdr | |
(memq ':allow-other-keys --cl-rest--))) | |
(setq --cl-keys-- nil)) | |
(t | |
(error "Keyword argument %s not one of (:now :later :manual)" | |
(car --cl-keys--)))))) | |
(progn | |
(if | |
(or manual straight--transaction-alist) | |
nil | |
(straight--transaction-finalize-at-top-level)) | |
(if | |
(assq id straight--transaction-alist) | |
nil | |
(setq straight--transaction-alist | |
(cons | |
(cons id later) | |
straight--transaction-alist)) | |
(if now | |
(progn | |
(funcall now))))))) | |
((id . use-package-\"30726d17074a742ec817b263294ac5f8\"--2304165345655098918-nil) | |
(--cl-rest-- :now | |
(closure | |
((local-repo . "melpa") | |
(package . "melpa") | |
(recipe :type git :host github :repo "melpa/melpa" :build nil :package "melpa" :local-repo "melpa") | |
(interactive) | |
(cause) | |
(no-build) | |
(no-clone closure | |
(t) | |
(_package available) | |
(not available))) | |
nil | |
(let | |
((already-registered | |
(gethash package straight--success-cache)) | |
(available | |
(or | |
(null local-repo) | |
(straight--repository-is-available-p recipe)))) | |
(if | |
(if | |
(let | |
((object no-clone)) | |
(and | |
(not | |
(memq object | |
'(no-clone t))) | |
(functionp object))) | |
(funcall no-clone package available) | |
no-clone) | |
(progn | |
(throw '--cl-block-straight-use-package-- nil))) | |
(if available nil | |
(straight--clone-repository recipe cause)) | |
(straight--make-build-cache-available) | |
(let* | |
((no-build | |
(or | |
(null local-repo) | |
(straight--build-disabled-p recipe) | |
(if | |
(let | |
((object no-build)) | |
(and | |
(not | |
(memq object | |
'(no-build t))) | |
(functionp object))) | |
(funcall no-build package) | |
no-build))) | |
(modified | |
(or | |
(and straight--packages-to-rebuild | |
(or | |
(eq straight--packages-to-rebuild :all) | |
(gethash package straight--packages-to-rebuild)) | |
(not | |
(gethash package straight--packages-not-to-rebuild)) | |
(puthash package t straight--packages-not-to-rebuild)) | |
(straight--package-might-be-modified-p recipe no-build)))) | |
(let | |
((func | |
(intern | |
(format "straight-recipes-%s-version" package))) | |
(table | |
(gethash | |
(intern package) | |
straight--recipe-lookup-cache))) | |
(if | |
(or modified | |
(not | |
(fboundp func)) | |
(not | |
(equal | |
(and table | |
(gethash 'version table)) | |
(funcall func)))) | |
(progn | |
(remhash | |
(intern package) | |
straight--recipe-lookup-cache)))) | |
(if no-build nil | |
(straight--add-package-to-load-path recipe)) | |
(run-hook-with-args 'straight-use-package-prepare-functions package) | |
(let | |
((tail | |
'(native-comp-deferred-compilation-deny-list native-comp-jit-compilation-deny-list))) | |
(while tail | |
(let | |
((list-var | |
(car tail))) | |
(if | |
(boundp list-var) | |
(progn | |
(let* | |
((build | |
(and t | |
(car | |
(cdr | |
(plist-member recipe :build)))))) | |
(if build | |
(if | |
(and | |
(eq | |
(car-safe build) | |
:not) | |
(member 'native-compile | |
(cdr build))) | |
(progn | |
(set list-var | |
(let* | |
((va | |
(format "^%s" | |
(straight--build-dir package))) | |
(vlist | |
(symbol-value list-var))) | |
(if | |
(cl-member va vlist :test #'string=) | |
vlist | |
(cons va vlist)))))) | |
nil)))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(and modified | |
(not no-build)) | |
(progn | |
(run-hook-with-args 'straight-use-package-pre-build-functions package) | |
(straight--build-package recipe cause))) | |
(straight--declare-successful-build recipe) | |
(if no-build nil | |
(let | |
((tail | |
(straight--get-dependencies package))) | |
(while tail | |
(let | |
((dependency | |
(car tail))) | |
(straight-use-package | |
(intern dependency) | |
nil nil cause) | |
(setq tail | |
(cdr tail))))) | |
(straight--add-package-to-info-path recipe) | |
(straight--activate-package-autoloads recipe)) | |
(if | |
(and interactive | |
(not already-registered)) | |
(progn | |
(straight--output | |
(concat "If you want to keep %s, put " "(straight-use-package %s%S) " "in your init-file.") | |
package "'" | |
(intern package))))) | |
(puthash package t straight--success-cache) | |
t))) | |
(now closure | |
((local-repo . "melpa") | |
(package . "melpa") | |
(recipe :type git :host github :repo "melpa/melpa" :build nil :package "melpa" :local-repo "melpa") | |
(interactive) | |
(cause) | |
(no-build) | |
(no-clone closure | |
(t) | |
(_package available) | |
(not available))) | |
nil | |
(let | |
((already-registered | |
(gethash package straight--success-cache)) | |
(available | |
(or | |
(null local-repo) | |
(straight--repository-is-available-p recipe)))) | |
(if | |
(if | |
(let | |
((object no-clone)) | |
(and | |
(not | |
(memq object | |
'(no-clone t))) | |
(functionp object))) | |
(funcall no-clone package available) | |
no-clone) | |
(progn | |
(throw '--cl-block-straight-use-package-- nil))) | |
(if available nil | |
(straight--clone-repository recipe cause)) | |
(straight--make-build-cache-available) | |
(let* | |
((no-build | |
(or | |
(null local-repo) | |
(straight--build-disabled-p recipe) | |
(if | |
(let | |
((object no-build)) | |
(and | |
(not | |
(memq object | |
'(no-build t))) | |
(functionp object))) | |
(funcall no-build package) | |
no-build))) | |
(modified | |
(or | |
(and straight--packages-to-rebuild | |
(or | |
(eq straight--packages-to-rebuild :all) | |
(gethash package straight--packages-to-rebuild)) | |
(not | |
(gethash package straight--packages-not-to-rebuild)) | |
(puthash package t straight--packages-not-to-rebuild)) | |
(straight--package-might-be-modified-p recipe no-build)))) | |
(let | |
((func | |
(intern | |
(format "straight-recipes-%s-version" package))) | |
(table | |
(gethash | |
(intern package) | |
straight--recipe-lookup-cache))) | |
(if | |
(or modified | |
(not | |
(fboundp func)) | |
(not | |
(equal | |
(and table | |
(gethash 'version table)) | |
(funcall func)))) | |
(progn | |
(remhash | |
(intern package) | |
straight--recipe-lookup-cache)))) | |
(if no-build nil | |
(straight--add-package-to-load-path recipe)) | |
(run-hook-with-args 'straight-use-package-prepare-functions package) | |
(let | |
((tail | |
'(native-comp-deferred-compilation-deny-list native-comp-jit-compilation-deny-list))) | |
(while tail | |
(let | |
((list-var | |
(car tail))) | |
(if | |
(boundp list-var) | |
(progn | |
(let* | |
((build | |
(and t | |
(car | |
(cdr | |
(plist-member recipe :build)))))) | |
(if build | |
(if | |
(and | |
(eq | |
(car-safe build) | |
:not) | |
(member 'native-compile | |
(cdr build))) | |
(progn | |
(set list-var | |
(let* | |
((va | |
(format "^%s" | |
(straight--build-dir package))) | |
(vlist | |
(symbol-value list-var))) | |
(if | |
(cl-member va vlist :test #'string=) | |
vlist | |
(cons va vlist)))))) | |
nil)))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(and modified | |
(not no-build)) | |
(progn | |
(run-hook-with-args 'straight-use-package-pre-build-functions package) | |
(straight--build-package recipe cause))) | |
(straight--declare-successful-build recipe) | |
(if no-build nil | |
(let | |
((tail | |
(straight--get-dependencies package))) | |
(while tail | |
(let | |
((dependency | |
(car tail))) | |
(straight-use-package | |
(intern dependency) | |
nil nil cause) | |
(setq tail | |
(cdr tail))))) | |
(straight--add-package-to-info-path recipe) | |
(straight--activate-package-autoloads recipe)) | |
(if | |
(and interactive | |
(not already-registered)) | |
(progn | |
(straight--output | |
(concat "If you want to keep %s, put " "(straight-use-package %s%S) " "in your init-file.") | |
package "'" | |
(intern package))))) | |
(puthash package t straight--success-cache) | |
t)) | |
(later) | |
(manual))) | |
;;;; 20 | |
((straight--transaction-exec use-package-\"30726d17074a742ec817b263294ac5f8\"--2304165345655098918-nil :now | |
(closure | |
((local-repo . "melpa") | |
(package . "melpa") | |
(recipe :type git :host github :repo "melpa/melpa" :build nil :package "melpa" :local-repo "melpa") | |
(interactive) | |
(cause) | |
(no-build) | |
(no-clone closure | |
(t) | |
(_package available) | |
(not available))) | |
nil | |
(let | |
((already-registered | |
(gethash package straight--success-cache)) | |
(available | |
(or | |
(null local-repo) | |
(straight--repository-is-available-p recipe)))) | |
(if | |
(if | |
(let | |
((object no-clone)) | |
(and | |
(not | |
(memq object | |
'(no-clone t))) | |
(functionp object))) | |
(funcall no-clone package available) | |
no-clone) | |
(progn | |
(throw '--cl-block-straight-use-package-- nil))) | |
(if available nil | |
(straight--clone-repository recipe cause)) | |
(straight--make-build-cache-available) | |
(let* | |
((no-build | |
(or | |
(null local-repo) | |
(straight--build-disabled-p recipe) | |
(if | |
(let | |
((object no-build)) | |
(and | |
(not | |
(memq object | |
'(no-build t))) | |
(functionp object))) | |
(funcall no-build package) | |
no-build))) | |
(modified | |
(or | |
(and straight--packages-to-rebuild | |
(or | |
(eq straight--packages-to-rebuild :all) | |
(gethash package straight--packages-to-rebuild)) | |
(not | |
(gethash package straight--packages-not-to-rebuild)) | |
(puthash package t straight--packages-not-to-rebuild)) | |
(straight--package-might-be-modified-p recipe no-build)))) | |
(let | |
((func | |
(intern | |
(format "straight-recipes-%s-version" package))) | |
(table | |
(gethash | |
(intern package) | |
straight--recipe-lookup-cache))) | |
(if | |
(or modified | |
(not | |
(fboundp func)) | |
(not | |
(equal | |
(and table | |
(gethash 'version table)) | |
(funcall func)))) | |
(progn | |
(remhash | |
(intern package) | |
straight--recipe-lookup-cache)))) | |
(if no-build nil | |
(straight--add-package-to-load-path recipe)) | |
(run-hook-with-args 'straight-use-package-prepare-functions package) | |
(let | |
((tail | |
'(native-comp-deferred-compilation-deny-list native-comp-jit-compilation-deny-list))) | |
(while tail | |
(let | |
((list-var | |
(car tail))) | |
(if | |
(boundp list-var) | |
(progn | |
(let* | |
((build | |
(and t | |
(car | |
(cdr | |
(plist-member recipe :build)))))) | |
(if build | |
(if | |
(and | |
(eq | |
(car-safe build) | |
:not) | |
(member 'native-compile | |
(cdr build))) | |
(progn | |
(set list-var | |
(let* | |
((va | |
(format "^%s" | |
(straight--build-dir package))) | |
(vlist | |
(symbol-value list-var))) | |
(if | |
(cl-member va vlist :test #'string=) | |
vlist | |
(cons va vlist)))))) | |
nil)))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(and modified | |
(not no-build)) | |
(progn | |
(run-hook-with-args 'straight-use-package-pre-build-functions package) | |
(straight--build-package recipe cause))) | |
(straight--declare-successful-build recipe) | |
(if no-build nil | |
(let | |
((tail | |
(straight--get-dependencies package))) | |
(while tail | |
(let | |
((dependency | |
(car tail))) | |
(straight-use-package | |
(intern dependency) | |
nil nil cause) | |
(setq tail | |
(cdr tail))))) | |
(straight--add-package-to-info-path recipe) | |
(straight--activate-package-autoloads recipe)) | |
(if | |
(and interactive | |
(not already-registered)) | |
(progn | |
(straight--output | |
(concat "If you want to keep %s, put " "(straight-use-package %s%S) " "in your init-file.") | |
package "'" | |
(intern package))))) | |
(puthash package t straight--success-cache) | |
t))) | |
((id . use-package-\"30726d17074a742ec817b263294ac5f8\"--2304165345655098918-nil) | |
(--cl-rest-- :now | |
(closure | |
((local-repo . "melpa") | |
(package . "melpa") | |
(recipe :type git :host github :repo "melpa/melpa" :build nil :package "melpa" :local-repo "melpa") | |
(interactive) | |
(cause) | |
(no-build) | |
(no-clone closure | |
(t) | |
(_package available) | |
(not available))) | |
nil | |
(let | |
((already-registered | |
(gethash package straight--success-cache)) | |
(available | |
(or | |
(null local-repo) | |
(straight--repository-is-available-p recipe)))) | |
(if | |
(if | |
(let | |
((object no-clone)) | |
(and | |
(not | |
(memq object | |
'(no-clone t))) | |
(functionp object))) | |
(funcall no-clone package available) | |
no-clone) | |
(progn | |
(throw '--cl-block-straight-use-package-- nil))) | |
(if available nil | |
(straight--clone-repository recipe cause)) | |
(straight--make-build-cache-available) | |
(let* | |
((no-build | |
(or | |
(null local-repo) | |
(straight--build-disabled-p recipe) | |
(if | |
(let | |
((object no-build)) | |
(and | |
(not | |
(memq object | |
'(no-build t))) | |
(functionp object))) | |
(funcall no-build package) | |
no-build))) | |
(modified | |
(or | |
(and straight--packages-to-rebuild | |
(or | |
(eq straight--packages-to-rebuild :all) | |
(gethash package straight--packages-to-rebuild)) | |
(not | |
(gethash package straight--packages-not-to-rebuild)) | |
(puthash package t straight--packages-not-to-rebuild)) | |
(straight--package-might-be-modified-p recipe no-build)))) | |
(let | |
((func | |
(intern | |
(format "straight-recipes-%s-version" package))) | |
(table | |
(gethash | |
(intern package) | |
straight--recipe-lookup-cache))) | |
(if | |
(or modified | |
(not | |
(fboundp func)) | |
(not | |
(equal | |
(and table | |
(gethash 'version table)) | |
(funcall func)))) | |
(progn | |
(remhash | |
(intern package) | |
straight--recipe-lookup-cache)))) | |
(if no-build nil | |
(straight--add-package-to-load-path recipe)) | |
(run-hook-with-args 'straight-use-package-prepare-functions package) | |
(let | |
((tail | |
'(native-comp-deferred-compilation-deny-list native-comp-jit-compilation-deny-list))) | |
(while tail | |
(let | |
((list-var | |
(car tail))) | |
(if | |
(boundp list-var) | |
(progn | |
(let* | |
((build | |
(and t | |
(car | |
(cdr | |
(plist-member recipe :build)))))) | |
(if build | |
(if | |
(and | |
(eq | |
(car-safe build) | |
:not) | |
(member 'native-compile | |
(cdr build))) | |
(progn | |
(set list-var | |
(let* | |
((va | |
(format "^%s" | |
(straight--build-dir package))) | |
(vlist | |
(symbol-value list-var))) | |
(if | |
(cl-member va vlist :test #'string=) | |
vlist | |
(cons va vlist)))))) | |
nil)))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(and modified | |
(not no-build)) | |
(progn | |
(run-hook-with-args 'straight-use-package-pre-build-functions package) | |
(straight--build-package recipe cause))) | |
(straight--declare-successful-build recipe) | |
(if no-build nil | |
(let | |
((tail | |
(straight--get-dependencies package))) | |
(while tail | |
(let | |
((dependency | |
(car tail))) | |
(straight-use-package | |
(intern dependency) | |
nil nil cause) | |
(setq tail | |
(cdr tail))))) | |
(straight--add-package-to-info-path recipe) | |
(straight--activate-package-autoloads recipe)) | |
(if | |
(and interactive | |
(not already-registered)) | |
(progn | |
(straight--output | |
(concat "If you want to keep %s, put " "(straight-use-package %s%S) " "in your init-file.") | |
package "'" | |
(intern package))))) | |
(puthash package t straight--success-cache) | |
t))))) | |
;;;; 21 | |
((progn | |
(if | |
(eq type 'built-in) | |
(progn | |
(throw '--cl-block-straight-use-package-- t))) | |
(straight--transaction-exec | |
(intern | |
(format "use-package-%S-%S-%S" | |
(secure-hash 'md5 | |
(prin1-to-string recipe 'noescape)) | |
(if | |
(let | |
((object no-clone)) | |
(and | |
(not | |
(memq object | |
'(no-clone t))) | |
(functionp object))) | |
(random) | |
no-clone) | |
(if | |
(let | |
((object no-build)) | |
(and | |
(not | |
(memq object | |
'(no-build t))) | |
(functionp object))) | |
(random) | |
no-build))) | |
:now | |
#'(lambda nil | |
(let | |
((already-registered | |
(gethash package straight--success-cache)) | |
(available | |
(or | |
(null local-repo) | |
(straight--repository-is-available-p recipe)))) | |
(if | |
(if | |
(let | |
((object no-clone)) | |
(and | |
(not | |
(memq object | |
'(no-clone t))) | |
(functionp object))) | |
(funcall no-clone package available) | |
no-clone) | |
(progn | |
(throw '--cl-block-straight-use-package-- nil))) | |
(if available nil | |
(straight--clone-repository recipe cause)) | |
(straight--make-build-cache-available) | |
(let* | |
((no-build | |
(or | |
(null local-repo) | |
(straight--build-disabled-p recipe) | |
(if | |
(let | |
((object no-build)) | |
(and | |
(not | |
(memq object | |
'(no-build t))) | |
(functionp object))) | |
(funcall no-build package) | |
no-build))) | |
(modified | |
(or | |
(and straight--packages-to-rebuild | |
(or | |
(eq straight--packages-to-rebuild :all) | |
(gethash package straight--packages-to-rebuild)) | |
(not | |
(gethash package straight--packages-not-to-rebuild)) | |
(puthash package t straight--packages-not-to-rebuild)) | |
(straight--package-might-be-modified-p recipe no-build)))) | |
(let | |
((func | |
(intern | |
(format "straight-recipes-%s-version" package))) | |
(table | |
(gethash | |
(intern package) | |
straight--recipe-lookup-cache))) | |
(if | |
(or modified | |
(not | |
(fboundp func)) | |
(not | |
(equal | |
(and table | |
(gethash 'version table)) | |
(funcall func)))) | |
(progn | |
(remhash | |
(intern package) | |
straight--recipe-lookup-cache)))) | |
(if no-build nil | |
(straight--add-package-to-load-path recipe)) | |
(run-hook-with-args 'straight-use-package-prepare-functions package) | |
(let | |
((tail | |
'(native-comp-deferred-compilation-deny-list native-comp-jit-compilation-deny-list))) | |
(while tail | |
(let | |
((list-var | |
(car tail))) | |
(if | |
(boundp list-var) | |
(progn | |
(let* | |
((build | |
(and t | |
(car | |
(cdr | |
(plist-member recipe :build)))))) | |
(if build | |
(if | |
(and | |
(eq | |
(car-safe build) | |
:not) | |
(member 'native-compile | |
(cdr build))) | |
(progn | |
(set list-var | |
(let* | |
((va | |
(format "^%s" | |
(straight--build-dir package))) | |
(vlist | |
(symbol-value list-var))) | |
(if | |
(cl-member va vlist :test #'string=) | |
vlist | |
(cons va vlist)))))) | |
nil)))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(and modified | |
(not no-build)) | |
(progn | |
(run-hook-with-args 'straight-use-package-pre-build-functions package) | |
(straight--build-package recipe cause))) | |
(straight--declare-successful-build recipe) | |
(if no-build nil | |
(let | |
((tail | |
(straight--get-dependencies package))) | |
(while tail | |
(let | |
((dependency | |
(car tail))) | |
(straight-use-package | |
(intern dependency) | |
nil nil cause) | |
(setq tail | |
(cdr tail))))) | |
(straight--add-package-to-info-path recipe) | |
(straight--activate-package-autoloads recipe)) | |
(if | |
(and interactive | |
(not already-registered)) | |
(progn | |
(straight--output | |
(concat "If you want to keep %s, put " "(straight-use-package %s%S) " "in your init-file.") | |
package "'" | |
(intern package))))) | |
(puthash package t straight--success-cache) | |
t)))) | |
nil) | |
;;;; 22 | |
((let* | |
((--cl-rest-- recipe) | |
(package | |
(car | |
(cdr | |
(plist-member --cl-rest-- ':package)))) | |
(local-repo | |
(car | |
(cdr | |
(plist-member --cl-rest-- ':local-repo)))) | |
(type | |
(car | |
(cdr | |
(plist-member --cl-rest-- ':type))))) | |
(progn | |
(if | |
(eq type 'built-in) | |
(progn | |
(throw '--cl-block-straight-use-package-- t))) | |
(straight--transaction-exec | |
(intern | |
(format "use-package-%S-%S-%S" | |
(secure-hash 'md5 | |
(prin1-to-string recipe 'noescape)) | |
(if | |
(let | |
((object no-clone)) | |
(and | |
(not | |
(memq object | |
'(no-clone t))) | |
(functionp object))) | |
(random) | |
no-clone) | |
(if | |
(let | |
((object no-build)) | |
(and | |
(not | |
(memq object | |
'(no-build t))) | |
(functionp object))) | |
(random) | |
no-build))) | |
:now | |
#'(lambda nil | |
(let | |
((already-registered | |
(gethash package straight--success-cache)) | |
(available | |
(or | |
(null local-repo) | |
(straight--repository-is-available-p recipe)))) | |
(if | |
(if | |
(let | |
((object no-clone)) | |
(and | |
(not | |
(memq object | |
'(no-clone t))) | |
(functionp object))) | |
(funcall no-clone package available) | |
no-clone) | |
(progn | |
(throw '--cl-block-straight-use-package-- nil))) | |
(if available nil | |
(straight--clone-repository recipe cause)) | |
(straight--make-build-cache-available) | |
(let* | |
((no-build | |
(or | |
(null local-repo) | |
(straight--build-disabled-p recipe) | |
(if | |
(let | |
((object no-build)) | |
(and | |
(not | |
(memq object | |
'(no-build t))) | |
(functionp object))) | |
(funcall no-build package) | |
no-build))) | |
(modified | |
(or | |
(and straight--packages-to-rebuild | |
(or | |
(eq straight--packages-to-rebuild :all) | |
(gethash package straight--packages-to-rebuild)) | |
(not | |
(gethash package straight--packages-not-to-rebuild)) | |
(puthash package t straight--packages-not-to-rebuild)) | |
(straight--package-might-be-modified-p recipe no-build)))) | |
(let | |
((func | |
(intern | |
(format "straight-recipes-%s-version" package))) | |
(table | |
(gethash | |
(intern package) | |
straight--recipe-lookup-cache))) | |
(if | |
(or modified | |
(not | |
(fboundp func)) | |
(not | |
(equal | |
(and table | |
(gethash 'version table)) | |
(funcall func)))) | |
(progn | |
(remhash | |
(intern package) | |
straight--recipe-lookup-cache)))) | |
(if no-build nil | |
(straight--add-package-to-load-path recipe)) | |
(run-hook-with-args 'straight-use-package-prepare-functions package) | |
(let | |
((tail | |
'(native-comp-deferred-compilation-deny-list native-comp-jit-compilation-deny-list))) | |
(while tail | |
(let | |
((list-var | |
(car tail))) | |
(if | |
(boundp list-var) | |
(progn | |
(let* | |
((build | |
(and t | |
(car | |
(cdr | |
(plist-member recipe :build)))))) | |
(if build | |
(if | |
(and | |
(eq | |
(car-safe build) | |
:not) | |
(member 'native-compile | |
(cdr build))) | |
(progn | |
(set list-var | |
(let* | |
((va | |
(format "^%s" | |
(straight--build-dir package))) | |
(vlist | |
(symbol-value list-var))) | |
(if | |
(cl-member va vlist :test #'string=) | |
vlist | |
(cons va vlist)))))) | |
nil)))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(and modified | |
(not no-build)) | |
(progn | |
(run-hook-with-args 'straight-use-package-pre-build-functions package) | |
(straight--build-package recipe cause))) | |
(straight--declare-successful-build recipe) | |
(if no-build nil | |
(let | |
((tail | |
(straight--get-dependencies package))) | |
(while tail | |
(let | |
((dependency | |
(car tail))) | |
(straight-use-package | |
(intern dependency) | |
nil nil cause) | |
(setq tail | |
(cdr tail))))) | |
(straight--add-package-to-info-path recipe) | |
(straight--activate-package-autoloads recipe)) | |
(if | |
(and interactive | |
(not already-registered)) | |
(progn | |
(straight--output | |
(concat "If you want to keep %s, put " "(straight-use-package %s%S) " "in your init-file.") | |
package "'" | |
(intern package))))) | |
(puthash package t straight--success-cache) | |
t))))) | |
((melpa-style-recipe melpa :type git :host github :repo "melpa/melpa" :build nil) | |
(no-clone closure | |
(t) | |
(_package available) | |
(not available)) | |
(no-build) | |
(cause) | |
(interactive) | |
(recipe :type git :host github :repo "melpa/melpa" :build nil :package "melpa" :local-repo "melpa") | |
(--cl-rest-- :type git :host github :repo "melpa/melpa" :build nil :package "melpa" :local-repo "melpa") | |
(package . "melpa") | |
(local-repo . "melpa") | |
(type . git))) | |
;;;; 23 | |
((let | |
((recipe | |
(straight--convert-recipe | |
(or | |
(straight--get-overridden-recipe | |
(if | |
(listp melpa-style-recipe) | |
(car melpa-style-recipe) | |
melpa-style-recipe)) | |
melpa-style-recipe) | |
cause))) | |
(straight--register-recipe recipe) | |
(let* | |
((--cl-rest-- recipe) | |
(package | |
(car | |
(cdr | |
(plist-member --cl-rest-- ':package)))) | |
(local-repo | |
(car | |
(cdr | |
(plist-member --cl-rest-- ':local-repo)))) | |
(type | |
(car | |
(cdr | |
(plist-member --cl-rest-- ':type))))) | |
(progn | |
(if | |
(eq type 'built-in) | |
(progn | |
(throw '--cl-block-straight-use-package-- t))) | |
(straight--transaction-exec | |
(intern | |
(format "use-package-%S-%S-%S" | |
(secure-hash 'md5 | |
(prin1-to-string recipe 'noescape)) | |
(if | |
(let | |
((object no-clone)) | |
(and | |
(not | |
(memq object | |
'(no-clone t))) | |
(functionp object))) | |
(random) | |
no-clone) | |
(if | |
(let | |
((object no-build)) | |
(and | |
(not | |
(memq object | |
'(no-build t))) | |
(functionp object))) | |
(random) | |
no-build))) | |
:now | |
#'(lambda nil | |
(let | |
((already-registered | |
(gethash package straight--success-cache)) | |
(available | |
(or | |
(null local-repo) | |
(straight--repository-is-available-p recipe)))) | |
(if | |
(if | |
(let | |
((object no-clone)) | |
(and | |
(not | |
(memq object | |
'(no-clone t))) | |
(functionp object))) | |
(funcall no-clone package available) | |
no-clone) | |
(progn | |
(throw '--cl-block-straight-use-package-- nil))) | |
(if available nil | |
(straight--clone-repository recipe cause)) | |
(straight--make-build-cache-available) | |
(let* | |
((no-build | |
(or | |
(null local-repo) | |
(straight--build-disabled-p recipe) | |
(if | |
(let | |
((object no-build)) | |
(and | |
(not | |
(memq object | |
'(no-build t))) | |
(functionp object))) | |
(funcall no-build package) | |
no-build))) | |
(modified | |
(or | |
(and straight--packages-to-rebuild | |
(or | |
(eq straight--packages-to-rebuild :all) | |
(gethash package straight--packages-to-rebuild)) | |
(not | |
(gethash package straight--packages-not-to-rebuild)) | |
(puthash package t straight--packages-not-to-rebuild)) | |
(straight--package-might-be-modified-p recipe no-build)))) | |
(let | |
((func | |
(intern | |
(format "straight-recipes-%s-version" package))) | |
(table | |
(gethash | |
(intern package) | |
straight--recipe-lookup-cache))) | |
(if | |
(or modified | |
(not | |
(fboundp func)) | |
(not | |
(equal | |
(and table | |
(gethash 'version table)) | |
(funcall func)))) | |
(progn | |
(remhash | |
(intern package) | |
straight--recipe-lookup-cache)))) | |
(if no-build nil | |
(straight--add-package-to-load-path recipe)) | |
(run-hook-with-args 'straight-use-package-prepare-functions package) | |
(let | |
((tail | |
'(native-comp-deferred-compilation-deny-list native-comp-jit-compilation-deny-list))) | |
(while tail | |
(let | |
((list-var | |
(car tail))) | |
(if | |
(boundp list-var) | |
(progn | |
(let* | |
((build | |
(and t | |
(car | |
(cdr | |
(plist-member recipe :build)))))) | |
(if build | |
(if | |
(and | |
(eq | |
(car-safe build) | |
:not) | |
(member 'native-compile | |
(cdr build))) | |
(progn | |
(set list-var | |
(let* | |
((va | |
(format "^%s" | |
(straight--build-dir package))) | |
(vlist | |
(symbol-value list-var))) | |
(if | |
(cl-member va vlist :test #'string=) | |
vlist | |
(cons va vlist)))))) | |
nil)))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(and modified | |
(not no-build)) | |
(progn | |
(run-hook-with-args 'straight-use-package-pre-build-functions package) | |
(straight--build-package recipe cause))) | |
(straight--declare-successful-build recipe) | |
(if no-build nil | |
(let | |
((tail | |
(straight--get-dependencies package))) | |
(while tail | |
(let | |
((dependency | |
(car tail))) | |
(straight-use-package | |
(intern dependency) | |
nil nil cause) | |
(setq tail | |
(cdr tail))))) | |
(straight--add-package-to-info-path recipe) | |
(straight--activate-package-autoloads recipe)) | |
(if | |
(and interactive | |
(not already-registered)) | |
(progn | |
(straight--output | |
(concat "If you want to keep %s, put " "(straight-use-package %s%S) " "in your init-file.") | |
package "'" | |
(intern package))))) | |
(puthash package t straight--success-cache) | |
t)))))) | |
((melpa-style-recipe melpa :type git :host github :repo "melpa/melpa" :build nil) | |
(no-clone closure | |
(t) | |
(_package available) | |
(not available)) | |
(no-build) | |
(cause) | |
(interactive) | |
(recipe :type git :host github :repo "melpa/melpa" :build nil :package "melpa" :local-repo "melpa"))) | |
;;;; 24 | |
((catch '--cl-block-straight-use-package-- | |
(let | |
((recipe | |
(straight--convert-recipe | |
(or | |
(straight--get-overridden-recipe | |
(if | |
(listp melpa-style-recipe) | |
(car melpa-style-recipe) | |
melpa-style-recipe)) | |
melpa-style-recipe) | |
cause))) | |
(straight--register-recipe recipe) | |
(let* | |
((--cl-rest-- recipe) | |
(package | |
(car | |
(cdr | |
(plist-member --cl-rest-- ':package)))) | |
(local-repo | |
(car | |
(cdr | |
(plist-member --cl-rest-- ':local-repo)))) | |
(type | |
(car | |
(cdr | |
(plist-member --cl-rest-- ':type))))) | |
(progn | |
(if | |
(eq type 'built-in) | |
(progn | |
(throw '--cl-block-straight-use-package-- t))) | |
(straight--transaction-exec | |
(intern | |
(format "use-package-%S-%S-%S" | |
(secure-hash 'md5 | |
(prin1-to-string recipe 'noescape)) | |
(if | |
(let | |
((object no-clone)) | |
(and | |
(not | |
(memq object | |
'(no-clone t))) | |
(functionp object))) | |
(random) | |
no-clone) | |
(if | |
(let | |
((object no-build)) | |
(and | |
(not | |
(memq object | |
'(no-build t))) | |
(functionp object))) | |
(random) | |
no-build))) | |
:now | |
#'(lambda nil | |
(let | |
((already-registered | |
(gethash package straight--success-cache)) | |
(available | |
(or | |
(null local-repo) | |
(straight--repository-is-available-p recipe)))) | |
(if | |
(if | |
(let | |
((object no-clone)) | |
(and | |
(not | |
(memq object | |
'(no-clone t))) | |
(functionp object))) | |
(funcall no-clone package available) | |
no-clone) | |
(progn | |
(throw '--cl-block-straight-use-package-- nil))) | |
(if available nil | |
(straight--clone-repository recipe cause)) | |
(straight--make-build-cache-available) | |
(let* | |
((no-build | |
(or | |
(null local-repo) | |
(straight--build-disabled-p recipe) | |
(if | |
(let | |
((object no-build)) | |
(and | |
(not | |
(memq object | |
'(no-build t))) | |
(functionp object))) | |
(funcall no-build package) | |
no-build))) | |
(modified | |
(or | |
(and straight--packages-to-rebuild | |
(or | |
(eq straight--packages-to-rebuild :all) | |
(gethash package straight--packages-to-rebuild)) | |
(not | |
(gethash package straight--packages-not-to-rebuild)) | |
(puthash package t straight--packages-not-to-rebuild)) | |
(straight--package-might-be-modified-p recipe no-build)))) | |
(let | |
((func | |
(intern | |
(format "straight-recipes-%s-version" package))) | |
(table | |
(gethash | |
(intern package) | |
straight--recipe-lookup-cache))) | |
(if | |
(or modified | |
(not | |
(fboundp func)) | |
(not | |
(equal | |
(and table | |
(gethash 'version table)) | |
(funcall func)))) | |
(progn | |
(remhash | |
(intern package) | |
straight--recipe-lookup-cache)))) | |
(if no-build nil | |
(straight--add-package-to-load-path recipe)) | |
(run-hook-with-args 'straight-use-package-prepare-functions package) | |
(let | |
((tail | |
'(native-comp-deferred-compilation-deny-list native-comp-jit-compilation-deny-list))) | |
(while tail | |
(let | |
((list-var | |
(car tail))) | |
(if | |
(boundp list-var) | |
(progn | |
(let* | |
((build | |
(and t | |
(car | |
(cdr | |
(plist-member recipe :build)))))) | |
(if build | |
(if | |
(and | |
(eq | |
(car-safe build) | |
:not) | |
(member 'native-compile | |
(cdr build))) | |
(progn | |
(set list-var | |
(let* | |
((va | |
(format "^%s" | |
(straight--build-dir package))) | |
(vlist | |
(symbol-value list-var))) | |
(if | |
(cl-member va vlist :test #'string=) | |
vlist | |
(cons va vlist)))))) | |
nil)))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(and modified | |
(not no-build)) | |
(progn | |
(run-hook-with-args 'straight-use-package-pre-build-functions package) | |
(straight--build-package recipe cause))) | |
(straight--declare-successful-build recipe) | |
(if no-build nil | |
(let | |
((tail | |
(straight--get-dependencies package))) | |
(while tail | |
(let | |
((dependency | |
(car tail))) | |
(straight-use-package | |
(intern dependency) | |
nil nil cause) | |
(setq tail | |
(cdr tail))))) | |
(straight--add-package-to-info-path recipe) | |
(straight--activate-package-autoloads recipe)) | |
(if | |
(and interactive | |
(not already-registered)) | |
(progn | |
(straight--output | |
(concat "If you want to keep %s, put " "(straight-use-package %s%S) " "in your init-file.") | |
package "'" | |
(intern package))))) | |
(puthash package t straight--success-cache) | |
t))))))) | |
nil) | |
;;;; 25 | |
((straight-use-package | |
(melpa :type git :host github :repo "melpa/melpa" :build nil) | |
(closure | |
(t) | |
(_package available) | |
(not available))) | |
((melpa-style-recipe melpa :type git :host github :repo "melpa/melpa" :build nil) | |
(no-clone closure | |
(t) | |
(_package available) | |
(not available)) | |
(no-build) | |
(cause) | |
(interactive))) | |
;;;; 26 | |
((straight-use-package-lazy | |
(melpa :type git :host github :repo "melpa/melpa" :build nil)) | |
((melpa-style-recipe melpa :type git :host github :repo "melpa/melpa" :build nil))) | |
;;;; 27 | |
((straight-use-recipes | |
(melpa :type git :host github :repo "melpa/melpa" :build nil)) | |
((melpa-style-recipe melpa :type git :host github :repo "melpa/melpa" :build nil))) | |
;;;; 28 | |
((mapc straight-use-recipes | |
((org-elpa :local-repo nil) | |
(melpa :type git :host github :repo "melpa/melpa" :build nil) | |
(nongnu-elpa :type git :repo "https://git.savannah.gnu.org/git/emacs/nongnu.git" :local-repo "nongnu-elpa" :build nil) | |
(gnu-elpa-mirror :type git :host github :repo "emacs-straight/gnu-elpa-mirror" :build nil) | |
(el-get :type git :host github :repo "dimitri/el-get" :build nil) | |
(emacsmirror-mirror :type git :host github :repo "emacs-straight/emacsmirror-mirror" :build nil))) | |
nil) | |
;;;; 29 | |
((let | |
((repo-dir | |
(doom-path straight-base-dir "straight/repos/straight.el")) | |
(repo-url | |
(concat "http" | |
(if gnutls-verify-error "s") | |
"://github.com/" | |
(or | |
(plist-get recipe :repo) | |
"radian-software/straight.el"))) | |
(branch | |
(or | |
(plist-get recipe :branch) | |
straight-repository-branch)) | |
(call | |
(if init-file-debug | |
#'(lambda | |
(&rest args) | |
(doom-print | |
(doom-print--format "%s" | |
(cdr | |
(apply #'doom-call-process args))))) | |
#'(lambda | |
(&rest args) | |
(apply #'doom-call-process args))))) | |
(if | |
(file-directory-p repo-dir) | |
nil | |
(let | |
((saved-match-data | |
(match-data))) | |
(unwind-protect | |
(progn | |
(if | |
(executable-find "git") | |
nil | |
(user-error "Git isn't present on your system. Cannot proceed.")) | |
(let* | |
((version | |
(cdr | |
(doom-call-process "git" "version"))) | |
(version | |
(and | |
(string-match "\\_<[0-9]+\\.[0-9]+\\(\\.[0-9]+\\)\\_>" version) | |
(match-string 0 version)))) | |
(if version | |
(if | |
(version< version "2.23") | |
(progn | |
(user-error "Git %s detected! Doom requires git 2.23 or newer!" version)))))) | |
(set-match-data saved-match-data t))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Installing straight..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(let* | |
((options | |
(ensure-list straight-vc-git-default-clone-depth)) | |
(depth | |
(if options | |
(car-safe | |
(prog1 options | |
(setq options | |
(cdr options)))) | |
(signal 'wrong-number-of-arguments | |
(list | |
'(depth . options) | |
(length options)))))) | |
(let | |
((branch-switch | |
(if | |
(memq 'single-branch options) | |
"--single-branch" "--no-single-branch"))) | |
(cond | |
((eq 'full depth) | |
(funcall call "git" "clone" "--origin" "origin" branch-switch repo-url repo-dir)) | |
((integerp depth) | |
(if | |
(null pin) | |
(progn | |
(if | |
(file-directory-p repo-dir) | |
(progn | |
(delete-directory repo-dir 'recursive))) | |
(funcall call "git" "clone" "--origin" "origin" repo-url "--no-checkout" repo-dir "--depth" | |
(number-to-string depth) | |
branch-switch "--no-tags" "--branch" straight-repository-branch)) | |
(make-directory repo-dir 'recursive) | |
(let | |
((default-directory repo-dir)) | |
(funcall call "git" "init") | |
(funcall call "git" "branch" "-m" straight-repository-branch) | |
(funcall call "git" "remote" "add" "origin" repo-url "--master" straight-repository-branch) | |
(funcall call "git" "fetch" "origin" pin "--depth" | |
(number-to-string depth) | |
"--no-tags") | |
(funcall call "git" "reset" "--hard" pin)))))))))) | |
(require 'straight | |
(concat repo-dir "/straight.el")) | |
(if doom-inhibit-log nil | |
(doom--log "Initializing recipes")) | |
(mapc #'straight-use-recipes | |
'((org-elpa :local-repo nil) | |
(melpa :type git :host github :repo "melpa/melpa" :build nil) | |
(nongnu-elpa :type git :repo "https://git.savannah.gnu.org/git/emacs/nongnu.git" :local-repo "nongnu-elpa" :build nil) | |
(gnu-elpa-mirror :type git :host github :repo "emacs-straight/gnu-elpa-mirror" :build nil) | |
(el-get :type git :host github :repo "dimitri/el-get" :build nil) | |
(emacsmirror-mirror :type git :host github :repo "emacs-straight/emacsmirror-mirror" :build nil)))) | |
((recipe :host github :repo "radian-software/straight.el" :branch "develop" :local-repo "straight.el" :files | |
("straight*.el")) | |
(pin . "b1062df10ba4c10ff7a3c61b9e124b3242b11bb2") | |
(repo-dir . "/home/sukbeom/.config/emacs/.local/straight/repos/straight.el") | |
(repo-url . "https://github.com/radian-software/straight.el") | |
(branch . "develop") | |
(call closure | |
(t) | |
(&rest args) | |
(apply #'doom-call-process args)))) | |
;;;; 30 | |
((let | |
((process-environment | |
(copy-sequence process-environment))) | |
(setenv "GIT_CONFIG" nil) | |
(setenv "GIT_CONFIG_NOSYSTEM" "1") | |
(setenv "GIT_CONFIG_GLOBAL" | |
(or | |
(getenv "DOOMGITCONFIG") | |
"/dev/null")) | |
(let | |
((repo-dir | |
(doom-path straight-base-dir "straight/repos/straight.el")) | |
(repo-url | |
(concat "http" | |
(if gnutls-verify-error "s") | |
"://github.com/" | |
(or | |
(plist-get recipe :repo) | |
"radian-software/straight.el"))) | |
(branch | |
(or | |
(plist-get recipe :branch) | |
straight-repository-branch)) | |
(call | |
(if init-file-debug | |
#'(lambda | |
(&rest args) | |
(doom-print | |
(doom-print--format "%s" | |
(cdr | |
(apply #'doom-call-process args))))) | |
#'(lambda | |
(&rest args) | |
(apply #'doom-call-process args))))) | |
(if | |
(file-directory-p repo-dir) | |
nil | |
(let | |
((saved-match-data | |
(match-data))) | |
(unwind-protect | |
(progn | |
(if | |
(executable-find "git") | |
nil | |
(user-error "Git isn't present on your system. Cannot proceed.")) | |
(let* | |
((version | |
(cdr | |
(doom-call-process "git" "version"))) | |
(version | |
(and | |
(string-match "\\_<[0-9]+\\.[0-9]+\\(\\.[0-9]+\\)\\_>" version) | |
(match-string 0 version)))) | |
(if version | |
(if | |
(version< version "2.23") | |
(progn | |
(user-error "Git %s detected! Doom requires git 2.23 or newer!" version)))))) | |
(set-match-data saved-match-data t))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Installing straight..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(let* | |
((options | |
(ensure-list straight-vc-git-default-clone-depth)) | |
(depth | |
(if options | |
(car-safe | |
(prog1 options | |
(setq options | |
(cdr options)))) | |
(signal 'wrong-number-of-arguments | |
(list | |
'(depth . options) | |
(length options)))))) | |
(let | |
((branch-switch | |
(if | |
(memq 'single-branch options) | |
"--single-branch" "--no-single-branch"))) | |
(cond | |
((eq 'full depth) | |
(funcall call "git" "clone" "--origin" "origin" branch-switch repo-url repo-dir)) | |
((integerp depth) | |
(if | |
(null pin) | |
(progn | |
(if | |
(file-directory-p repo-dir) | |
(progn | |
(delete-directory repo-dir 'recursive))) | |
(funcall call "git" "clone" "--origin" "origin" repo-url "--no-checkout" repo-dir "--depth" | |
(number-to-string depth) | |
branch-switch "--no-tags" "--branch" straight-repository-branch)) | |
(make-directory repo-dir 'recursive) | |
(let | |
((default-directory repo-dir)) | |
(funcall call "git" "init") | |
(funcall call "git" "branch" "-m" straight-repository-branch) | |
(funcall call "git" "remote" "add" "origin" repo-url "--master" straight-repository-branch) | |
(funcall call "git" "fetch" "origin" pin "--depth" | |
(number-to-string depth) | |
"--no-tags") | |
(funcall call "git" "reset" "--hard" pin)))))))))) | |
(require 'straight | |
(concat repo-dir "/straight.el")) | |
(if doom-inhibit-log nil | |
(doom--log "Initializing recipes")) | |
(mapc #'straight-use-recipes | |
'((org-elpa :local-repo nil) | |
(melpa :type git :host github :repo "melpa/melpa" :build nil) | |
(nongnu-elpa :type git :repo "https://git.savannah.gnu.org/git/emacs/nongnu.git" :local-repo "nongnu-elpa" :build nil) | |
(gnu-elpa-mirror :type git :host github :repo "emacs-straight/gnu-elpa-mirror" :build nil) | |
(el-get :type git :host github :repo "dimitri/el-get" :build nil) | |
(emacsmirror-mirror :type git :host github :repo "emacs-straight/emacsmirror-mirror" :build nil))))) | |
((process-environment "GIT_CONFIG_GLOBAL=/dev/null" "GIT_CONFIG_NOSYSTEM=1" "GIT_CONFIG" "_=/usr/bin/emacs" "TERM_PROGRAM=WezTerm" "OLDPWD=/home/sukbeom/workspace" "PULSE_SERVER=unix:/mnt/wslg/PulseServer" "HOSTTYPE=x86_64" "PATH=/home/sukbeom/.config/emacs/bin/:/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/bin:/usr/lib/llvm/17/bin" "WSLENV=BASH_ENV/u:TERM:COLORTERM:TERM_PROGRAM:TERM_PROGRAM_VERSION" "GCC_SPECS=" "XDG_RUNTIME_DIR=/mnt/wslg/runtime-dir" "LEX=flex" "PAGER=/usr/bin/less" "BASH_ENV=/etc/bash.bashrc" "SHLVL=2" "DISPLAY=172.29.112.1:0.0" "MANPAGER=manpager" "USER=sukbeom" "LESSOPEN=|lesspipe %s" "__DOOMPID=18982" "TERM=xterm-256color" "INFOPATH=/usr/share/info/emacs-29:/usr/share/gcc-data/x86_64-pc-linux-gnu/13/info:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.41/info:/usr/share/autoconf-2.71/info:/usr/share/automake-1.16.5/info:/usr/share/info" "WAYLAND_DISPLAY=wayland-0" "LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.cfg=00;32:*.conf=00;32:*.diff=00;32:*.doc=00;32:*.ini=00;32:*.log=00;32:*.patch=00;32:*.pdf=00;32:*.ps=00;32:*.tex=00;32:*.txt=00;32:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*~=00;90:*#=00;90:*.bak=00;90:*.crdownload=00;90:*.dpkg-dist=00;90:*.dpkg-new=00;90:*.dpkg-old=00;90:*.dpkg-tmp=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:*.swp=00;90:*.tmp=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:" "__DOOMGPIPE=" "WSL_INTEROP=/run/WSL/9_interop" "LANG=en_US.UTF-8" "HOME=/home/sukbeom" "MANPATH=/usr/share/gcc-data/x86_64-pc-linux-gnu/13/man:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.41/man:/usr/local/share/man:/usr/share/man:/usr/lib/rust/man:/usr/lib/llvm/17/share/man" "LOGNAME=sukbeom" "CONFIG_PROTECT=/usr/share/gnupg/qualified.txt" "PWD=/home/sukbeom/workspace/fwdn-writer-server" "NAME=LAPTOP-R4FQS2C5" "EDITOR=vi" "__DOOMSTEP=0" "__DOOMGEOM=182x40" "__DOOMPIPE=" "WSL_DISTRO_NAME=Gentoo" "CONFIG_PROTECT_MASK=/etc/sandbox.d /etc/fonts/fonts.conf /etc/gentoo-release /etc/ca-certificates.conf /etc/revdep-rebuild" "TERM_PROGRAM_VERSION=20240203-110809-5046fc22" "WSL2_GUI_APPS_ENABLED=1" "LESS=-R -M --shift 5" "COLORTERM=truecolor" "SHELL=/bin/bash"))) | |
;;;; 31 | |
((doom--ensure-straight | |
(:host github :repo "radian-software/straight.el" :branch "develop" :local-repo "straight.el" :files | |
("straight*.el")) | |
"b1062df10ba4c10ff7a3c61b9e124b3242b11bb2") | |
((recipe :host github :repo "radian-software/straight.el" :branch "develop" :local-repo "straight.el" :files | |
("straight*.el")) | |
(pin . "b1062df10ba4c10ff7a3c61b9e124b3242b11bb2"))) | |
;;;; 32 | |
((let* | |
((--cl-rest-- | |
(alist-get 'straight packages)) | |
(recipe | |
(car | |
(cdr | |
(plist-member --cl-rest-- ':recipe)))) | |
(pin | |
(car | |
(cdr | |
(plist-member --cl-rest-- ':pin))))) | |
(doom--ensure-straight recipe pin)) | |
((force-p) | |
(packages | |
(auto-minor-mode :modules | |
((:core)) | |
:pin "17cfa1b54800fdef2975c0c0531dad34846a5065") | |
(compat :modules | |
((:core)) | |
:recipe | |
(:host github :repo "emacs-compat/compat") | |
:pin "8d4e8a366681def88751f5e9975738ecd3180deb") | |
(gcmh :modules | |
((:core)) | |
:pin "0089f9c3a6d4e9a310d0791cf6fa8f35642ecfd9") | |
(straight :modules | |
((:core)) | |
:type core :recipe | |
(:host github :repo "radian-software/straight.el" :branch "develop" :local-repo "straight.el" :files | |
("straight*.el")) | |
:pin "b1062df10ba4c10ff7a3c61b9e124b3242b11bb2") | |
(nerd-icons :modules | |
((:core)) | |
:pin "8095215a503d8048739de8b4ea4066598edb8cbb") | |
(hide-mode-line :modules | |
((:core)) | |
:pin "bc5d293576c5e08c29e694078b96a5ed85631942") | |
(highlight-numbers :modules | |
((:core)) | |
:pin "8b4744c7f46c72b1d3d599d4fb75ef8183dee307") | |
(rainbow-delimiters :modules | |
((:core)) | |
:pin "f40ece58df8b2f0fb6c8576b527755a552a5e763") | |
(restart-emacs :modules | |
((:core)) | |
:pin "1607da2bc657fe05ae01f7fdf26f716eafead02c") | |
(better-jumper :modules | |
((:core)) | |
:pin "47622213783ece37d5337dc28d33b530540fc319") | |
(dtrt-indent :modules | |
((:core)) | |
:pin "5d1b44f9a1a484ca229cc14f8062609a10ef4891") | |
(helpful :modules | |
((:core)) | |
:pin "a32a5b3d959a7fccf09a71d97b3d7c888ac31c69") | |
(pcre2el :modules | |
((:core)) | |
:pin "380723b2701cceb75c266440fb8db918f3340d50") | |
(smartparens :modules | |
((:core)) | |
:pin "ddc6233ea6fc2da7a3a8e44face465c15631b02b") | |
(ws-butler :modules | |
((:core)) | |
:recipe | |
(:host github :repo "hlissner/ws-butler") | |
:pin "572a10c11b6cb88293de48acbb59a059d36f9ba5") | |
(projectile :modules | |
((:core)) | |
:pin "0163b335a18af0f077a474d4dc6b36e22b5e3274") | |
(project :modules | |
((:core)) | |
:pin "b6989856abe9411872bdff5c8aa190bef4d86409") | |
(general :modules | |
((:core)) | |
:pin "ced143c30de8e20f5a3761a465e684a1dc48471e") | |
(which-key :modules | |
((:core)) | |
:pin "96911a1d3faf8426a33241f4821319e98421f380")) | |
(--cl-rest-- :modules | |
((:core)) | |
:type core :recipe | |
(:host github :repo "radian-software/straight.el" :branch "develop" :local-repo "straight.el" :files | |
("straight*.el")) | |
:pin "b1062df10ba4c10ff7a3c61b9e124b3242b11bb2") | |
(recipe :host github :repo "radian-software/straight.el" :branch "develop" :local-repo "straight.el" :files | |
("straight*.el")) | |
(pin . "b1062df10ba4c10ff7a3c61b9e124b3242b11bb2"))) | |
;;;; 33 | |
((let | |
((packages | |
(doom-package-list | |
'((:core))))) | |
(let* | |
((--cl-rest-- | |
(alist-get 'straight packages)) | |
(recipe | |
(car | |
(cdr | |
(plist-member --cl-rest-- ':recipe)))) | |
(pin | |
(car | |
(cdr | |
(plist-member --cl-rest-- ':pin))))) | |
(doom--ensure-straight recipe pin)) | |
(doom--ensure-core-packages | |
(seq-filter | |
#'(lambda | |
(%) | |
(eq | |
(plist-get | |
(cdr %) | |
:type) | |
'core)) | |
packages))) | |
((force-p) | |
(packages | |
(auto-minor-mode :modules | |
((:core)) | |
:pin "17cfa1b54800fdef2975c0c0531dad34846a5065") | |
(compat :modules | |
((:core)) | |
:recipe | |
(:host github :repo "emacs-compat/compat") | |
:pin "8d4e8a366681def88751f5e9975738ecd3180deb") | |
(gcmh :modules | |
((:core)) | |
:pin "0089f9c3a6d4e9a310d0791cf6fa8f35642ecfd9") | |
(straight :modules | |
((:core)) | |
:type core :recipe | |
(:host github :repo "radian-software/straight.el" :branch "develop" :local-repo "straight.el" :files | |
("straight*.el")) | |
:pin "b1062df10ba4c10ff7a3c61b9e124b3242b11bb2") | |
(nerd-icons :modules | |
((:core)) | |
:pin "8095215a503d8048739de8b4ea4066598edb8cbb") | |
(hide-mode-line :modules | |
((:core)) | |
:pin "bc5d293576c5e08c29e694078b96a5ed85631942") | |
(highlight-numbers :modules | |
((:core)) | |
:pin "8b4744c7f46c72b1d3d599d4fb75ef8183dee307") | |
(rainbow-delimiters :modules | |
((:core)) | |
:pin "f40ece58df8b2f0fb6c8576b527755a552a5e763") | |
(restart-emacs :modules | |
((:core)) | |
:pin "1607da2bc657fe05ae01f7fdf26f716eafead02c") | |
(better-jumper :modules | |
((:core)) | |
:pin "47622213783ece37d5337dc28d33b530540fc319") | |
(dtrt-indent :modules | |
((:core)) | |
:pin "5d1b44f9a1a484ca229cc14f8062609a10ef4891") | |
(helpful :modules | |
((:core)) | |
:pin "a32a5b3d959a7fccf09a71d97b3d7c888ac31c69") | |
(pcre2el :modules | |
((:core)) | |
:pin "380723b2701cceb75c266440fb8db918f3340d50") | |
(smartparens :modules | |
((:core)) | |
:pin "ddc6233ea6fc2da7a3a8e44face465c15631b02b") | |
(ws-butler :modules | |
((:core)) | |
:recipe | |
(:host github :repo "hlissner/ws-butler") | |
:pin "572a10c11b6cb88293de48acbb59a059d36f9ba5") | |
(projectile :modules | |
((:core)) | |
:pin "0163b335a18af0f077a474d4dc6b36e22b5e3274") | |
(project :modules | |
((:core)) | |
:pin "b6989856abe9411872bdff5c8aa190bef4d86409") | |
(general :modules | |
((:core)) | |
:pin "ced143c30de8e20f5a3761a465e684a1dc48471e") | |
(which-key :modules | |
((:core)) | |
:pin "96911a1d3faf8426a33241f4821319e98421f380")))) | |
;;;; 34 | |
((progn | |
(if doom-inhibit-log nil | |
(doom--log "Initializing straight")) | |
(let | |
((packages | |
(doom-package-list | |
'((:core))))) | |
(let* | |
((--cl-rest-- | |
(alist-get 'straight packages)) | |
(recipe | |
(car | |
(cdr | |
(plist-member --cl-rest-- ':recipe)))) | |
(pin | |
(car | |
(cdr | |
(plist-member --cl-rest-- ':pin))))) | |
(doom--ensure-straight recipe pin)) | |
(doom--ensure-core-packages | |
(seq-filter | |
#'(lambda | |
(%) | |
(eq | |
(plist-get | |
(cdr %) | |
:type) | |
'core)) | |
packages)))) | |
nil) | |
;;;; 35 | |
((if | |
(or force-p | |
(null | |
(and | |
(boundp 'straight-recipe-repositories) | |
straight-recipe-repositories))) | |
(progn | |
(if doom-inhibit-log nil | |
(doom--log "Initializing straight")) | |
(let | |
((packages | |
(doom-package-list | |
'((:core))))) | |
(let* | |
((--cl-rest-- | |
(alist-get 'straight packages)) | |
(recipe | |
(car | |
(cdr | |
(plist-member --cl-rest-- ':recipe)))) | |
(pin | |
(car | |
(cdr | |
(plist-member --cl-rest-- ':pin))))) | |
(doom--ensure-straight recipe pin)) | |
(doom--ensure-core-packages | |
(seq-filter | |
#'(lambda | |
(%) | |
(eq | |
(plist-get | |
(cdr %) | |
:type) | |
'core)) | |
packages))))) | |
nil) | |
;;;; 36 | |
((doom-initialize-core-packages nil) | |
((force-p))) | |
;;;; 37 | |
((doom-initialize-packages) | |
((force-p))) | |
;;;; 38 | |
(((closure | |
(t) | |
nil | |
(doom-initialize-packages))) | |
nil) | |
;;;; 39 | |
((eval-after-load-helper "/home/sukbeom/.config/emacs/.local/straight/repos/straight.el/straight.el") | |
nil) | |
;;;; 40 | |
((do-after-load-evaluation "/home/sukbeom/.config/emacs/.local/straight/repos/straight.el/straight.el") | |
nil) | |
;;;; 41 | |
((load-with-code-conversion "/home/sukbeom/.config/emacs/.local/straight/repos/straight.el/straight.el" "/home/sukbeom/.config/emacs/.local/straight/repos/straight.el/straight.el" nil t) | |
((load-in-progress . t))) | |
;;;; 42 | |
((require straight "/home/sukbeom/.config/emacs/.local/straight/repos/straight.el/straight.el") | |
((lexical-binding) | |
(lread--unescaped-character-literals))) | |
;;;; 43 | |
((let | |
((repo-dir | |
(doom-path straight-base-dir "straight/repos/straight.el")) | |
(repo-url | |
(concat "http" | |
(if gnutls-verify-error "s") | |
"://github.com/" | |
(or | |
(plist-get recipe :repo) | |
"radian-software/straight.el"))) | |
(branch | |
(or | |
(plist-get recipe :branch) | |
straight-repository-branch)) | |
(call | |
(if init-file-debug | |
#'(lambda | |
(&rest args) | |
(doom-print | |
(doom-print--format "%s" | |
(cdr | |
(apply #'doom-call-process args))))) | |
#'(lambda | |
(&rest args) | |
(apply #'doom-call-process args))))) | |
(if | |
(file-directory-p repo-dir) | |
nil | |
(let | |
((saved-match-data | |
(match-data))) | |
(unwind-protect | |
(progn | |
(if | |
(executable-find "git") | |
nil | |
(user-error "Git isn't present on your system. Cannot proceed.")) | |
(let* | |
((version | |
(cdr | |
(doom-call-process "git" "version"))) | |
(version | |
(and | |
(string-match "\\_<[0-9]+\\.[0-9]+\\(\\.[0-9]+\\)\\_>" version) | |
(match-string 0 version)))) | |
(if version | |
(if | |
(version< version "2.23") | |
(progn | |
(user-error "Git %s detected! Doom requires git 2.23 or newer!" version)))))) | |
(set-match-data saved-match-data t))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Installing straight..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(let* | |
((options | |
(ensure-list straight-vc-git-default-clone-depth)) | |
(depth | |
(if options | |
(car-safe | |
(prog1 options | |
(setq options | |
(cdr options)))) | |
(signal 'wrong-number-of-arguments | |
(list | |
'(depth . options) | |
(length options)))))) | |
(let | |
((branch-switch | |
(if | |
(memq 'single-branch options) | |
"--single-branch" "--no-single-branch"))) | |
(cond | |
((eq 'full depth) | |
(funcall call "git" "clone" "--origin" "origin" branch-switch repo-url repo-dir)) | |
((integerp depth) | |
(if | |
(null pin) | |
(progn | |
(if | |
(file-directory-p repo-dir) | |
(progn | |
(delete-directory repo-dir 'recursive))) | |
(funcall call "git" "clone" "--origin" "origin" repo-url "--no-checkout" repo-dir "--depth" | |
(number-to-string depth) | |
branch-switch "--no-tags" "--branch" straight-repository-branch)) | |
(make-directory repo-dir 'recursive) | |
(let | |
((default-directory repo-dir)) | |
(funcall call "git" "init") | |
(funcall call "git" "branch" "-m" straight-repository-branch) | |
(funcall call "git" "remote" "add" "origin" repo-url "--master" straight-repository-branch) | |
(funcall call "git" "fetch" "origin" pin "--depth" | |
(number-to-string depth) | |
"--no-tags") | |
(funcall call "git" "reset" "--hard" pin)))))))))) | |
(require 'straight | |
(concat repo-dir "/straight.el")) | |
(if doom-inhibit-log nil | |
(doom--log "Initializing recipes")) | |
(mapc #'straight-use-recipes | |
'((org-elpa :local-repo nil) | |
(melpa :type git :host github :repo "melpa/melpa" :build nil) | |
(nongnu-elpa :type git :repo "https://git.savannah.gnu.org/git/emacs/nongnu.git" :local-repo "nongnu-elpa" :build nil) | |
(gnu-elpa-mirror :type git :host github :repo "emacs-straight/gnu-elpa-mirror" :build nil) | |
(el-get :type git :host github :repo "dimitri/el-get" :build nil) | |
(emacsmirror-mirror :type git :host github :repo "emacs-straight/emacsmirror-mirror" :build nil)))) | |
((recipe :host github :repo "radian-software/straight.el" :branch "develop" :local-repo "straight.el" :files | |
("straight*.el")) | |
(pin . "b1062df10ba4c10ff7a3c61b9e124b3242b11bb2") | |
(repo-dir . "/home/sukbeom/.config/emacs/.local/straight/repos/straight.el") | |
(repo-url . "https://github.com/radian-software/straight.el") | |
(branch . "develop") | |
(call closure | |
(t) | |
(&rest args) | |
(apply #'doom-call-process args)))) | |
;;;; 44 | |
((let | |
((process-environment | |
(copy-sequence process-environment))) | |
(setenv "GIT_CONFIG" nil) | |
(setenv "GIT_CONFIG_NOSYSTEM" "1") | |
(setenv "GIT_CONFIG_GLOBAL" | |
(or | |
(getenv "DOOMGITCONFIG") | |
"/dev/null")) | |
(let | |
((repo-dir | |
(doom-path straight-base-dir "straight/repos/straight.el")) | |
(repo-url | |
(concat "http" | |
(if gnutls-verify-error "s") | |
"://github.com/" | |
(or | |
(plist-get recipe :repo) | |
"radian-software/straight.el"))) | |
(branch | |
(or | |
(plist-get recipe :branch) | |
straight-repository-branch)) | |
(call | |
(if init-file-debug | |
#'(lambda | |
(&rest args) | |
(doom-print | |
(doom-print--format "%s" | |
(cdr | |
(apply #'doom-call-process args))))) | |
#'(lambda | |
(&rest args) | |
(apply #'doom-call-process args))))) | |
(if | |
(file-directory-p repo-dir) | |
nil | |
(let | |
((saved-match-data | |
(match-data))) | |
(unwind-protect | |
(progn | |
(if | |
(executable-find "git") | |
nil | |
(user-error "Git isn't present on your system. Cannot proceed.")) | |
(let* | |
((version | |
(cdr | |
(doom-call-process "git" "version"))) | |
(version | |
(and | |
(string-match "\\_<[0-9]+\\.[0-9]+\\(\\.[0-9]+\\)\\_>" version) | |
(match-string 0 version)))) | |
(if version | |
(if | |
(version< version "2.23") | |
(progn | |
(user-error "Git %s detected! Doom requires git 2.23 or newer!" version)))))) | |
(set-match-data saved-match-data t))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Installing straight..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(let* | |
((options | |
(ensure-list straight-vc-git-default-clone-depth)) | |
(depth | |
(if options | |
(car-safe | |
(prog1 options | |
(setq options | |
(cdr options)))) | |
(signal 'wrong-number-of-arguments | |
(list | |
'(depth . options) | |
(length options)))))) | |
(let | |
((branch-switch | |
(if | |
(memq 'single-branch options) | |
"--single-branch" "--no-single-branch"))) | |
(cond | |
((eq 'full depth) | |
(funcall call "git" "clone" "--origin" "origin" branch-switch repo-url repo-dir)) | |
((integerp depth) | |
(if | |
(null pin) | |
(progn | |
(if | |
(file-directory-p repo-dir) | |
(progn | |
(delete-directory repo-dir 'recursive))) | |
(funcall call "git" "clone" "--origin" "origin" repo-url "--no-checkout" repo-dir "--depth" | |
(number-to-string depth) | |
branch-switch "--no-tags" "--branch" straight-repository-branch)) | |
(make-directory repo-dir 'recursive) | |
(let | |
((default-directory repo-dir)) | |
(funcall call "git" "init") | |
(funcall call "git" "branch" "-m" straight-repository-branch) | |
(funcall call "git" "remote" "add" "origin" repo-url "--master" straight-repository-branch) | |
(funcall call "git" "fetch" "origin" pin "--depth" | |
(number-to-string depth) | |
"--no-tags") | |
(funcall call "git" "reset" "--hard" pin)))))))))) | |
(require 'straight | |
(concat repo-dir "/straight.el")) | |
(if doom-inhibit-log nil | |
(doom--log "Initializing recipes")) | |
(mapc #'straight-use-recipes | |
'((org-elpa :local-repo nil) | |
(melpa :type git :host github :repo "melpa/melpa" :build nil) | |
(nongnu-elpa :type git :repo "https://git.savannah.gnu.org/git/emacs/nongnu.git" :local-repo "nongnu-elpa" :build nil) | |
(gnu-elpa-mirror :type git :host github :repo "emacs-straight/gnu-elpa-mirror" :build nil) | |
(el-get :type git :host github :repo "dimitri/el-get" :build nil) | |
(emacsmirror-mirror :type git :host github :repo "emacs-straight/emacsmirror-mirror" :build nil))))) | |
((process-environment "GIT_CONFIG_GLOBAL=/dev/null" "GIT_CONFIG_NOSYSTEM=1" "GIT_CONFIG" "_=/usr/bin/emacs" "TERM_PROGRAM=WezTerm" "OLDPWD=/home/sukbeom/workspace" "PULSE_SERVER=unix:/mnt/wslg/PulseServer" "HOSTTYPE=x86_64" "PATH=/home/sukbeom/.config/emacs/bin/:/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/bin:/usr/lib/llvm/17/bin" "WSLENV=BASH_ENV/u:TERM:COLORTERM:TERM_PROGRAM:TERM_PROGRAM_VERSION" "GCC_SPECS=" "XDG_RUNTIME_DIR=/mnt/wslg/runtime-dir" "LEX=flex" "PAGER=/usr/bin/less" "BASH_ENV=/etc/bash.bashrc" "SHLVL=2" "DISPLAY=172.29.112.1:0.0" "MANPAGER=manpager" "USER=sukbeom" "LESSOPEN=|lesspipe %s" "__DOOMPID=18982" "TERM=xterm-256color" "INFOPATH=/usr/share/info/emacs-29:/usr/share/gcc-data/x86_64-pc-linux-gnu/13/info:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.41/info:/usr/share/autoconf-2.71/info:/usr/share/automake-1.16.5/info:/usr/share/info" "WAYLAND_DISPLAY=wayland-0" "LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.cfg=00;32:*.conf=00;32:*.diff=00;32:*.doc=00;32:*.ini=00;32:*.log=00;32:*.patch=00;32:*.pdf=00;32:*.ps=00;32:*.tex=00;32:*.txt=00;32:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*~=00;90:*#=00;90:*.bak=00;90:*.crdownload=00;90:*.dpkg-dist=00;90:*.dpkg-new=00;90:*.dpkg-old=00;90:*.dpkg-tmp=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:*.swp=00;90:*.tmp=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:" "__DOOMGPIPE=" "WSL_INTEROP=/run/WSL/9_interop" "LANG=en_US.UTF-8" "HOME=/home/sukbeom" "MANPATH=/usr/share/gcc-data/x86_64-pc-linux-gnu/13/man:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.41/man:/usr/local/share/man:/usr/share/man:/usr/lib/rust/man:/usr/lib/llvm/17/share/man" "LOGNAME=sukbeom" "CONFIG_PROTECT=/usr/share/gnupg/qualified.txt" "PWD=/home/sukbeom/workspace/fwdn-writer-server" "NAME=LAPTOP-R4FQS2C5" "EDITOR=vi" "__DOOMSTEP=0" "__DOOMGEOM=182x40" "__DOOMPIPE=" "WSL_DISTRO_NAME=Gentoo" "CONFIG_PROTECT_MASK=/etc/sandbox.d /etc/fonts/fonts.conf /etc/gentoo-release /etc/ca-certificates.conf /etc/revdep-rebuild" "TERM_PROGRAM_VERSION=20240203-110809-5046fc22" "WSL2_GUI_APPS_ENABLED=1" "LESS=-R -M --shift 5" "COLORTERM=truecolor" "SHELL=/bin/bash"))) | |
;;;; 45 | |
((doom--ensure-straight | |
(:host github :repo "radian-software/straight.el" :branch "develop" :local-repo "straight.el" :files | |
("straight*.el")) | |
"b1062df10ba4c10ff7a3c61b9e124b3242b11bb2") | |
((recipe :host github :repo "radian-software/straight.el" :branch "develop" :local-repo "straight.el" :files | |
("straight*.el")) | |
(pin . "b1062df10ba4c10ff7a3c61b9e124b3242b11bb2"))) | |
;;;; 46 | |
((let* | |
((--cl-rest-- | |
(alist-get 'straight packages)) | |
(recipe | |
(car | |
(cdr | |
(plist-member --cl-rest-- ':recipe)))) | |
(pin | |
(car | |
(cdr | |
(plist-member --cl-rest-- ':pin))))) | |
(doom--ensure-straight recipe pin)) | |
((force-p) | |
(packages | |
(auto-minor-mode :modules | |
((:core)) | |
:pin "17cfa1b54800fdef2975c0c0531dad34846a5065") | |
(compat :modules | |
((:core)) | |
:recipe | |
(:host github :repo "emacs-compat/compat") | |
:pin "8d4e8a366681def88751f5e9975738ecd3180deb") | |
(gcmh :modules | |
((:core)) | |
:pin "0089f9c3a6d4e9a310d0791cf6fa8f35642ecfd9") | |
(straight :modules | |
((:core)) | |
:type core :recipe | |
(:host github :repo "radian-software/straight.el" :branch "develop" :local-repo "straight.el" :files | |
("straight*.el")) | |
:pin "b1062df10ba4c10ff7a3c61b9e124b3242b11bb2") | |
(nerd-icons :modules | |
((:core)) | |
:pin "8095215a503d8048739de8b4ea4066598edb8cbb") | |
(hide-mode-line :modules | |
((:core)) | |
:pin "bc5d293576c5e08c29e694078b96a5ed85631942") | |
(highlight-numbers :modules | |
((:core)) | |
:pin "8b4744c7f46c72b1d3d599d4fb75ef8183dee307") | |
(rainbow-delimiters :modules | |
((:core)) | |
:pin "f40ece58df8b2f0fb6c8576b527755a552a5e763") | |
(restart-emacs :modules | |
((:core)) | |
:pin "1607da2bc657fe05ae01f7fdf26f716eafead02c") | |
(better-jumper :modules | |
((:core)) | |
:pin "47622213783ece37d5337dc28d33b530540fc319") | |
(dtrt-indent :modules | |
((:core)) | |
:pin "5d1b44f9a1a484ca229cc14f8062609a10ef4891") | |
(helpful :modules | |
((:core)) | |
:pin "a32a5b3d959a7fccf09a71d97b3d7c888ac31c69") | |
(pcre2el :modules | |
((:core)) | |
:pin "380723b2701cceb75c266440fb8db918f3340d50") | |
(smartparens :modules | |
((:core)) | |
:pin "ddc6233ea6fc2da7a3a8e44face465c15631b02b") | |
(ws-butler :modules | |
((:core)) | |
:recipe | |
(:host github :repo "hlissner/ws-butler") | |
:pin "572a10c11b6cb88293de48acbb59a059d36f9ba5") | |
(projectile :modules | |
((:core)) | |
:pin "0163b335a18af0f077a474d4dc6b36e22b5e3274") | |
(project :modules | |
((:core)) | |
:pin "b6989856abe9411872bdff5c8aa190bef4d86409") | |
(general :modules | |
((:core)) | |
:pin "ced143c30de8e20f5a3761a465e684a1dc48471e") | |
(which-key :modules | |
((:core)) | |
:pin "96911a1d3faf8426a33241f4821319e98421f380")) | |
(--cl-rest-- :modules | |
((:core)) | |
:type core :recipe | |
(:host github :repo "radian-software/straight.el" :branch "develop" :local-repo "straight.el" :files | |
("straight*.el")) | |
:pin "b1062df10ba4c10ff7a3c61b9e124b3242b11bb2") | |
(recipe :host github :repo "radian-software/straight.el" :branch "develop" :local-repo "straight.el" :files | |
("straight*.el")) | |
(pin . "b1062df10ba4c10ff7a3c61b9e124b3242b11bb2"))) | |
;;;; 47 | |
((let | |
((packages | |
(doom-package-list | |
'((:core))))) | |
(let* | |
((--cl-rest-- | |
(alist-get 'straight packages)) | |
(recipe | |
(car | |
(cdr | |
(plist-member --cl-rest-- ':recipe)))) | |
(pin | |
(car | |
(cdr | |
(plist-member --cl-rest-- ':pin))))) | |
(doom--ensure-straight recipe pin)) | |
(doom--ensure-core-packages | |
(seq-filter | |
#'(lambda | |
(%) | |
(eq | |
(plist-get | |
(cdr %) | |
:type) | |
'core)) | |
packages))) | |
((force-p) | |
(packages | |
(auto-minor-mode :modules | |
((:core)) | |
:pin "17cfa1b54800fdef2975c0c0531dad34846a5065") | |
(compat :modules | |
((:core)) | |
:recipe | |
(:host github :repo "emacs-compat/compat") | |
:pin "8d4e8a366681def88751f5e9975738ecd3180deb") | |
(gcmh :modules | |
((:core)) | |
:pin "0089f9c3a6d4e9a310d0791cf6fa8f35642ecfd9") | |
(straight :modules | |
((:core)) | |
:type core :recipe | |
(:host github :repo "radian-software/straight.el" :branch "develop" :local-repo "straight.el" :files | |
("straight*.el")) | |
:pin "b1062df10ba4c10ff7a3c61b9e124b3242b11bb2") | |
(nerd-icons :modules | |
((:core)) | |
:pin "8095215a503d8048739de8b4ea4066598edb8cbb") | |
(hide-mode-line :modules | |
((:core)) | |
:pin "bc5d293576c5e08c29e694078b96a5ed85631942") | |
(highlight-numbers :modules | |
((:core)) | |
:pin "8b4744c7f46c72b1d3d599d4fb75ef8183dee307") | |
(rainbow-delimiters :modules | |
((:core)) | |
:pin "f40ece58df8b2f0fb6c8576b527755a552a5e763") | |
(restart-emacs :modules | |
((:core)) | |
:pin "1607da2bc657fe05ae01f7fdf26f716eafead02c") | |
(better-jumper :modules | |
((:core)) | |
:pin "47622213783ece37d5337dc28d33b530540fc319") | |
(dtrt-indent :modules | |
((:core)) | |
:pin "5d1b44f9a1a484ca229cc14f8062609a10ef4891") | |
(helpful :modules | |
((:core)) | |
:pin "a32a5b3d959a7fccf09a71d97b3d7c888ac31c69") | |
(pcre2el :modules | |
((:core)) | |
:pin "380723b2701cceb75c266440fb8db918f3340d50") | |
(smartparens :modules | |
((:core)) | |
:pin "ddc6233ea6fc2da7a3a8e44face465c15631b02b") | |
(ws-butler :modules | |
((:core)) | |
:recipe | |
(:host github :repo "hlissner/ws-butler") | |
:pin "572a10c11b6cb88293de48acbb59a059d36f9ba5") | |
(projectile :modules | |
((:core)) | |
:pin "0163b335a18af0f077a474d4dc6b36e22b5e3274") | |
(project :modules | |
((:core)) | |
:pin "b6989856abe9411872bdff5c8aa190bef4d86409") | |
(general :modules | |
((:core)) | |
:pin "ced143c30de8e20f5a3761a465e684a1dc48471e") | |
(which-key :modules | |
((:core)) | |
:pin "96911a1d3faf8426a33241f4821319e98421f380")))) | |
;;;; 48 | |
((progn | |
(if doom-inhibit-log nil | |
(doom--log "Initializing straight")) | |
(let | |
((packages | |
(doom-package-list | |
'((:core))))) | |
(let* | |
((--cl-rest-- | |
(alist-get 'straight packages)) | |
(recipe | |
(car | |
(cdr | |
(plist-member --cl-rest-- ':recipe)))) | |
(pin | |
(car | |
(cdr | |
(plist-member --cl-rest-- ':pin))))) | |
(doom--ensure-straight recipe pin)) | |
(doom--ensure-core-packages | |
(seq-filter | |
#'(lambda | |
(%) | |
(eq | |
(plist-get | |
(cdr %) | |
:type) | |
'core)) | |
packages)))) | |
nil) | |
;;;; 49 | |
((if | |
(or force-p | |
(null | |
(and | |
(boundp 'straight-recipe-repositories) | |
straight-recipe-repositories))) | |
(progn | |
(if doom-inhibit-log nil | |
(doom--log "Initializing straight")) | |
(let | |
((packages | |
(doom-package-list | |
'((:core))))) | |
(let* | |
((--cl-rest-- | |
(alist-get 'straight packages)) | |
(recipe | |
(car | |
(cdr | |
(plist-member --cl-rest-- ':recipe)))) | |
(pin | |
(car | |
(cdr | |
(plist-member --cl-rest-- ':pin))))) | |
(doom--ensure-straight recipe pin)) | |
(doom--ensure-core-packages | |
(seq-filter | |
#'(lambda | |
(%) | |
(eq | |
(plist-get | |
(cdr %) | |
:type) | |
'core)) | |
packages))))) | |
nil) | |
;;;; 50 | |
((doom-initialize-core-packages nil) | |
((force-p))) | |
;;;; 51 | |
((doom-initialize-packages) | |
((force-p))) | |
;;;; 52 | |
((let | |
(kill-emacs-query-functions kill-emacs-hook) | |
(doom-load init-file 'noerror) | |
(doom-initialize-packages)) | |
((kill-emacs-query-functions) | |
(kill-emacs-hook straight--transaction-finalize straight--delete-stderr-file org-babel-remove-temporary-stable-directory org-babel-remove-temporary-directory))) | |
;;;; 53 | |
((let | |
((init-file | |
(doom-profile-init-file))) | |
(if | |
(file-exists-p init-file) | |
nil | |
(user-error "Profile init file hasn't been generated. Did you forgot to run 'doom sync'?")) | |
(let | |
(kill-emacs-query-functions kill-emacs-hook) | |
(doom-load init-file 'noerror) | |
(doom-initialize-packages))) | |
((init-file . "/home/sukbeom/.config/emacs/.local/etc/@/init.29.el"))) | |
;;;; 54 | |
((progn | |
(doom-require 'doom-profiles) | |
(let | |
((init-file | |
(doom-profile-init-file))) | |
(if | |
(file-exists-p init-file) | |
nil | |
(user-error "Profile init file hasn't been generated. Did you forgot to run 'doom sync'?")) | |
(let | |
(kill-emacs-query-functions kill-emacs-hook) | |
(doom-load init-file 'noerror) | |
(doom-initialize-packages)))) | |
nil) | |
;;;; 55 | |
((if noninteractive | |
(progn | |
(doom-require 'doom-profiles) | |
(let | |
((init-file | |
(doom-profile-init-file))) | |
(if | |
(file-exists-p init-file) | |
nil | |
(user-error "Profile init file hasn't been generated. Did you forgot to run 'doom sync'?")) | |
(let | |
(kill-emacs-query-functions kill-emacs-hook) | |
(doom-load init-file 'noerror) | |
(doom-initialize-packages))))) | |
nil) | |
;;;; 56 | |
((load-with-code-conversion "/home/sukbeom/.config/emacs/lisp/doom-start.el" "/home/sukbeom/.config/emacs/lisp/doom-start.el" nil t) | |
((load-in-progress . t) | |
(inhibit-file-name-operation) | |
(set-auto-coding-for-load . t) | |
(load-file-name . "/home/sukbeom/.config/emacs/lisp/doom-start.el") | |
(load-true-file-name . "/home/sukbeom/.config/emacs/lisp/doom-start.el") | |
(read-symbol-shorthands) | |
(eval-buffer-list #<buffer *load*-223869> #<buffer *load*>) | |
(standard-output) | |
(lexical-binding . t) | |
(standard-input . #<buffer *load*-223869>) | |
(macroexp--dynvars doom-incremental-idle-timer doom-incremental-first-idle-timer doom-incremental-packages doom-inhibit-local-var-hooks) | |
(current-load-list | |
(require . straight) | |
(defun . doom-init-local-var-hooks-h) | |
(require . doom-modules) | |
(defun . doom-display-benchmark-h) | |
(defun . doom-load-packages-incrementally-h) | |
(defun . doom-load-packages-incrementally) | |
doom-incremental-idle-timer doom-incremental-first-idle-timer doom-incremental-packages | |
(defun . doom-run-local-var-hooks-maybe-h) | |
(defun . doom-run-local-var-hooks-h) | |
doom-inhibit-local-var-hooks doom-first-buffer-hook doom-first-file-hook doom-first-input-hook "/home/sukbeom/.config/emacs/lisp/doom-start.el"))) | |
;;;; 57 | |
((require doom-start) | |
((lexical-binding) | |
(lread--unescaped-character-literals))) | |
;;;; 58 | |
((let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(require 'doom-start) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'success "Initialized Doom Emacs %s") | |
doom-version)) | |
(doom-print | |
(doom-print--format | |
(if | |
(hash-table-p doom-modules) | |
(doom-print--class 'success "Detected %d modules" | |
(hash-table-count doom-modules)) | |
(doom-print--class 'warn "Failed to load any modules. Do you have an private init.el?")))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'success "Detected %d packages") | |
(length doom-packages))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking Doom core for irregularities..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(let | |
((tail | |
(list "savehist" "projectile.cache"))) | |
(while tail | |
(let | |
((file | |
(car tail))) | |
(let* | |
((size | |
(and t | |
(condition-case nil | |
(progn | |
(doom-file-size file doom-cache-dir)) | |
(error nil))))) | |
(if size | |
(if | |
(> size 1048576) | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "%s is too large (%.02fmb). This may cause freezes or odd startup delays" file | |
(/ size 1024 1024.0))))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "%s is too large (%.02fmb). This may cause freezes or odd startup delays" file | |
(/ size 1024 1024.0))) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Consider deleting it from your system (manually)"))))))) | |
nil)) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(condition-case nil | |
(progn | |
(executable-find doom-projectile-fd-binary)) | |
(error nil)) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Couldn't find the `fd' binary; project file searches will be slightly slower")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Couldn't find the `fd' binary; project file searches will be slightly slower")) | |
doom-doctor--warnings)))) | |
(require 'projectile) | |
(if | |
(projectile-project-root "~") | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Your $HOME is recognized as a project root")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Your $HOME is recognized as a project root")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Emacs will assume $HOME is the root of any project living under $HOME. If this isn't\n" "desired, you will need to remove \".git\" from `projectile-project-root-files-bottom-up'\n" "(a variable), e.g.\n\n" " (after! projectile\n" " (setq projectile-project-root-files-bottom-up\n" " (remove \".git\" projectile-project-root-files-bottom-up)))"))))))) | |
(if | |
(and | |
(file-equal-p doom-user-dir "~/.config/doom") | |
(file-directory-p "~/.doom.d")) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Both %S and '~/.doom.d' exist on your system") | |
(doom-print--class 'path doom-user-dir))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom will only load one of these (~/.config/doom takes precedence). Possessing\n" "both is rarely intentional; you should one or the other."))))))) | |
(if | |
(not | |
(executable-find "fc-list")) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Warning: unable to detect fonts because fontconfig isn't installed")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Warning: unable to detect fonts because fontconfig isn't installed")) | |
doom-doctor--warnings))) | |
(if | |
(and | |
(cond | |
((eq system-type 'gnu/linux) | |
(let nil | |
(concat | |
(or | |
(getenv "XDG_DATA_HOME") | |
"~/.local/share") | |
"/fonts/"))) | |
((eq system-type 'darwin) | |
(let nil "~/Library/Fonts/"))) | |
(require 'nerd-icons nil t)) | |
(progn | |
(let | |
((temp-buffer | |
(generate-new-buffer " *temp*" t))) | |
(save-current-buffer | |
(set-buffer temp-buffer) | |
(unwind-protect | |
(progn | |
(let | |
((errors 0)) | |
(let* | |
((output | |
(doom-call-process "fc-list" "" "file")) | |
(status | |
(if output | |
(car-safe | |
(prog1 output | |
(setq output | |
(cdr output)))) | |
(signal 'wrong-number-of-arguments | |
(list | |
'(status . output) | |
(length output)))))) | |
(if | |
(not | |
(= 0 status)) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "There was an error running `fc-list'. Is fontconfig installed correctly?"))) | |
(insert | |
(cdr | |
(doom-call-process "fc-list" "" "file"))) | |
(let | |
((tail nerd-icons-font-names)) | |
(while tail | |
(let | |
((font | |
(car tail))) | |
(if | |
(save-excursion | |
(re-search-backward font nil t)) | |
(doom-print | |
(doom-print--format | |
(doom-print--style 'green "Found font %s" font))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "%S font is not installed on your system") | |
font)) | |
(setq errors | |
(1+ errors))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(> errors 0) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Some needed fonts are not properly installed on your system. To download and " "install them, run `M-x nerd-icons-install-fonts' from within Doom Emacs. " "However, on Windows this command will only download them; the fonts must " "be installed manually afterwards."))))))))))) | |
(and | |
(buffer-name temp-buffer) | |
(kill-buffer temp-buffer)))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for stale elc files in your DOOMDIR..."))) | |
(if | |
(file-directory-p doom-user-dir) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(elc-check-dir doom-user-dir))))) | |
(if doom-modules | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking your enabled modules..."))) | |
(advice-add #'require :around #'doom-shut-up-a) | |
(let | |
((tail | |
(doom-module-list))) | |
(while tail | |
(let | |
((x53 | |
(car tail))) | |
(progn | |
(ignore | |
(consp x53)) | |
(let* | |
((x54 | |
(car-safe x53)) | |
(x55 | |
(cdr-safe x53))) | |
(let | |
((group x54) | |
(name x55)) | |
(let | |
((doom-context doom-context)) | |
(let | |
((tail | |
(ensure-list 'doctor))) | |
(while tail | |
(let | |
((context | |
(car tail))) | |
(doom-context-push context) | |
(setq tail | |
(cdr tail))))) | |
(let | |
(doom-local-errors doom-local-warnings) | |
(let | |
(doom-doctor--errors doom-doctor--warnings) | |
(condition-case ex | |
(let | |
((doom-module-context | |
(doom-module-context | |
(cons group name)))) | |
(if doom-inhibit-log nil | |
(doom--log ":context:module: =%s" doom-module-context)) | |
(let | |
((doctor-file | |
(doom-module-expand-path group name "doctor.el")) | |
(packages-file | |
(doom-module-expand-path group name doom-module-packages-file))) | |
(if packages-file | |
(progn | |
(let* | |
((doom-output-indent 6) | |
(--cl-var-- | |
(let | |
((doom-context doom-context)) | |
(let | |
((tail | |
(ensure-list 'packages))) | |
(while tail | |
(let | |
((context | |
(car tail))) | |
(doom-context-push context) | |
(setq tail | |
(cdr tail))))) | |
(let* | |
(doom-packages doom-disabled-packages) | |
(load packages-file 'noerror 'nomessage) | |
(mapcar #'car doom-packages)))) | |
(name nil)) | |
(while | |
(consp --cl-var--) | |
(setq name | |
(car --cl-var--)) | |
(if | |
(or | |
(doom-package-get name :disable) | |
(eval | |
(doom-package-get name :ignore)) | |
(plist-member | |
(doom-package-get name :recipe) | |
:local-repo) | |
(locate-library | |
(symbol-name name)) | |
(doom-package-built-in-p name) | |
(doom-package-installed-p name)) | |
(progn) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Missing emacs package: %S") | |
name))) | |
(setq --cl-var-- | |
(cdr --cl-var--))) | |
nil))) | |
(if doctor-file | |
(progn | |
(let | |
((inhibit-message t)) | |
(load doctor-file 'noerror 'nomessage)))))) | |
((debug file-missing) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "%s" | |
(error-message-string ex))))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "%s" | |
(error-message-string ex))) | |
doom-doctor--errors)))) | |
((debug error) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Syntax error: %s" ex)))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Syntax error: %s" ex)) | |
doom-doctor--errors))))) | |
(if | |
(or doom-doctor--errors doom-doctor--warnings) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start | |
(doom-print--style 'bold "%s %s")) | |
group name)) | |
(doom-print | |
(doom-print--format "%s" | |
(string-join | |
(append doom-doctor--errors doom-doctor--warnings) | |
"\n"))))) | |
(progn | |
(setq doom-local-errors doom-doctor--errors) | |
(setq doom-local-warnings doom-doctor--warnings))))) | |
(setq doom-doctor--errors | |
(append doom-doctor--errors doom-local-errors)) | |
(setq doom-doctor--warnings | |
(append doom-doctor--warnings doom-local-warnings))))))) | |
(setq tail | |
(cdr tail)))))))) | |
((doom-print-level . notice) | |
(doom-print-indent . 2))) | |
;;;; 59 | |
((progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(require 'doom-start) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'success "Initialized Doom Emacs %s") | |
doom-version)) | |
(doom-print | |
(doom-print--format | |
(if | |
(hash-table-p doom-modules) | |
(doom-print--class 'success "Detected %d modules" | |
(hash-table-count doom-modules)) | |
(doom-print--class 'warn "Failed to load any modules. Do you have an private init.el?")))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'success "Detected %d packages") | |
(length doom-packages))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking Doom core for irregularities..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(let | |
((tail | |
(list "savehist" "projectile.cache"))) | |
(while tail | |
(let | |
((file | |
(car tail))) | |
(let* | |
((size | |
(and t | |
(condition-case nil | |
(progn | |
(doom-file-size file doom-cache-dir)) | |
(error nil))))) | |
(if size | |
(if | |
(> size 1048576) | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "%s is too large (%.02fmb). This may cause freezes or odd startup delays" file | |
(/ size 1024 1024.0))))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "%s is too large (%.02fmb). This may cause freezes or odd startup delays" file | |
(/ size 1024 1024.0))) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Consider deleting it from your system (manually)"))))))) | |
nil)) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(condition-case nil | |
(progn | |
(executable-find doom-projectile-fd-binary)) | |
(error nil)) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Couldn't find the `fd' binary; project file searches will be slightly slower")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Couldn't find the `fd' binary; project file searches will be slightly slower")) | |
doom-doctor--warnings)))) | |
(require 'projectile) | |
(if | |
(projectile-project-root "~") | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Your $HOME is recognized as a project root")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Your $HOME is recognized as a project root")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Emacs will assume $HOME is the root of any project living under $HOME. If this isn't\n" "desired, you will need to remove \".git\" from `projectile-project-root-files-bottom-up'\n" "(a variable), e.g.\n\n" " (after! projectile\n" " (setq projectile-project-root-files-bottom-up\n" " (remove \".git\" projectile-project-root-files-bottom-up)))"))))))) | |
(if | |
(and | |
(file-equal-p doom-user-dir "~/.config/doom") | |
(file-directory-p "~/.doom.d")) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Both %S and '~/.doom.d' exist on your system") | |
(doom-print--class 'path doom-user-dir))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom will only load one of these (~/.config/doom takes precedence). Possessing\n" "both is rarely intentional; you should one or the other."))))))) | |
(if | |
(not | |
(executable-find "fc-list")) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Warning: unable to detect fonts because fontconfig isn't installed")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Warning: unable to detect fonts because fontconfig isn't installed")) | |
doom-doctor--warnings))) | |
(if | |
(and | |
(cond | |
((eq system-type 'gnu/linux) | |
(let nil | |
(concat | |
(or | |
(getenv "XDG_DATA_HOME") | |
"~/.local/share") | |
"/fonts/"))) | |
((eq system-type 'darwin) | |
(let nil "~/Library/Fonts/"))) | |
(require 'nerd-icons nil t)) | |
(progn | |
(let | |
((temp-buffer | |
(generate-new-buffer " *temp*" t))) | |
(save-current-buffer | |
(set-buffer temp-buffer) | |
(unwind-protect | |
(progn | |
(let | |
((errors 0)) | |
(let* | |
((output | |
(doom-call-process "fc-list" "" "file")) | |
(status | |
(if output | |
(car-safe | |
(prog1 output | |
(setq output | |
(cdr output)))) | |
(signal 'wrong-number-of-arguments | |
(list | |
'(status . output) | |
(length output)))))) | |
(if | |
(not | |
(= 0 status)) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "There was an error running `fc-list'. Is fontconfig installed correctly?"))) | |
(insert | |
(cdr | |
(doom-call-process "fc-list" "" "file"))) | |
(let | |
((tail nerd-icons-font-names)) | |
(while tail | |
(let | |
((font | |
(car tail))) | |
(if | |
(save-excursion | |
(re-search-backward font nil t)) | |
(doom-print | |
(doom-print--format | |
(doom-print--style 'green "Found font %s" font))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "%S font is not installed on your system") | |
font)) | |
(setq errors | |
(1+ errors))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(> errors 0) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Some needed fonts are not properly installed on your system. To download and " "install them, run `M-x nerd-icons-install-fonts' from within Doom Emacs. " "However, on Windows this command will only download them; the fonts must " "be installed manually afterwards."))))))))))) | |
(and | |
(buffer-name temp-buffer) | |
(kill-buffer temp-buffer)))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for stale elc files in your DOOMDIR..."))) | |
(if | |
(file-directory-p doom-user-dir) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(elc-check-dir doom-user-dir))))) | |
(if doom-modules | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking your enabled modules..."))) | |
(advice-add #'require :around #'doom-shut-up-a) | |
(let | |
((tail | |
(doom-module-list))) | |
(while tail | |
(let | |
((x53 | |
(car tail))) | |
(progn | |
(ignore | |
(consp x53)) | |
(let* | |
((x54 | |
(car-safe x53)) | |
(x55 | |
(cdr-safe x53))) | |
(let | |
((group x54) | |
(name x55)) | |
(let | |
((doom-context doom-context)) | |
(let | |
((tail | |
(ensure-list 'doctor))) | |
(while tail | |
(let | |
((context | |
(car tail))) | |
(doom-context-push context) | |
(setq tail | |
(cdr tail))))) | |
(let | |
(doom-local-errors doom-local-warnings) | |
(let | |
(doom-doctor--errors doom-doctor--warnings) | |
(condition-case ex | |
(let | |
((doom-module-context | |
(doom-module-context | |
(cons group name)))) | |
(if doom-inhibit-log nil | |
(doom--log ":context:module: =%s" doom-module-context)) | |
(let | |
((doctor-file | |
(doom-module-expand-path group name "doctor.el")) | |
(packages-file | |
(doom-module-expand-path group name doom-module-packages-file))) | |
(if packages-file | |
(progn | |
(let* | |
((doom-output-indent 6) | |
(--cl-var-- | |
(let | |
((doom-context doom-context)) | |
(let | |
((tail | |
(ensure-list 'packages))) | |
(while tail | |
(let | |
((context | |
(car tail))) | |
(doom-context-push context) | |
(setq tail | |
(cdr tail))))) | |
(let* | |
(doom-packages doom-disabled-packages) | |
(load packages-file 'noerror 'nomessage) | |
(mapcar #'car doom-packages)))) | |
(name nil)) | |
(while | |
(consp --cl-var--) | |
(setq name | |
(car --cl-var--)) | |
(if | |
(or | |
(doom-package-get name :disable) | |
(eval | |
(doom-package-get name :ignore)) | |
(plist-member | |
(doom-package-get name :recipe) | |
:local-repo) | |
(locate-library | |
(symbol-name name)) | |
(doom-package-built-in-p name) | |
(doom-package-installed-p name)) | |
(progn) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Missing emacs package: %S") | |
name))) | |
(setq --cl-var-- | |
(cdr --cl-var--))) | |
nil))) | |
(if doctor-file | |
(progn | |
(let | |
((inhibit-message t)) | |
(load doctor-file 'noerror 'nomessage)))))) | |
((debug file-missing) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "%s" | |
(error-message-string ex))))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "%s" | |
(error-message-string ex))) | |
doom-doctor--errors)))) | |
((debug error) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Syntax error: %s" ex)))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Syntax error: %s" ex)) | |
doom-doctor--errors))))) | |
(if | |
(or doom-doctor--errors doom-doctor--warnings) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start | |
(doom-print--style 'bold "%s %s")) | |
group name)) | |
(doom-print | |
(doom-print--format "%s" | |
(string-join | |
(append doom-doctor--errors doom-doctor--warnings) | |
"\n"))))) | |
(progn | |
(setq doom-local-errors doom-doctor--errors) | |
(setq doom-local-warnings doom-doctor--warnings))))) | |
(setq doom-doctor--errors | |
(append doom-doctor--errors doom-local-errors)) | |
(setq doom-doctor--warnings | |
(append doom-doctor--warnings doom-local-warnings))))))) | |
(setq tail | |
(cdr tail))))))))) | |
nil) | |
;;;; 60 | |
((condition-case ex | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(require 'doom-start) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'success "Initialized Doom Emacs %s") | |
doom-version)) | |
(doom-print | |
(doom-print--format | |
(if | |
(hash-table-p doom-modules) | |
(doom-print--class 'success "Detected %d modules" | |
(hash-table-count doom-modules)) | |
(doom-print--class 'warn "Failed to load any modules. Do you have an private init.el?")))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'success "Detected %d packages") | |
(length doom-packages))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking Doom core for irregularities..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(let | |
((tail | |
(list "savehist" "projectile.cache"))) | |
(while tail | |
(let | |
((file | |
(car tail))) | |
(let* | |
((size | |
(and t | |
(condition-case nil | |
(progn | |
(doom-file-size file doom-cache-dir)) | |
(error nil))))) | |
(if size | |
(if | |
(> size 1048576) | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "%s is too large (%.02fmb). This may cause freezes or odd startup delays" file | |
(/ size 1024 1024.0))))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "%s is too large (%.02fmb). This may cause freezes or odd startup delays" file | |
(/ size 1024 1024.0))) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Consider deleting it from your system (manually)"))))))) | |
nil)) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(condition-case nil | |
(progn | |
(executable-find doom-projectile-fd-binary)) | |
(error nil)) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Couldn't find the `fd' binary; project file searches will be slightly slower")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Couldn't find the `fd' binary; project file searches will be slightly slower")) | |
doom-doctor--warnings)))) | |
(require 'projectile) | |
(if | |
(projectile-project-root "~") | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Your $HOME is recognized as a project root")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Your $HOME is recognized as a project root")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Emacs will assume $HOME is the root of any project living under $HOME. If this isn't\n" "desired, you will need to remove \".git\" from `projectile-project-root-files-bottom-up'\n" "(a variable), e.g.\n\n" " (after! projectile\n" " (setq projectile-project-root-files-bottom-up\n" " (remove \".git\" projectile-project-root-files-bottom-up)))"))))))) | |
(if | |
(and | |
(file-equal-p doom-user-dir "~/.config/doom") | |
(file-directory-p "~/.doom.d")) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Both %S and '~/.doom.d' exist on your system") | |
(doom-print--class 'path doom-user-dir))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom will only load one of these (~/.config/doom takes precedence). Possessing\n" "both is rarely intentional; you should one or the other."))))))) | |
(if | |
(not | |
(executable-find "fc-list")) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Warning: unable to detect fonts because fontconfig isn't installed")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Warning: unable to detect fonts because fontconfig isn't installed")) | |
doom-doctor--warnings))) | |
(if | |
(and | |
(cond | |
((eq system-type 'gnu/linux) | |
(let nil | |
(concat | |
(or | |
(getenv "XDG_DATA_HOME") | |
"~/.local/share") | |
"/fonts/"))) | |
((eq system-type 'darwin) | |
(let nil "~/Library/Fonts/"))) | |
(require 'nerd-icons nil t)) | |
(progn | |
(let | |
((temp-buffer | |
(generate-new-buffer " *temp*" t))) | |
(save-current-buffer | |
(set-buffer temp-buffer) | |
(unwind-protect | |
(progn | |
(let | |
((errors 0)) | |
(let* | |
((output | |
(doom-call-process "fc-list" "" "file")) | |
(status | |
(if output | |
(car-safe | |
(prog1 output | |
(setq output | |
(cdr output)))) | |
(signal 'wrong-number-of-arguments | |
(list | |
'(status . output) | |
(length output)))))) | |
(if | |
(not | |
(= 0 status)) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "There was an error running `fc-list'. Is fontconfig installed correctly?"))) | |
(insert | |
(cdr | |
(doom-call-process "fc-list" "" "file"))) | |
(let | |
((tail nerd-icons-font-names)) | |
(while tail | |
(let | |
((font | |
(car tail))) | |
(if | |
(save-excursion | |
(re-search-backward font nil t)) | |
(doom-print | |
(doom-print--format | |
(doom-print--style 'green "Found font %s" font))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "%S font is not installed on your system") | |
font)) | |
(setq errors | |
(1+ errors))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(> errors 0) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Some needed fonts are not properly installed on your system. To download and " "install them, run `M-x nerd-icons-install-fonts' from within Doom Emacs. " "However, on Windows this command will only download them; the fonts must " "be installed manually afterwards."))))))))))) | |
(and | |
(buffer-name temp-buffer) | |
(kill-buffer temp-buffer)))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for stale elc files in your DOOMDIR..."))) | |
(if | |
(file-directory-p doom-user-dir) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(elc-check-dir doom-user-dir))))) | |
(if doom-modules | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking your enabled modules..."))) | |
(advice-add #'require :around #'doom-shut-up-a) | |
(let | |
((tail | |
(doom-module-list))) | |
(while tail | |
(let | |
((x53 | |
(car tail))) | |
(progn | |
(ignore | |
(consp x53)) | |
(let* | |
((x54 | |
(car-safe x53)) | |
(x55 | |
(cdr-safe x53))) | |
(let | |
((group x54) | |
(name x55)) | |
(let | |
((doom-context doom-context)) | |
(let | |
((tail | |
(ensure-list 'doctor))) | |
(while tail | |
(let | |
((context | |
(car tail))) | |
(doom-context-push context) | |
(setq tail | |
(cdr tail))))) | |
(let | |
(doom-local-errors doom-local-warnings) | |
(let | |
(doom-doctor--errors doom-doctor--warnings) | |
(condition-case ex | |
(let | |
((doom-module-context | |
(doom-module-context | |
(cons group name)))) | |
(if doom-inhibit-log nil | |
(doom--log ":context:module: =%s" doom-module-context)) | |
(let | |
((doctor-file | |
(doom-module-expand-path group name "doctor.el")) | |
(packages-file | |
(doom-module-expand-path group name doom-module-packages-file))) | |
(if packages-file | |
(progn | |
(let* | |
((doom-output-indent 6) | |
(--cl-var-- | |
(let | |
((doom-context doom-context)) | |
(let | |
((tail | |
(ensure-list 'packages))) | |
(while tail | |
(let | |
((context | |
(car tail))) | |
(doom-context-push context) | |
(setq tail | |
(cdr tail))))) | |
(let* | |
(doom-packages doom-disabled-packages) | |
(load packages-file 'noerror 'nomessage) | |
(mapcar #'car doom-packages)))) | |
(name nil)) | |
(while | |
(consp --cl-var--) | |
(setq name | |
(car --cl-var--)) | |
(if | |
(or | |
(doom-package-get name :disable) | |
(eval | |
(doom-package-get name :ignore)) | |
(plist-member | |
(doom-package-get name :recipe) | |
:local-repo) | |
(locate-library | |
(symbol-name name)) | |
(doom-package-built-in-p name) | |
(doom-package-installed-p name)) | |
(progn) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Missing emacs package: %S") | |
name))) | |
(setq --cl-var-- | |
(cdr --cl-var--))) | |
nil))) | |
(if doctor-file | |
(progn | |
(let | |
((inhibit-message t)) | |
(load doctor-file 'noerror 'nomessage)))))) | |
((debug file-missing) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "%s" | |
(error-message-string ex))))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "%s" | |
(error-message-string ex))) | |
doom-doctor--errors)))) | |
((debug error) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Syntax error: %s" ex)))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Syntax error: %s" ex)) | |
doom-doctor--errors))))) | |
(if | |
(or doom-doctor--errors doom-doctor--warnings) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start | |
(doom-print--style 'bold "%s %s")) | |
group name)) | |
(doom-print | |
(doom-print--format "%s" | |
(string-join | |
(append doom-doctor--errors doom-doctor--warnings) | |
"\n"))))) | |
(progn | |
(setq doom-local-errors doom-doctor--errors) | |
(setq doom-local-warnings doom-doctor--warnings))))) | |
(setq doom-doctor--errors | |
(append doom-doctor--errors doom-local-errors)) | |
(setq doom-doctor--warnings | |
(append doom-doctor--warnings doom-local-warnings))))))) | |
(setq tail | |
(cdr tail))))))))) | |
((debug error) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Attempt to load DOOM failed\n %s\n" | |
(or | |
(cdr-safe ex) | |
(car ex)))))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Attempt to load DOOM failed\n %s\n" | |
(or | |
(cdr-safe ex) | |
(car ex)))) | |
doom-doctor--warnings))) | |
(setq doom-modules nil))) | |
nil) | |
;;;; 61 | |
((let nil | |
(doom-print | |
(doom-print--format "The doctor will see you now...\n")) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking your Emacs version..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(cond | |
((or | |
(> emacs-major-version 29) | |
(string-match-p ".\\([56]0\\|9[0-9]\\)$" emacs-version)) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected a development version of Emacs (%s)" emacs-version)))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Detected a development version of Emacs (%s)" emacs-version)) | |
doom-doctor--warnings))) | |
(if | |
(> emacs-major-version 29) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "This is the bleeding edge of Emacs. As it is constantly changed, Doom will not " "(officially) support it. If you've found a stable commit, great! But be " "cautious about updating Emacs too eagerly!\n"))))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "A .50, .60, or .9X appended to the version string indicates that this is a version " "of Emacs in between stable releases. These are not well supported.\n")))))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Because development builds are prone to random breakage, there will be a greater " "burden on you to investigate and deal with issues. Please make extra sure that " "your issue is reproducible in 29.1 before reporting them to Doom's issue tracker!\n" "\n" "If this doesn't phase you, read the \"Why does Doom not support Emacs HEAD\" QnA " "in Doom's FAQ. It offers some advice for debugging and surviving issues on the " "bleeding edge. Failing that, 29.1 is highly recommended and will always be " "Doom's best supported version of Emacs.")))))) | |
((= emacs-major-version 27) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs 27 is supported, but consider upgrading to 28.1")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs 27 is supported, but consider upgrading to 28.1")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Emacs 28.1 is better supported, faster, and more stable. Plus, Doom will drop " "27.x support sometime late-2023."))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for Doom's prerequisites..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(not | |
(executable-find "git")) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find git on your machine! Doom's package manager won't work.")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find git on your machine! Doom's package manager won't work.")) | |
doom-doctor--errors))) | |
(let | |
((saved-match-data | |
(match-data))) | |
(unwind-protect | |
(progn | |
(let* | |
((version | |
(cdr | |
(doom-call-process "git" "version"))) | |
(version | |
(and | |
(string-match "git version \\([0-9]+\\(?:\\.[0-9]+\\)\\{2\\}\\)" version) | |
(match-string 1 version)))) | |
(if version | |
(if | |
(version< version "2.23") | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Git %s detected! Doom requires git 2.23 or newer!" version)))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Git %s detected! Doom requires git 2.23 or newer!" version)) | |
doom-doctor--errors))))) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Cannot determine Git version. Doom requires git 2.23 or newer!")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Cannot determine Git version. Doom requires git 2.23 or newer!")) | |
doom-doctor--warnings)))))) | |
(set-match-data saved-match-data t)))) | |
(if | |
(executable-find "rg") | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `rg' binary; this a hard dependecy for Doom, file searches may not work at all")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `rg' binary; this a hard dependecy for Doom, file searches may not work at all")) | |
doom-doctor--errors)))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for Emacs config conflicts..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(or | |
(file-equal-p doom-emacs-dir "~/.emacs.d") | |
(file-equal-p doom-emacs-dir "~/.config/emacs")) | |
nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Doom is installed in a non-standard location"))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "The standard locations are ~/.config/emacs or ~/.emacs.d. Emacs will fail " "to load Doom if it is not explicitly told where to look for it. In Emacs 29+, " "this is possible with the --init-directory option:\n\n" " $ emacs --init-directory '" | |
(abbreviate-file-name doom-emacs-dir) | |
"'\n\n" "However, Emacs 27-28 users have no choice but to move Doom to a standard " "location.\n\n" "Chemacs users may ignore this warning, however.")))))) | |
(let | |
(found?) | |
(let | |
((tail | |
'("~/_emacs" "~/.emacs" "~/.emacs.el" "~/.emacs.d" "~/.config/emacs"))) | |
(while tail | |
(let | |
((file | |
(car tail))) | |
(if | |
(and | |
(file-exists-p file) | |
(not | |
(file-equal-p file doom-emacs-dir))) | |
(progn | |
(setq found? t) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Found another Emacs config: %s (%s)") | |
file | |
(if | |
(file-directory-p file) | |
"directory" "file"))))) | |
(setq tail | |
(cdr tail))))) | |
(if found? | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Having multiple Emacs configs may prevent Doom from loading properly. Emacs " "will load the first it finds and ignore the rest. If Doom isn't starting up " "correctly (e.g. you get a vanilla splash screen), make sure that only one of " "these exist.\n\n" "Chemacs users may ignore this warning.")))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for missing Emacs features..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(functionp 'json-serialize) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native JSON support")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native JSON support")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Users will see a substantial performance gain by building Emacs with " "jansson support (i.e. a native JSON library), particularly LSP users. " "You must install a prebuilt Emacs binary with this included, or compile " "Emacs with the --with-json option.")))))) | |
(if | |
(featurep 'native-compile) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native compilation support")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native compilation support")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Users will see a substantial performance gain by building Emacs with " "native compilation support, availible in emacs 28+." "You must install a prebuilt Emacs binary with this included, or compile " "Emacs with the --with-native-compilation option.")))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for private config conflicts..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(let* | |
((xdg-dir | |
(concat | |
(or | |
(getenv "XDG_CONFIG_HOME") | |
"~/.config") | |
"/doom/")) | |
(doom-dir | |
(or | |
(getenv "DOOMDIR") | |
"~/.doom.d/")) | |
(dir | |
(if | |
(file-directory-p xdg-dir) | |
xdg-dir doom-dir))) | |
(if | |
(file-equal-p dir doom-emacs-dir) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Doom was cloned to %S, not ~/.emacs.d or ~/.config/emacs" | |
(doom-print--class 'path dir)))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom's source and your private Doom config have to live in separate directories. " "Putting them in the same directory (without changing the DOOMDIR environment " "variable) will cause errors on startup."))))))) | |
(if | |
(and | |
(not | |
(file-equal-p xdg-dir doom-dir)) | |
(file-directory-p xdg-dir) | |
(file-directory-p doom-dir)) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected two private configs, in %s and %s") | |
(abbreviate-file-name xdg-dir) | |
doom-dir)) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "The second directory will be ignored, as it has lower precedence.")))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for common environmental issues..."))) | |
(if | |
(string-match-p "/fish$" shell-file-name) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected Fish as your $SHELL"))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Fish (and possibly other non-POSIX shells) is known to inject garbage " "output into some of the child processes that Emacs spawns. Many Emacs " "packages/utilities will choke on this output, causing unpredictable issues. " "To get around this, either:\n\n" " - Add the following to $DOOMDIR/config.el:\n\n" " (setq shell-file-name (executable-find \"bash\"))\n\n" " - Or change your default shell to a POSIX shell (like bash or zsh) " " and explicitly configure your terminal apps to use the shell you " " want.\n\n" "If you opt for option 1 and use one of Emacs' terminal emulators, you " "will also need to configure them to use Fish, e.g.\n\n" " (setq-default vterm-shell (executable-find \"fish\"))\n\n" " (setq-default explicit-shell-file-name (executable-find \"fish\"))\n"))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for stale elc files..."))) | |
(elc-check-dir doom-core-dir) | |
(elc-check-dir doom-modules-dir) | |
(elc-check-dir | |
(doom-path doom-local-dir "straight" straight-build-dir)) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for problematic git global settings..."))) | |
(if | |
(executable-find "git") | |
(if | |
(= 0 | |
(car | |
(doom-call-process "git" "config" "--global" "--get-regexp" "^url\\.git://github\\.com"))) | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected insteadOf rules in your global gitconfig.")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Detected insteadOf rules in your global gitconfig.")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom's package manager heavily relies on git. In particular, many of its packages " "are hosted on github. Rewrite rules like these will break it:\n\n" " [url \"git://github.com\"]\n" " insteadOf = https://github.com\n\n" "Please remove them from your gitconfig or use a conditional includeIf rule to " "only apply your rewrites to specific repositories. See " "'https://git-scm.com/docs/git-config#_includes' for more information."))))))) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `git' binary; this a hard dependecy for Doom!")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `git' binary; this a hard dependecy for Doom!")) | |
doom-doctor--errors)))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking Doom Emacs..."))) | |
(condition-case ex | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(require 'doom-start) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'success "Initialized Doom Emacs %s") | |
doom-version)) | |
(doom-print | |
(doom-print--format | |
(if | |
(hash-table-p doom-modules) | |
(doom-print--class 'success "Detected %d modules" | |
(hash-table-count doom-modules)) | |
(doom-print--class 'warn "Failed to load any modules. Do you have an private init.el?")))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'success "Detected %d packages") | |
(length doom-packages))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking Doom core for irregularities..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(let | |
((tail | |
(list "savehist" "projectile.cache"))) | |
(while tail | |
(let | |
((file | |
(car tail))) | |
(let* | |
((size | |
(and t | |
(condition-case nil | |
(progn | |
(doom-file-size file doom-cache-dir)) | |
(error nil))))) | |
(if size | |
(if | |
(> size 1048576) | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "%s is too large (%.02fmb). This may cause freezes or odd startup delays" file | |
(/ size 1024 1024.0))))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "%s is too large (%.02fmb). This may cause freezes or odd startup delays" file | |
(/ size 1024 1024.0))) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Consider deleting it from your system (manually)"))))))) | |
nil)) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(condition-case nil | |
(progn | |
(executable-find doom-projectile-fd-binary)) | |
(error nil)) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Couldn't find the `fd' binary; project file searches will be slightly slower")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Couldn't find the `fd' binary; project file searches will be slightly slower")) | |
doom-doctor--warnings)))) | |
(require 'projectile) | |
(if | |
(projectile-project-root "~") | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Your $HOME is recognized as a project root")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Your $HOME is recognized as a project root")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Emacs will assume $HOME is the root of any project living under $HOME. If this isn't\n" "desired, you will need to remove \".git\" from `projectile-project-root-files-bottom-up'\n" "(a variable), e.g.\n\n" " (after! projectile\n" " (setq projectile-project-root-files-bottom-up\n" " (remove \".git\" projectile-project-root-files-bottom-up)))"))))))) | |
(if | |
(and | |
(file-equal-p doom-user-dir "~/.config/doom") | |
(file-directory-p "~/.doom.d")) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Both %S and '~/.doom.d' exist on your system") | |
(doom-print--class 'path doom-user-dir))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom will only load one of these (~/.config/doom takes precedence). Possessing\n" "both is rarely intentional; you should one or the other."))))))) | |
(if | |
(not | |
(executable-find "fc-list")) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Warning: unable to detect fonts because fontconfig isn't installed")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Warning: unable to detect fonts because fontconfig isn't installed")) | |
doom-doctor--warnings))) | |
(if | |
(and | |
(cond | |
((eq system-type 'gnu/linux) | |
(let nil | |
(concat | |
(or | |
(getenv "XDG_DATA_HOME") | |
"~/.local/share") | |
"/fonts/"))) | |
((eq system-type 'darwin) | |
(let nil "~/Library/Fonts/"))) | |
(require 'nerd-icons nil t)) | |
(progn | |
(let | |
((temp-buffer | |
(generate-new-buffer " *temp*" t))) | |
(save-current-buffer | |
(set-buffer temp-buffer) | |
(unwind-protect | |
(progn | |
(let | |
((errors 0)) | |
(let* | |
((output | |
(doom-call-process "fc-list" "" "file")) | |
(status | |
(if output | |
(car-safe | |
(prog1 output | |
(setq output | |
(cdr output)))) | |
(signal 'wrong-number-of-arguments | |
(list | |
'(status . output) | |
(length output)))))) | |
(if | |
(not | |
(= 0 status)) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "There was an error running `fc-list'. Is fontconfig installed correctly?"))) | |
(insert | |
(cdr | |
(doom-call-process "fc-list" "" "file"))) | |
(let | |
((tail nerd-icons-font-names)) | |
(while tail | |
(let | |
((font | |
(car tail))) | |
(if | |
(save-excursion | |
(re-search-backward font nil t)) | |
(doom-print | |
(doom-print--format | |
(doom-print--style 'green "Found font %s" font))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "%S font is not installed on your system") | |
font)) | |
(setq errors | |
(1+ errors))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(> errors 0) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Some needed fonts are not properly installed on your system. To download and " "install them, run `M-x nerd-icons-install-fonts' from within Doom Emacs. " "However, on Windows this command will only download them; the fonts must " "be installed manually afterwards."))))))))))) | |
(and | |
(buffer-name temp-buffer) | |
(kill-buffer temp-buffer)))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for stale elc files in your DOOMDIR..."))) | |
(if | |
(file-directory-p doom-user-dir) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(elc-check-dir doom-user-dir))))) | |
(if doom-modules | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking your enabled modules..."))) | |
(advice-add #'require :around #'doom-shut-up-a) | |
(let | |
((tail | |
(doom-module-list))) | |
(while tail | |
(let | |
((x53 | |
(car tail))) | |
(progn | |
(ignore | |
(consp x53)) | |
(let* | |
((x54 | |
(car-safe x53)) | |
(x55 | |
(cdr-safe x53))) | |
(let | |
((group x54) | |
(name x55)) | |
(let | |
((doom-context doom-context)) | |
(let | |
((tail | |
(ensure-list 'doctor))) | |
(while tail | |
(let | |
((context | |
(car tail))) | |
(doom-context-push context) | |
(setq tail | |
(cdr tail))))) | |
(let | |
(doom-local-errors doom-local-warnings) | |
(let | |
(doom-doctor--errors doom-doctor--warnings) | |
(condition-case ex | |
(let | |
((doom-module-context | |
(doom-module-context | |
(cons group name)))) | |
(if doom-inhibit-log nil | |
(doom--log ":context:module: =%s" doom-module-context)) | |
(let | |
((doctor-file | |
(doom-module-expand-path group name "doctor.el")) | |
(packages-file | |
(doom-module-expand-path group name doom-module-packages-file))) | |
(if packages-file | |
(progn | |
(let* | |
((doom-output-indent 6) | |
(--cl-var-- | |
(let | |
((doom-context doom-context)) | |
(let | |
((tail | |
(ensure-list 'packages))) | |
(while tail | |
(let | |
((context | |
(car tail))) | |
(doom-context-push context) | |
(setq tail | |
(cdr tail))))) | |
(let* | |
(doom-packages doom-disabled-packages) | |
(load packages-file 'noerror 'nomessage) | |
(mapcar #'car doom-packages)))) | |
(name nil)) | |
(while | |
(consp --cl-var--) | |
(setq name | |
(car --cl-var--)) | |
(if | |
(or | |
(doom-package-get name :disable) | |
(eval | |
(doom-package-get name :ignore)) | |
(plist-member | |
(doom-package-get name :recipe) | |
:local-repo) | |
(locate-library | |
(symbol-name name)) | |
(doom-package-built-in-p name) | |
(doom-package-installed-p name)) | |
(progn) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Missing emacs package: %S") | |
name))) | |
(setq --cl-var-- | |
(cdr --cl-var--))) | |
nil))) | |
(if doctor-file | |
(progn | |
(let | |
((inhibit-message t)) | |
(load doctor-file 'noerror 'nomessage)))))) | |
((debug file-missing) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "%s" | |
(error-message-string ex))))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "%s" | |
(error-message-string ex))) | |
doom-doctor--errors)))) | |
((debug error) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Syntax error: %s" ex)))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Syntax error: %s" ex)) | |
doom-doctor--errors))))) | |
(if | |
(or doom-doctor--errors doom-doctor--warnings) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start | |
(doom-print--style 'bold "%s %s")) | |
group name)) | |
(doom-print | |
(doom-print--format "%s" | |
(string-join | |
(append doom-doctor--errors doom-doctor--warnings) | |
"\n"))))) | |
(progn | |
(setq doom-local-errors doom-doctor--errors) | |
(setq doom-local-warnings doom-doctor--warnings))))) | |
(setq doom-doctor--errors | |
(append doom-doctor--errors doom-local-errors)) | |
(setq doom-doctor--warnings | |
(append doom-doctor--warnings doom-local-warnings))))))) | |
(setq tail | |
(cdr tail))))))))) | |
((debug error) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Attempt to load DOOM failed\n %s\n" | |
(or | |
(cdr-safe ex) | |
(car ex)))))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Attempt to load DOOM failed\n %s\n" | |
(or | |
(cdr-safe ex) | |
(car ex)))) | |
doom-doctor--warnings))) | |
(setq doom-modules nil))) | |
(terpri) | |
(let | |
((tail | |
(list | |
(list doom-doctor--warnings "warning" 'yellow) | |
(list doom-doctor--errors "error" 'red)))) | |
(while tail | |
(let | |
((msg | |
(car tail))) | |
(if | |
(car msg) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'color | |
(nth 2 msg) | |
(if | |
(cdr | |
(car msg)) | |
"There are %d %ss!" "There is %d %s!") | |
(length | |
(car msg)) | |
(nth 1 msg)))))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(or doom-doctor--errors doom-doctor--warnings) | |
nil | |
(doom-print | |
(doom-print--format | |
(doom-print--style 'green "Everything seems fine, happy Emacs'ing!")))) | |
(exit! :pager? "+G")) | |
nil) | |
;;;; 62 | |
(((closure | |
(t) | |
(cli alist) | |
(let nil | |
(doom-print | |
(doom-print--format "The doctor will see you now...\n")) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking your Emacs version..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(cond | |
((or | |
(> emacs-major-version 29) | |
(string-match-p ".\\([56]0\\|9[0-9]\\)$" emacs-version)) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected a development version of Emacs (%s)" emacs-version)))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Detected a development version of Emacs (%s)" emacs-version)) | |
doom-doctor--warnings))) | |
(if | |
(> emacs-major-version 29) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "This is the bleeding edge of Emacs. As it is constantly changed, Doom will not " "(officially) support it. If you've found a stable commit, great! But be " "cautious about updating Emacs too eagerly!\n"))))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "A .50, .60, or .9X appended to the version string indicates that this is a version " "of Emacs in between stable releases. These are not well supported.\n")))))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Because development builds are prone to random breakage, there will be a greater " "burden on you to investigate and deal with issues. Please make extra sure that " "your issue is reproducible in 29.1 before reporting them to Doom's issue tracker!\n" "\n" "If this doesn't phase you, read the \"Why does Doom not support Emacs HEAD\" QnA " "in Doom's FAQ. It offers some advice for debugging and surviving issues on the " "bleeding edge. Failing that, 29.1 is highly recommended and will always be " "Doom's best supported version of Emacs.")))))) | |
((= emacs-major-version 27) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs 27 is supported, but consider upgrading to 28.1")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs 27 is supported, but consider upgrading to 28.1")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Emacs 28.1 is better supported, faster, and more stable. Plus, Doom will drop " "27.x support sometime late-2023."))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for Doom's prerequisites..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(not | |
(executable-find "git")) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find git on your machine! Doom's package manager won't work.")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find git on your machine! Doom's package manager won't work.")) | |
doom-doctor--errors))) | |
(let | |
((saved-match-data | |
(match-data))) | |
(unwind-protect | |
(progn | |
(let* | |
((version | |
(cdr | |
(doom-call-process "git" "version"))) | |
(version | |
(and | |
(string-match "git version \\([0-9]+\\(?:\\.[0-9]+\\)\\{2\\}\\)" version) | |
(match-string 1 version)))) | |
(if version | |
(if | |
(version< version "2.23") | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Git %s detected! Doom requires git 2.23 or newer!" version)))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Git %s detected! Doom requires git 2.23 or newer!" version)) | |
doom-doctor--errors))))) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Cannot determine Git version. Doom requires git 2.23 or newer!")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Cannot determine Git version. Doom requires git 2.23 or newer!")) | |
doom-doctor--warnings)))))) | |
(set-match-data saved-match-data t)))) | |
(if | |
(executable-find "rg") | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `rg' binary; this a hard dependecy for Doom, file searches may not work at all")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `rg' binary; this a hard dependecy for Doom, file searches may not work at all")) | |
doom-doctor--errors)))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for Emacs config conflicts..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(or | |
(file-equal-p doom-emacs-dir "~/.emacs.d") | |
(file-equal-p doom-emacs-dir "~/.config/emacs")) | |
nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Doom is installed in a non-standard location"))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "The standard locations are ~/.config/emacs or ~/.emacs.d. Emacs will fail " "to load Doom if it is not explicitly told where to look for it. In Emacs 29+, " "this is possible with the --init-directory option:\n\n" " $ emacs --init-directory '" | |
(abbreviate-file-name doom-emacs-dir) | |
"'\n\n" "However, Emacs 27-28 users have no choice but to move Doom to a standard " "location.\n\n" "Chemacs users may ignore this warning, however.")))))) | |
(let | |
(found?) | |
(let | |
((tail | |
'("~/_emacs" "~/.emacs" "~/.emacs.el" "~/.emacs.d" "~/.config/emacs"))) | |
(while tail | |
(let | |
((file | |
(car tail))) | |
(if | |
(and | |
(file-exists-p file) | |
(not | |
(file-equal-p file doom-emacs-dir))) | |
(progn | |
(setq found? t) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Found another Emacs config: %s (%s)") | |
file | |
(if | |
(file-directory-p file) | |
"directory" "file"))))) | |
(setq tail | |
(cdr tail))))) | |
(if found? | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Having multiple Emacs configs may prevent Doom from loading properly. Emacs " "will load the first it finds and ignore the rest. If Doom isn't starting up " "correctly (e.g. you get a vanilla splash screen), make sure that only one of " "these exist.\n\n" "Chemacs users may ignore this warning.")))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for missing Emacs features..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(functionp 'json-serialize) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native JSON support")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native JSON support")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Users will see a substantial performance gain by building Emacs with " "jansson support (i.e. a native JSON library), particularly LSP users. " "You must install a prebuilt Emacs binary with this included, or compile " "Emacs with the --with-json option.")))))) | |
(if | |
(featurep 'native-compile) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native compilation support")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native compilation support")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Users will see a substantial performance gain by building Emacs with " "native compilation support, availible in emacs 28+." "You must install a prebuilt Emacs binary with this included, or compile " "Emacs with the --with-native-compilation option.")))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for private config conflicts..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(let* | |
((xdg-dir | |
(concat | |
(or | |
(getenv "XDG_CONFIG_HOME") | |
"~/.config") | |
"/doom/")) | |
(doom-dir | |
(or | |
(getenv "DOOMDIR") | |
"~/.doom.d/")) | |
(dir | |
(if | |
(file-directory-p xdg-dir) | |
xdg-dir doom-dir))) | |
(if | |
(file-equal-p dir doom-emacs-dir) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Doom was cloned to %S, not ~/.emacs.d or ~/.config/emacs" | |
(doom-print--class 'path dir)))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom's source and your private Doom config have to live in separate directories. " "Putting them in the same directory (without changing the DOOMDIR environment " "variable) will cause errors on startup."))))))) | |
(if | |
(and | |
(not | |
(file-equal-p xdg-dir doom-dir)) | |
(file-directory-p xdg-dir) | |
(file-directory-p doom-dir)) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected two private configs, in %s and %s") | |
(abbreviate-file-name xdg-dir) | |
doom-dir)) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "The second directory will be ignored, as it has lower precedence.")))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for common environmental issues..."))) | |
(if | |
(string-match-p "/fish$" shell-file-name) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected Fish as your $SHELL"))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Fish (and possibly other non-POSIX shells) is known to inject garbage " "output into some of the child processes that Emacs spawns. Many Emacs " "packages/utilities will choke on this output, causing unpredictable issues. " "To get around this, either:\n\n" " - Add the following to $DOOMDIR/config.el:\n\n" " (setq shell-file-name (executable-find \"bash\"))\n\n" " - Or change your default shell to a POSIX shell (like bash or zsh) " " and explicitly configure your terminal apps to use the shell you " " want.\n\n" "If you opt for option 1 and use one of Emacs' terminal emulators, you " "will also need to configure them to use Fish, e.g.\n\n" " (setq-default vterm-shell (executable-find \"fish\"))\n\n" " (setq-default explicit-shell-file-name (executable-find \"fish\"))\n"))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for stale elc files..."))) | |
(elc-check-dir doom-core-dir) | |
(elc-check-dir doom-modules-dir) | |
(elc-check-dir | |
(doom-path doom-local-dir "straight" straight-build-dir)) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for problematic git global settings..."))) | |
(if | |
(executable-find "git") | |
(if | |
(= 0 | |
(car | |
(doom-call-process "git" "config" "--global" "--get-regexp" "^url\\.git://github\\.com"))) | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected insteadOf rules in your global gitconfig.")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Detected insteadOf rules in your global gitconfig.")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom's package manager heavily relies on git. In particular, many of its packages " "are hosted on github. Rewrite rules like these will break it:\n\n" " [url \"git://github.com\"]\n" " insteadOf = https://github.com\n\n" "Please remove them from your gitconfig or use a conditional includeIf rule to " "only apply your rewrites to specific repositories. See " "'https://git-scm.com/docs/git-config#_includes' for more information."))))))) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `git' binary; this a hard dependecy for Doom!")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `git' binary; this a hard dependecy for Doom!")) | |
doom-doctor--errors)))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking Doom Emacs..."))) | |
(condition-case ex | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(require 'doom-start) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'success "Initialized Doom Emacs %s") | |
doom-version)) | |
(doom-print | |
(doom-print--format | |
(if | |
(hash-table-p doom-modules) | |
(doom-print--class 'success "Detected %d modules" | |
(hash-table-count doom-modules)) | |
(doom-print--class 'warn "Failed to load any modules. Do you have an private init.el?")))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'success "Detected %d packages") | |
(length doom-packages))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking Doom core for irregularities..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(let | |
((tail | |
(list "savehist" "projectile.cache"))) | |
(while tail | |
(let | |
((file | |
(car tail))) | |
(let* | |
((size | |
(and t | |
(condition-case nil | |
(progn | |
(doom-file-size file doom-cache-dir)) | |
(error nil))))) | |
(if size | |
(if | |
(> size 1048576) | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "%s is too large (%.02fmb). This may cause freezes or odd startup delays" file | |
(/ size 1024 1024.0))))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "%s is too large (%.02fmb). This may cause freezes or odd startup delays" file | |
(/ size 1024 1024.0))) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Consider deleting it from your system (manually)"))))))) | |
nil)) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(condition-case nil | |
(progn | |
(executable-find doom-projectile-fd-binary)) | |
(error nil)) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Couldn't find the `fd' binary; project file searches will be slightly slower")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Couldn't find the `fd' binary; project file searches will be slightly slower")) | |
doom-doctor--warnings)))) | |
(require 'projectile) | |
(if | |
(projectile-project-root "~") | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Your $HOME is recognized as a project root")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Your $HOME is recognized as a project root")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Emacs will assume $HOME is the root of any project living under $HOME. If this isn't\n" "desired, you will need to remove \".git\" from `projectile-project-root-files-bottom-up'\n" "(a variable), e.g.\n\n" " (after! projectile\n" " (setq projectile-project-root-files-bottom-up\n" " (remove \".git\" projectile-project-root-files-bottom-up)))"))))))) | |
(if | |
(and | |
(file-equal-p doom-user-dir "~/.config/doom") | |
(file-directory-p "~/.doom.d")) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Both %S and '~/.doom.d' exist on your system") | |
(doom-print--class 'path doom-user-dir))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom will only load one of these (~/.config/doom takes precedence). Possessing\n" "both is rarely intentional; you should one or the other."))))))) | |
(if | |
(not | |
(executable-find "fc-list")) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Warning: unable to detect fonts because fontconfig isn't installed")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Warning: unable to detect fonts because fontconfig isn't installed")) | |
doom-doctor--warnings))) | |
(if | |
(and | |
(cond | |
((eq system-type 'gnu/linux) | |
(let nil | |
(concat | |
(or | |
(getenv "XDG_DATA_HOME") | |
"~/.local/share") | |
"/fonts/"))) | |
((eq system-type 'darwin) | |
(let nil "~/Library/Fonts/"))) | |
(require 'nerd-icons nil t)) | |
(progn | |
(let | |
((temp-buffer | |
(generate-new-buffer " *temp*" t))) | |
(save-current-buffer | |
(set-buffer temp-buffer) | |
(unwind-protect | |
(progn | |
(let | |
((errors 0)) | |
(let* | |
((output | |
(doom-call-process "fc-list" "" "file")) | |
(status | |
(if output | |
(car-safe | |
(prog1 output | |
(setq output | |
(cdr output)))) | |
(signal 'wrong-number-of-arguments | |
(list | |
'(status . output) | |
(length output)))))) | |
(if | |
(not | |
(= 0 status)) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "There was an error running `fc-list'. Is fontconfig installed correctly?"))) | |
(insert | |
(cdr | |
(doom-call-process "fc-list" "" "file"))) | |
(let | |
((tail nerd-icons-font-names)) | |
(while tail | |
(let | |
((font | |
(car tail))) | |
(if | |
(save-excursion | |
(re-search-backward font nil t)) | |
(doom-print | |
(doom-print--format | |
(doom-print--style 'green "Found font %s" font))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "%S font is not installed on your system") | |
font)) | |
(setq errors | |
(1+ errors))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(> errors 0) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Some needed fonts are not properly installed on your system. To download and " "install them, run `M-x nerd-icons-install-fonts' from within Doom Emacs. " "However, on Windows this command will only download them; the fonts must " "be installed manually afterwards."))))))))))) | |
(and | |
(buffer-name temp-buffer) | |
(kill-buffer temp-buffer)))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for stale elc files in your DOOMDIR..."))) | |
(if | |
(file-directory-p doom-user-dir) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(elc-check-dir doom-user-dir))))) | |
(if doom-modules | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking your enabled modules..."))) | |
(advice-add #'require :around #'doom-shut-up-a) | |
(let | |
((tail | |
(doom-module-list))) | |
(while tail | |
(let | |
((x53 | |
(car tail))) | |
(progn | |
(ignore | |
(consp x53)) | |
(let* | |
((x54 | |
(car-safe x53)) | |
(x55 | |
(cdr-safe x53))) | |
(let | |
((group x54) | |
(name x55)) | |
(let | |
((doom-context doom-context)) | |
(let | |
((tail | |
(ensure-list 'doctor))) | |
(while tail | |
(let | |
((context | |
(car tail))) | |
(doom-context-push context) | |
(setq tail | |
(cdr tail))))) | |
(let | |
(doom-local-errors doom-local-warnings) | |
(let | |
(doom-doctor--errors doom-doctor--warnings) | |
(condition-case ex | |
(let | |
((doom-module-context | |
(doom-module-context | |
(cons group name)))) | |
(if doom-inhibit-log nil | |
(doom--log ":context:module: =%s" doom-module-context)) | |
(let | |
((doctor-file | |
(doom-module-expand-path group name "doctor.el")) | |
(packages-file | |
(doom-module-expand-path group name doom-module-packages-file))) | |
(if packages-file | |
(progn | |
(let* | |
((doom-output-indent 6) | |
(--cl-var-- | |
(let | |
((doom-context doom-context)) | |
(let | |
((tail | |
(ensure-list 'packages))) | |
(while tail | |
(let | |
((context | |
(car tail))) | |
(doom-context-push context) | |
(setq tail | |
(cdr tail))))) | |
(let* | |
(doom-packages doom-disabled-packages) | |
(load packages-file 'noerror 'nomessage) | |
(mapcar #'car doom-packages)))) | |
(name nil)) | |
(while | |
(consp --cl-var--) | |
(setq name | |
(car --cl-var--)) | |
(if | |
(or | |
(doom-package-get name :disable) | |
(eval | |
(doom-package-get name :ignore)) | |
(plist-member | |
(doom-package-get name :recipe) | |
:local-repo) | |
(locate-library | |
(symbol-name name)) | |
(doom-package-built-in-p name) | |
(doom-package-installed-p name)) | |
(progn) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Missing emacs package: %S") | |
name))) | |
(setq --cl-var-- | |
(cdr --cl-var--))) | |
nil))) | |
(if doctor-file | |
(progn | |
(let | |
((inhibit-message t)) | |
(load doctor-file 'noerror 'nomessage)))))) | |
((debug file-missing) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "%s" | |
(error-message-string ex))))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "%s" | |
(error-message-string ex))) | |
doom-doctor--errors)))) | |
((debug error) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Syntax error: %s" ex)))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Syntax error: %s" ex)) | |
doom-doctor--errors))))) | |
(if | |
(or doom-doctor--errors doom-doctor--warnings) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start | |
(doom-print--style 'bold "%s %s")) | |
group name)) | |
(doom-print | |
(doom-print--format "%s" | |
(string-join | |
(append doom-doctor--errors doom-doctor--warnings) | |
"\n"))))) | |
(progn | |
(setq doom-local-errors doom-doctor--errors) | |
(setq doom-local-warnings doom-doctor--warnings))))) | |
(setq doom-doctor--errors | |
(append doom-doctor--errors doom-local-errors)) | |
(setq doom-doctor--warnings | |
(append doom-doctor--warnings doom-local-warnings))))))) | |
(setq tail | |
(cdr tail))))))))) | |
((debug error) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Attempt to load DOOM failed\n %s\n" | |
(or | |
(cdr-safe ex) | |
(car ex)))))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Attempt to load DOOM failed\n %s\n" | |
(or | |
(cdr-safe ex) | |
(car ex)))) | |
doom-doctor--warnings))) | |
(setq doom-modules nil))) | |
(terpri) | |
(let | |
((tail | |
(list | |
(list doom-doctor--warnings "warning" 'yellow) | |
(list doom-doctor--errors "error" 'red)))) | |
(while tail | |
(let | |
((msg | |
(car tail))) | |
(if | |
(car msg) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'color | |
(nth 2 msg) | |
(if | |
(cdr | |
(car msg)) | |
"There are %d %ss!" "There is %d %s!") | |
(length | |
(car msg)) | |
(nth 1 msg)))))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(or doom-doctor--errors doom-doctor--warnings) | |
nil | |
(doom-print | |
(doom-print--format | |
(doom-print--style 'green "Everything seems fine, happy Emacs'ing!")))) | |
(exit! :pager? "+G"))) | |
#s(doom-cli | |
("doom" "doctor") | |
nil | |
(("SUMMARY" . "Diagnoses common issues on your system.") | |
("MAIN" . "The Doom doctor is essentially one big, self-contained elisp shell script that\nuses a series of simple heuristics to diagnose common issues on your system.\nIssues that could intefere with Doom Emacs.\n\nDoom modules may optionally have a doctor.el file to run their own heuristics\nin.")) | |
nil nil nil nil | |
(:benchmark nil :prefix | |
(doom) | |
:group "Diagnostics" :docs "Commands for troubleshooting and debugging Doom." :hide nil) | |
(closure | |
(t) | |
(cli alist) | |
(let nil | |
(doom-print | |
(doom-print--format "The doctor will see you now...\n")) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking your Emacs version..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(cond | |
((or | |
(> emacs-major-version 29) | |
(string-match-p ".\\([56]0\\|9[0-9]\\)$" emacs-version)) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected a development version of Emacs (%s)" emacs-version)))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Detected a development version of Emacs (%s)" emacs-version)) | |
doom-doctor--warnings))) | |
(if | |
(> emacs-major-version 29) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "This is the bleeding edge of Emacs. As it is constantly changed, Doom will not " "(officially) support it. If you've found a stable commit, great! But be " "cautious about updating Emacs too eagerly!\n"))))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "A .50, .60, or .9X appended to the version string indicates that this is a version " "of Emacs in between stable releases. These are not well supported.\n")))))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Because development builds are prone to random breakage, there will be a greater " "burden on you to investigate and deal with issues. Please make extra sure that " "your issue is reproducible in 29.1 before reporting them to Doom's issue tracker!\n" "\n" "If this doesn't phase you, read the \"Why does Doom not support Emacs HEAD\" QnA " "in Doom's FAQ. It offers some advice for debugging and surviving issues on the " "bleeding edge. Failing that, 29.1 is highly recommended and will always be " "Doom's best supported version of Emacs.")))))) | |
((= emacs-major-version 27) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs 27 is supported, but consider upgrading to 28.1")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs 27 is supported, but consider upgrading to 28.1")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Emacs 28.1 is better supported, faster, and more stable. Plus, Doom will drop " "27.x support sometime late-2023."))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for Doom's prerequisites..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(not | |
(executable-find "git")) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find git on your machine! Doom's package manager won't work.")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find git on your machine! Doom's package manager won't work.")) | |
doom-doctor--errors))) | |
(let | |
((saved-match-data | |
(match-data))) | |
(unwind-protect | |
(progn | |
(let* | |
((version | |
(cdr | |
(doom-call-process "git" "version"))) | |
(version | |
(and | |
(string-match "git version \\([0-9]+\\(?:\\.[0-9]+\\)\\{2\\}\\)" version) | |
(match-string 1 version)))) | |
(if version | |
(if | |
(version< version "2.23") | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Git %s detected! Doom requires git 2.23 or newer!" version)))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Git %s detected! Doom requires git 2.23 or newer!" version)) | |
doom-doctor--errors))))) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Cannot determine Git version. Doom requires git 2.23 or newer!")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Cannot determine Git version. Doom requires git 2.23 or newer!")) | |
doom-doctor--warnings)))))) | |
(set-match-data saved-match-data t)))) | |
(if | |
(executable-find "rg") | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `rg' binary; this a hard dependecy for Doom, file searches may not work at all")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `rg' binary; this a hard dependecy for Doom, file searches may not work at all")) | |
doom-doctor--errors)))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for Emacs config conflicts..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(or | |
(file-equal-p doom-emacs-dir "~/.emacs.d") | |
(file-equal-p doom-emacs-dir "~/.config/emacs")) | |
nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Doom is installed in a non-standard location"))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "The standard locations are ~/.config/emacs or ~/.emacs.d. Emacs will fail " "to load Doom if it is not explicitly told where to look for it. In Emacs 29+, " "this is possible with the --init-directory option:\n\n" " $ emacs --init-directory '" | |
(abbreviate-file-name doom-emacs-dir) | |
"'\n\n" "However, Emacs 27-28 users have no choice but to move Doom to a standard " "location.\n\n" "Chemacs users may ignore this warning, however.")))))) | |
(let | |
(found?) | |
(let | |
((tail | |
'("~/_emacs" "~/.emacs" "~/.emacs.el" "~/.emacs.d" "~/.config/emacs"))) | |
(while tail | |
(let | |
((file | |
(car tail))) | |
(if | |
(and | |
(file-exists-p file) | |
(not | |
(file-equal-p file doom-emacs-dir))) | |
(progn | |
(setq found? t) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Found another Emacs config: %s (%s)") | |
file | |
(if | |
(file-directory-p file) | |
"directory" "file"))))) | |
(setq tail | |
(cdr tail))))) | |
(if found? | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Having multiple Emacs configs may prevent Doom from loading properly. Emacs " "will load the first it finds and ignore the rest. If Doom isn't starting up " "correctly (e.g. you get a vanilla splash screen), make sure that only one of " "these exist.\n\n" "Chemacs users may ignore this warning.")))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for missing Emacs features..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(functionp 'json-serialize) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native JSON support")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native JSON support")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Users will see a substantial performance gain by building Emacs with " "jansson support (i.e. a native JSON library), particularly LSP users. " "You must install a prebuilt Emacs binary with this included, or compile " "Emacs with the --with-json option.")))))) | |
(if | |
(featurep 'native-compile) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native compilation support")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native compilation support")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Users will see a substantial performance gain by building Emacs with " "native compilation support, availible in emacs 28+." "You must install a prebuilt Emacs binary with this included, or compile " "Emacs with the --with-native-compilation option.")))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for private config conflicts..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(let* | |
((xdg-dir | |
(concat | |
(or | |
(getenv "XDG_CONFIG_HOME") | |
"~/.config") | |
"/doom/")) | |
(doom-dir | |
(or | |
(getenv "DOOMDIR") | |
"~/.doom.d/")) | |
(dir | |
(if | |
(file-directory-p xdg-dir) | |
xdg-dir doom-dir))) | |
(if | |
(file-equal-p dir doom-emacs-dir) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Doom was cloned to %S, not ~/.emacs.d or ~/.config/emacs" | |
(doom-print--class 'path dir)))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom's source and your private Doom config have to live in separate directories. " "Putting them in the same directory (without changing the DOOMDIR environment " "variable) will cause errors on startup."))))))) | |
(if | |
(and | |
(not | |
(file-equal-p xdg-dir doom-dir)) | |
(file-directory-p xdg-dir) | |
(file-directory-p doom-dir)) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected two private configs, in %s and %s") | |
(abbreviate-file-name xdg-dir) | |
doom-dir)) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "The second directory will be ignored, as it has lower precedence.")))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for common environmental issues..."))) | |
(if | |
(string-match-p "/fish$" shell-file-name) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected Fish as your $SHELL"))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Fish (and possibly other non-POSIX shells) is known to inject garbage " "output into some of the child processes that Emacs spawns. Many Emacs " "packages/utilities will choke on this output, causing unpredictable issues. " "To get around this, either:\n\n" " - Add the following to $DOOMDIR/config.el:\n\n" " (setq shell-file-name (executable-find \"bash\"))\n\n" " - Or change your default shell to a POSIX shell (like bash or zsh) " " and explicitly configure your terminal apps to use the shell you " " want.\n\n" "If you opt for option 1 and use one of Emacs' terminal emulators, you " "will also need to configure them to use Fish, e.g.\n\n" " (setq-default vterm-shell (executable-find \"fish\"))\n\n" " (setq-default explicit-shell-file-name (executable-find \"fish\"))\n"))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for stale elc files..."))) | |
(elc-check-dir doom-core-dir) | |
(elc-check-dir doom-modules-dir) | |
(elc-check-dir | |
(doom-path doom-local-dir "straight" straight-build-dir)) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for problematic git global settings..."))) | |
(if | |
(executable-find "git") | |
(if | |
(= 0 | |
(car | |
(doom-call-process "git" "config" "--global" "--get-regexp" "^url\\.git://github\\.com"))) | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected insteadOf rules in your global gitconfig.")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Detected insteadOf rules in your global gitconfig.")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom's package manager heavily relies on git. In particular, many of its packages " "are hosted on github. Rewrite rules like these will break it:\n\n" " [url \"git://github.com\"]\n" " insteadOf = https://github.com\n\n" "Please remove them from your gitconfig or use a conditional includeIf rule to " "only apply your rewrites to specific repositories. See " "'https://git-scm.com/docs/git-config#_includes' for more information."))))))) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `git' binary; this a hard dependecy for Doom!")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `git' binary; this a hard dependecy for Doom!")) | |
doom-doctor--errors)))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking Doom Emacs..."))) | |
(condition-case ex | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(require 'doom-start) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'success "Initialized Doom Emacs %s") | |
doom-version)) | |
(doom-print | |
(doom-print--format | |
(if | |
(hash-table-p doom-modules) | |
(doom-print--class 'success "Detected %d modules" | |
(hash-table-count doom-modules)) | |
(doom-print--class 'warn "Failed to load any modules. Do you have an private init.el?")))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'success "Detected %d packages") | |
(length doom-packages))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking Doom core for irregularities..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(let | |
((tail | |
(list "savehist" "projectile.cache"))) | |
(while tail | |
(let | |
((file | |
(car tail))) | |
(let* | |
((size | |
(and t | |
(condition-case nil | |
(progn | |
(doom-file-size file doom-cache-dir)) | |
(error nil))))) | |
(if size | |
(if | |
(> size 1048576) | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "%s is too large (%.02fmb). This may cause freezes or odd startup delays" file | |
(/ size 1024 1024.0))))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "%s is too large (%.02fmb). This may cause freezes or odd startup delays" file | |
(/ size 1024 1024.0))) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Consider deleting it from your system (manually)"))))))) | |
nil)) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(condition-case nil | |
(progn | |
(executable-find doom-projectile-fd-binary)) | |
(error nil)) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Couldn't find the `fd' binary; project file searches will be slightly slower")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Couldn't find the `fd' binary; project file searches will be slightly slower")) | |
doom-doctor--warnings)))) | |
(require 'projectile) | |
(if | |
(projectile-project-root "~") | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Your $HOME is recognized as a project root")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Your $HOME is recognized as a project root")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Emacs will assume $HOME is the root of any project living under $HOME. If this isn't\n" "desired, you will need to remove \".git\" from `projectile-project-root-files-bottom-up'\n" "(a variable), e.g.\n\n" " (after! projectile\n" " (setq projectile-project-root-files-bottom-up\n" " (remove \".git\" projectile-project-root-files-bottom-up)))"))))))) | |
(if | |
(and | |
(file-equal-p doom-user-dir "~/.config/doom") | |
(file-directory-p "~/.doom.d")) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Both %S and '~/.doom.d' exist on your system") | |
(doom-print--class 'path doom-user-dir))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom will only load one of these (~/.config/doom takes precedence). Possessing\n" "both is rarely intentional; you should one or the other."))))))) | |
(if | |
(not | |
(executable-find "fc-list")) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Warning: unable to detect fonts because fontconfig isn't installed")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Warning: unable to detect fonts because fontconfig isn't installed")) | |
doom-doctor--warnings))) | |
(if | |
(and | |
(cond | |
((eq system-type 'gnu/linux) | |
(let nil | |
(concat | |
(or | |
(getenv "XDG_DATA_HOME") | |
"~/.local/share") | |
"/fonts/"))) | |
((eq system-type 'darwin) | |
(let nil "~/Library/Fonts/"))) | |
(require 'nerd-icons nil t)) | |
(progn | |
(let | |
((temp-buffer | |
(generate-new-buffer " *temp*" t))) | |
(save-current-buffer | |
(set-buffer temp-buffer) | |
(unwind-protect | |
(progn | |
(let | |
((errors 0)) | |
(let* | |
((output | |
(doom-call-process "fc-list" "" "file")) | |
(status | |
(if output | |
(car-safe | |
(prog1 output | |
(setq output | |
(cdr output)))) | |
(signal 'wrong-number-of-arguments | |
(list | |
'(status . output) | |
(length output)))))) | |
(if | |
(not | |
(= 0 status)) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "There was an error running `fc-list'. Is fontconfig installed correctly?"))) | |
(insert | |
(cdr | |
(doom-call-process "fc-list" "" "file"))) | |
(let | |
((tail nerd-icons-font-names)) | |
(while tail | |
(let | |
((font | |
(car tail))) | |
(if | |
(save-excursion | |
(re-search-backward font nil t)) | |
(doom-print | |
(doom-print--format | |
(doom-print--style 'green "Found font %s" font))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "%S font is not installed on your system") | |
font)) | |
(setq errors | |
(1+ errors))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(> errors 0) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Some needed fonts are not properly installed on your system. To download and " "install them, run `M-x nerd-icons-install-fonts' from within Doom Emacs. " "However, on Windows this command will only download them; the fonts must " "be installed manually afterwards."))))))))))) | |
(and | |
(buffer-name temp-buffer) | |
(kill-buffer temp-buffer)))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for stale elc files in your DOOMDIR..."))) | |
(if | |
(file-directory-p doom-user-dir) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(elc-check-dir doom-user-dir))))) | |
(if doom-modules | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking your enabled modules..."))) | |
(advice-add #'require :around #'doom-shut-up-a) | |
(let | |
((tail | |
(doom-module-list))) | |
(while tail | |
(let | |
((x53 | |
(car tail))) | |
(progn | |
(ignore | |
(consp x53)) | |
(let* | |
((x54 | |
(car-safe x53)) | |
(x55 | |
(cdr-safe x53))) | |
(let | |
((group x54) | |
(name x55)) | |
(let | |
((doom-context doom-context)) | |
(let | |
((tail | |
(ensure-list 'doctor))) | |
(while tail | |
(let | |
((context | |
(car tail))) | |
(doom-context-push context) | |
(setq tail | |
(cdr tail))))) | |
(let | |
(doom-local-errors doom-local-warnings) | |
(let | |
(doom-doctor--errors doom-doctor--warnings) | |
(condition-case ex | |
(let | |
((doom-module-context | |
(doom-module-context | |
(cons group name)))) | |
(if doom-inhibit-log nil | |
(doom--log ":context:module: =%s" doom-module-context)) | |
(let | |
((doctor-file | |
(doom-module-expand-path group name "doctor.el")) | |
(packages-file | |
(doom-module-expand-path group name doom-module-packages-file))) | |
(if packages-file | |
(progn | |
(let* | |
((doom-output-indent 6) | |
(--cl-var-- | |
(let | |
((doom-context doom-context)) | |
(let | |
((tail | |
(ensure-list 'packages))) | |
(while tail | |
(let | |
((context | |
(car tail))) | |
(doom-context-push context) | |
(setq tail | |
(cdr tail))))) | |
(let* | |
(doom-packages doom-disabled-packages) | |
(load packages-file 'noerror 'nomessage) | |
(mapcar #'car doom-packages)))) | |
(name nil)) | |
(while | |
(consp --cl-var--) | |
(setq name | |
(car --cl-var--)) | |
(if | |
(or | |
(doom-package-get name :disable) | |
(eval | |
(doom-package-get name :ignore)) | |
(plist-member | |
(doom-package-get name :recipe) | |
:local-repo) | |
(locate-library | |
(symbol-name name)) | |
(doom-package-built-in-p name) | |
(doom-package-installed-p name)) | |
(progn) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Missing emacs package: %S") | |
name))) | |
(setq --cl-var-- | |
(cdr --cl-var--))) | |
nil))) | |
(if doctor-file | |
(progn | |
(let | |
((inhibit-message t)) | |
(load doctor-file 'noerror 'nomessage)))))) | |
((debug file-missing) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "%s" | |
(error-message-string ex))))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "%s" | |
(error-message-string ex))) | |
doom-doctor--errors)))) | |
((debug error) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Syntax error: %s" ex)))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Syntax error: %s" ex)) | |
doom-doctor--errors))))) | |
(if | |
(or doom-doctor--errors doom-doctor--warnings) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start | |
(doom-print--style 'bold "%s %s")) | |
group name)) | |
(doom-print | |
(doom-print--format "%s" | |
(string-join | |
(append doom-doctor--errors doom-doctor--warnings) | |
"\n"))))) | |
(progn | |
(setq doom-local-errors doom-doctor--errors) | |
(setq doom-local-warnings doom-doctor--warnings))))) | |
(setq doom-doctor--errors | |
(append doom-doctor--errors doom-local-errors)) | |
(setq doom-doctor--warnings | |
(append doom-doctor--warnings doom-local-warnings))))))) | |
(setq tail | |
(cdr tail))))))))) | |
((debug error) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Attempt to load DOOM failed\n %s\n" | |
(or | |
(cdr-safe ex) | |
(car ex)))))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Attempt to load DOOM failed\n %s\n" | |
(or | |
(cdr-safe ex) | |
(car ex)))) | |
doom-doctor--warnings))) | |
(setq doom-modules nil))) | |
(terpri) | |
(let | |
((tail | |
(list | |
(list doom-doctor--warnings "warning" 'yellow) | |
(list doom-doctor--errors "error" 'red)))) | |
(while tail | |
(let | |
((msg | |
(car tail))) | |
(if | |
(car msg) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'color | |
(nth 2 msg) | |
(if | |
(cdr | |
(car msg)) | |
"There are %d %ss!" "There is %d %s!") | |
(length | |
(car msg)) | |
(nth 1 msg)))))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(or doom-doctor--errors doom-doctor--warnings) | |
nil | |
(doom-print | |
(doom-print--format | |
(doom-print--style 'green "Everything seems fine, happy Emacs'ing!")))) | |
(exit! :pager? "+G")))) | |
nil) | |
((cli . #s(doom-cli | |
("doom" "doctor") | |
nil | |
(("SUMMARY" . "Diagnoses common issues on your system.") | |
("MAIN" . "The Doom doctor is essentially one big, self-contained elisp shell script that\nuses a series of simple heuristics to diagnose common issues on your system.\nIssues that could intefere with Doom Emacs.\n\nDoom modules may optionally have a doctor.el file to run their own heuristics\nin.")) | |
nil nil nil nil | |
(:benchmark nil :prefix | |
(doom) | |
:group "Diagnostics" :docs "Commands for troubleshooting and debugging Doom." :hide nil) | |
(closure | |
(t) | |
(cli alist) | |
(let nil | |
(doom-print | |
(doom-print--format "The doctor will see you now...\n")) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking your Emacs version..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(cond | |
((or | |
(> emacs-major-version 29) | |
(string-match-p ".\\([56]0\\|9[0-9]\\)$" emacs-version)) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected a development version of Emacs (%s)" emacs-version)))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Detected a development version of Emacs (%s)" emacs-version)) | |
doom-doctor--warnings))) | |
(if | |
(> emacs-major-version 29) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "This is the bleeding edge of Emacs. As it is constantly changed, Doom will not " "(officially) support it. If you've found a stable commit, great! But be " "cautious about updating Emacs too eagerly!\n"))))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "A .50, .60, or .9X appended to the version string indicates that this is a version " "of Emacs in between stable releases. These are not well supported.\n")))))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Because development builds are prone to random breakage, there will be a greater " "burden on you to investigate and deal with issues. Please make extra sure that " "your issue is reproducible in 29.1 before reporting them to Doom's issue tracker!\n" "\n" "If this doesn't phase you, read the \"Why does Doom not support Emacs HEAD\" QnA " "in Doom's FAQ. It offers some advice for debugging and surviving issues on the " "bleeding edge. Failing that, 29.1 is highly recommended and will always be " "Doom's best supported version of Emacs.")))))) | |
((= emacs-major-version 27) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs 27 is supported, but consider upgrading to 28.1")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs 27 is supported, but consider upgrading to 28.1")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Emacs 28.1 is better supported, faster, and more stable. Plus, Doom will drop " "27.x support sometime late-2023."))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for Doom's prerequisites..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(not | |
(executable-find "git")) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find git on your machine! Doom's package manager won't work.")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find git on your machine! Doom's package manager won't work.")) | |
doom-doctor--errors))) | |
(let | |
((saved-match-data | |
(match-data))) | |
(unwind-protect | |
(progn | |
(let* | |
((version | |
(cdr | |
(doom-call-process "git" "version"))) | |
(version | |
(and | |
(string-match "git version \\([0-9]+\\(?:\\.[0-9]+\\)\\{2\\}\\)" version) | |
(match-string 1 version)))) | |
(if version | |
(if | |
(version< version "2.23") | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Git %s detected! Doom requires git 2.23 or newer!" version)))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Git %s detected! Doom requires git 2.23 or newer!" version)) | |
doom-doctor--errors))))) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Cannot determine Git version. Doom requires git 2.23 or newer!")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Cannot determine Git version. Doom requires git 2.23 or newer!")) | |
doom-doctor--warnings)))))) | |
(set-match-data saved-match-data t)))) | |
(if | |
(executable-find "rg") | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `rg' binary; this a hard dependecy for Doom, file searches may not work at all")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `rg' binary; this a hard dependecy for Doom, file searches may not work at all")) | |
doom-doctor--errors)))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for Emacs config conflicts..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(or | |
(file-equal-p doom-emacs-dir "~/.emacs.d") | |
(file-equal-p doom-emacs-dir "~/.config/emacs")) | |
nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Doom is installed in a non-standard location"))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "The standard locations are ~/.config/emacs or ~/.emacs.d. Emacs will fail " "to load Doom if it is not explicitly told where to look for it. In Emacs 29+, " "this is possible with the --init-directory option:\n\n" " $ emacs --init-directory '" | |
(abbreviate-file-name doom-emacs-dir) | |
"'\n\n" "However, Emacs 27-28 users have no choice but to move Doom to a standard " "location.\n\n" "Chemacs users may ignore this warning, however.")))))) | |
(let | |
(found?) | |
(let | |
((tail | |
'("~/_emacs" "~/.emacs" "~/.emacs.el" "~/.emacs.d" "~/.config/emacs"))) | |
(while tail | |
(let | |
((file | |
(car tail))) | |
(if | |
(and | |
(file-exists-p file) | |
(not | |
(file-equal-p file doom-emacs-dir))) | |
(progn | |
(setq found? t) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Found another Emacs config: %s (%s)") | |
file | |
(if | |
(file-directory-p file) | |
"directory" "file"))))) | |
(setq tail | |
(cdr tail))))) | |
(if found? | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Having multiple Emacs configs may prevent Doom from loading properly. Emacs " "will load the first it finds and ignore the rest. If Doom isn't starting up " "correctly (e.g. you get a vanilla splash screen), make sure that only one of " "these exist.\n\n" "Chemacs users may ignore this warning.")))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for missing Emacs features..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(functionp 'json-serialize) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native JSON support")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native JSON support")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Users will see a substantial performance gain by building Emacs with " "jansson support (i.e. a native JSON library), particularly LSP users. " "You must install a prebuilt Emacs binary with this included, or compile " "Emacs with the --with-json option.")))))) | |
(if | |
(featurep 'native-compile) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native compilation support")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native compilation support")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Users will see a substantial performance gain by building Emacs with " "native compilation support, availible in emacs 28+." "You must install a prebuilt Emacs binary with this included, or compile " "Emacs with the --with-native-compilation option.")))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for private config conflicts..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(let* | |
((xdg-dir | |
(concat | |
(or | |
(getenv "XDG_CONFIG_HOME") | |
"~/.config") | |
"/doom/")) | |
(doom-dir | |
(or | |
(getenv "DOOMDIR") | |
"~/.doom.d/")) | |
(dir | |
(if | |
(file-directory-p xdg-dir) | |
xdg-dir doom-dir))) | |
(if | |
(file-equal-p dir doom-emacs-dir) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Doom was cloned to %S, not ~/.emacs.d or ~/.config/emacs" | |
(doom-print--class 'path dir)))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom's source and your private Doom config have to live in separate directories. " "Putting them in the same directory (without changing the DOOMDIR environment " "variable) will cause errors on startup."))))))) | |
(if | |
(and | |
(not | |
(file-equal-p xdg-dir doom-dir)) | |
(file-directory-p xdg-dir) | |
(file-directory-p doom-dir)) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected two private configs, in %s and %s") | |
(abbreviate-file-name xdg-dir) | |
doom-dir)) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "The second directory will be ignored, as it has lower precedence.")))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for common environmental issues..."))) | |
(if | |
(string-match-p "/fish$" shell-file-name) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected Fish as your $SHELL"))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Fish (and possibly other non-POSIX shells) is known to inject garbage " "output into some of the child processes that Emacs spawns. Many Emacs " "packages/utilities will choke on this output, causing unpredictable issues. " "To get around this, either:\n\n" " - Add the following to $DOOMDIR/config.el:\n\n" " (setq shell-file-name (executable-find \"bash\"))\n\n" " - Or change your default shell to a POSIX shell (like bash or zsh) " " and explicitly configure your terminal apps to use the shell you " " want.\n\n" "If you opt for option 1 and use one of Emacs' terminal emulators, you " "will also need to configure them to use Fish, e.g.\n\n" " (setq-default vterm-shell (executable-find \"fish\"))\n\n" " (setq-default explicit-shell-file-name (executable-find \"fish\"))\n"))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for stale elc files..."))) | |
(elc-check-dir doom-core-dir) | |
(elc-check-dir doom-modules-dir) | |
(elc-check-dir | |
(doom-path doom-local-dir "straight" straight-build-dir)) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for problematic git global settings..."))) | |
(if | |
(executable-find "git") | |
(if | |
(= 0 | |
(car | |
(doom-call-process "git" "config" "--global" "--get-regexp" "^url\\.git://github\\.com"))) | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected insteadOf rules in your global gitconfig.")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Detected insteadOf rules in your global gitconfig.")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom's package manager heavily relies on git. In particular, many of its packages " "are hosted on github. Rewrite rules like these will break it:\n\n" " [url \"git://github.com\"]\n" " insteadOf = https://github.com\n\n" "Please remove them from your gitconfig or use a conditional includeIf rule to " "only apply your rewrites to specific repositories. See " "'https://git-scm.com/docs/git-config#_includes' for more information."))))))) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `git' binary; this a hard dependecy for Doom!")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `git' binary; this a hard dependecy for Doom!")) | |
doom-doctor--errors)))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking Doom Emacs..."))) | |
(condition-case ex | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(require 'doom-start) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'success "Initialized Doom Emacs %s") | |
doom-version)) | |
(doom-print | |
(doom-print--format | |
(if | |
(hash-table-p doom-modules) | |
(doom-print--class 'success "Detected %d modules" | |
(hash-table-count doom-modules)) | |
(doom-print--class 'warn "Failed to load any modules. Do you have an private init.el?")))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'success "Detected %d packages") | |
(length doom-packages))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking Doom core for irregularities..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(let | |
((tail | |
(list "savehist" "projectile.cache"))) | |
(while tail | |
(let | |
((file | |
(car tail))) | |
(let* | |
((size | |
(and t | |
(condition-case nil | |
(progn | |
(doom-file-size file doom-cache-dir)) | |
(error nil))))) | |
(if size | |
(if | |
(> size 1048576) | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "%s is too large (%.02fmb). This may cause freezes or odd startup delays" file | |
(/ size 1024 1024.0))))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "%s is too large (%.02fmb). This may cause freezes or odd startup delays" file | |
(/ size 1024 1024.0))) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Consider deleting it from your system (manually)"))))))) | |
nil)) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(condition-case nil | |
(progn | |
(executable-find doom-projectile-fd-binary)) | |
(error nil)) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Couldn't find the `fd' binary; project file searches will be slightly slower")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Couldn't find the `fd' binary; project file searches will be slightly slower")) | |
doom-doctor--warnings)))) | |
(require 'projectile) | |
(if | |
(projectile-project-root "~") | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Your $HOME is recognized as a project root")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Your $HOME is recognized as a project root")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Emacs will assume $HOME is the root of any project living under $HOME. If this isn't\n" "desired, you will need to remove \".git\" from `projectile-project-root-files-bottom-up'\n" "(a variable), e.g.\n\n" " (after! projectile\n" " (setq projectile-project-root-files-bottom-up\n" " (remove \".git\" projectile-project-root-files-bottom-up)))"))))))) | |
(if | |
(and | |
(file-equal-p doom-user-dir "~/.config/doom") | |
(file-directory-p "~/.doom.d")) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Both %S and '~/.doom.d' exist on your system") | |
(doom-print--class 'path doom-user-dir))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom will only load one of these (~/.config/doom takes precedence). Possessing\n" "both is rarely intentional; you should one or the other."))))))) | |
(if | |
(not | |
(executable-find "fc-list")) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Warning: unable to detect fonts because fontconfig isn't installed")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Warning: unable to detect fonts because fontconfig isn't installed")) | |
doom-doctor--warnings))) | |
(if | |
(and | |
(cond | |
((eq system-type 'gnu/linux) | |
(let nil | |
(concat | |
(or | |
(getenv "XDG_DATA_HOME") | |
"~/.local/share") | |
"/fonts/"))) | |
((eq system-type 'darwin) | |
(let nil "~/Library/Fonts/"))) | |
(require 'nerd-icons nil t)) | |
(progn | |
(let | |
((temp-buffer | |
(generate-new-buffer " *temp*" t))) | |
(save-current-buffer | |
(set-buffer temp-buffer) | |
(unwind-protect | |
(progn | |
(let | |
((errors 0)) | |
(let* | |
((output | |
(doom-call-process "fc-list" "" "file")) | |
(status | |
(if output | |
(car-safe | |
(prog1 output | |
(setq output | |
(cdr output)))) | |
(signal 'wrong-number-of-arguments | |
(list | |
'(status . output) | |
(length output)))))) | |
(if | |
(not | |
(= 0 status)) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "There was an error running `fc-list'. Is fontconfig installed correctly?"))) | |
(insert | |
(cdr | |
(doom-call-process "fc-list" "" "file"))) | |
(let | |
((tail nerd-icons-font-names)) | |
(while tail | |
(let | |
((font | |
(car tail))) | |
(if | |
(save-excursion | |
(re-search-backward font nil t)) | |
(doom-print | |
(doom-print--format | |
(doom-print--style 'green "Found font %s" font))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "%S font is not installed on your system") | |
font)) | |
(setq errors | |
(1+ errors))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(> errors 0) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Some needed fonts are not properly installed on your system. To download and " "install them, run `M-x nerd-icons-install-fonts' from within Doom Emacs. " "However, on Windows this command will only download them; the fonts must " "be installed manually afterwards."))))))))))) | |
(and | |
(buffer-name temp-buffer) | |
(kill-buffer temp-buffer)))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for stale elc files in your DOOMDIR..."))) | |
(if | |
(file-directory-p doom-user-dir) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(elc-check-dir doom-user-dir))))) | |
(if doom-modules | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking your enabled modules..."))) | |
(advice-add #'require :around #'doom-shut-up-a) | |
(let | |
((tail | |
(doom-module-list))) | |
(while tail | |
(let | |
((x53 | |
(car tail))) | |
(progn | |
(ignore | |
(consp x53)) | |
(let* | |
((x54 | |
(car-safe x53)) | |
(x55 | |
(cdr-safe x53))) | |
(let | |
((group x54) | |
(name x55)) | |
(let | |
((doom-context doom-context)) | |
(let | |
((tail | |
(ensure-list 'doctor))) | |
(while tail | |
(let | |
((context | |
(car tail))) | |
(doom-context-push context) | |
(setq tail | |
(cdr tail))))) | |
(let | |
(doom-local-errors doom-local-warnings) | |
(let | |
(doom-doctor--errors doom-doctor--warnings) | |
(condition-case ex | |
(let | |
((doom-module-context | |
(doom-module-context | |
(cons group name)))) | |
(if doom-inhibit-log nil | |
(doom--log ":context:module: =%s" doom-module-context)) | |
(let | |
((doctor-file | |
(doom-module-expand-path group name "doctor.el")) | |
(packages-file | |
(doom-module-expand-path group name doom-module-packages-file))) | |
(if packages-file | |
(progn | |
(let* | |
((doom-output-indent 6) | |
(--cl-var-- | |
(let | |
((doom-context doom-context)) | |
(let | |
((tail | |
(ensure-list 'packages))) | |
(while tail | |
(let | |
((context | |
(car tail))) | |
(doom-context-push context) | |
(setq tail | |
(cdr tail))))) | |
(let* | |
(doom-packages doom-disabled-packages) | |
(load packages-file 'noerror 'nomessage) | |
(mapcar #'car doom-packages)))) | |
(name nil)) | |
(while | |
(consp --cl-var--) | |
(setq name | |
(car --cl-var--)) | |
(if | |
(or | |
(doom-package-get name :disable) | |
(eval | |
(doom-package-get name :ignore)) | |
(plist-member | |
(doom-package-get name :recipe) | |
:local-repo) | |
(locate-library | |
(symbol-name name)) | |
(doom-package-built-in-p name) | |
(doom-package-installed-p name)) | |
(progn) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Missing emacs package: %S") | |
name))) | |
(setq --cl-var-- | |
(cdr --cl-var--))) | |
nil))) | |
(if doctor-file | |
(progn | |
(let | |
((inhibit-message t)) | |
(load doctor-file 'noerror 'nomessage)))))) | |
((debug file-missing) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "%s" | |
(error-message-string ex))))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "%s" | |
(error-message-string ex))) | |
doom-doctor--errors)))) | |
((debug error) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Syntax error: %s" ex)))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Syntax error: %s" ex)) | |
doom-doctor--errors))))) | |
(if | |
(or doom-doctor--errors doom-doctor--warnings) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start | |
(doom-print--style 'bold "%s %s")) | |
group name)) | |
(doom-print | |
(doom-print--format "%s" | |
(string-join | |
(append doom-doctor--errors doom-doctor--warnings) | |
"\n"))))) | |
(progn | |
(setq doom-local-errors doom-doctor--errors) | |
(setq doom-local-warnings doom-doctor--warnings))))) | |
(setq doom-doctor--errors | |
(append doom-doctor--errors doom-local-errors)) | |
(setq doom-doctor--warnings | |
(append doom-doctor--warnings doom-local-warnings))))))) | |
(setq tail | |
(cdr tail))))))))) | |
((debug error) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Attempt to load DOOM failed\n %s\n" | |
(or | |
(cdr-safe ex) | |
(car ex)))))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Attempt to load DOOM failed\n %s\n" | |
(or | |
(cdr-safe ex) | |
(car ex)))) | |
doom-doctor--warnings))) | |
(setq doom-modules nil))) | |
(terpri) | |
(let | |
((tail | |
(list | |
(list doom-doctor--warnings "warning" 'yellow) | |
(list doom-doctor--errors "error" 'red)))) | |
(while tail | |
(let | |
((msg | |
(car tail))) | |
(if | |
(car msg) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'color | |
(nth 2 msg) | |
(if | |
(cdr | |
(car msg)) | |
"There are %d %ss!" "There is %d %s!") | |
(length | |
(car msg)) | |
(nth 1 msg)))))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(or doom-doctor--errors doom-doctor--warnings) | |
nil | |
(doom-print | |
(doom-print--format | |
(doom-print--style 'green "Everything seems fine, happy Emacs'ing!")))) | |
(exit! :pager? "+G"))))) | |
(alist))) | |
;;;; 63 | |
((funcall | |
(closure | |
(t) | |
(cli alist) | |
(let nil | |
(doom-print | |
(doom-print--format "The doctor will see you now...\n")) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking your Emacs version..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(cond | |
((or | |
(> emacs-major-version 29) | |
(string-match-p ".\\([56]0\\|9[0-9]\\)$" emacs-version)) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected a development version of Emacs (%s)" emacs-version)))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Detected a development version of Emacs (%s)" emacs-version)) | |
doom-doctor--warnings))) | |
(if | |
(> emacs-major-version 29) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "This is the bleeding edge of Emacs. As it is constantly changed, Doom will not " "(officially) support it. If you've found a stable commit, great! But be " "cautious about updating Emacs too eagerly!\n"))))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "A .50, .60, or .9X appended to the version string indicates that this is a version " "of Emacs in between stable releases. These are not well supported.\n")))))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Because development builds are prone to random breakage, there will be a greater " "burden on you to investigate and deal with issues. Please make extra sure that " "your issue is reproducible in 29.1 before reporting them to Doom's issue tracker!\n" "\n" "If this doesn't phase you, read the \"Why does Doom not support Emacs HEAD\" QnA " "in Doom's FAQ. It offers some advice for debugging and surviving issues on the " "bleeding edge. Failing that, 29.1 is highly recommended and will always be " "Doom's best supported version of Emacs.")))))) | |
((= emacs-major-version 27) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs 27 is supported, but consider upgrading to 28.1")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs 27 is supported, but consider upgrading to 28.1")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Emacs 28.1 is better supported, faster, and more stable. Plus, Doom will drop " "27.x support sometime late-2023."))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for Doom's prerequisites..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(not | |
(executable-find "git")) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find git on your machine! Doom's package manager won't work.")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find git on your machine! Doom's package manager won't work.")) | |
doom-doctor--errors))) | |
(let | |
((saved-match-data | |
(match-data))) | |
(unwind-protect | |
(progn | |
(let* | |
((version | |
(cdr | |
(doom-call-process "git" "version"))) | |
(version | |
(and | |
(string-match "git version \\([0-9]+\\(?:\\.[0-9]+\\)\\{2\\}\\)" version) | |
(match-string 1 version)))) | |
(if version | |
(if | |
(version< version "2.23") | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Git %s detected! Doom requires git 2.23 or newer!" version)))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Git %s detected! Doom requires git 2.23 or newer!" version)) | |
doom-doctor--errors))))) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Cannot determine Git version. Doom requires git 2.23 or newer!")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Cannot determine Git version. Doom requires git 2.23 or newer!")) | |
doom-doctor--warnings)))))) | |
(set-match-data saved-match-data t)))) | |
(if | |
(executable-find "rg") | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `rg' binary; this a hard dependecy for Doom, file searches may not work at all")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `rg' binary; this a hard dependecy for Doom, file searches may not work at all")) | |
doom-doctor--errors)))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for Emacs config conflicts..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(or | |
(file-equal-p doom-emacs-dir "~/.emacs.d") | |
(file-equal-p doom-emacs-dir "~/.config/emacs")) | |
nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Doom is installed in a non-standard location"))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "The standard locations are ~/.config/emacs or ~/.emacs.d. Emacs will fail " "to load Doom if it is not explicitly told where to look for it. In Emacs 29+, " "this is possible with the --init-directory option:\n\n" " $ emacs --init-directory '" | |
(abbreviate-file-name doom-emacs-dir) | |
"'\n\n" "However, Emacs 27-28 users have no choice but to move Doom to a standard " "location.\n\n" "Chemacs users may ignore this warning, however.")))))) | |
(let | |
(found?) | |
(let | |
((tail | |
'("~/_emacs" "~/.emacs" "~/.emacs.el" "~/.emacs.d" "~/.config/emacs"))) | |
(while tail | |
(let | |
((file | |
(car tail))) | |
(if | |
(and | |
(file-exists-p file) | |
(not | |
(file-equal-p file doom-emacs-dir))) | |
(progn | |
(setq found? t) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Found another Emacs config: %s (%s)") | |
file | |
(if | |
(file-directory-p file) | |
"directory" "file"))))) | |
(setq tail | |
(cdr tail))))) | |
(if found? | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Having multiple Emacs configs may prevent Doom from loading properly. Emacs " "will load the first it finds and ignore the rest. If Doom isn't starting up " "correctly (e.g. you get a vanilla splash screen), make sure that only one of " "these exist.\n\n" "Chemacs users may ignore this warning.")))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for missing Emacs features..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(functionp 'json-serialize) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native JSON support")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native JSON support")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Users will see a substantial performance gain by building Emacs with " "jansson support (i.e. a native JSON library), particularly LSP users. " "You must install a prebuilt Emacs binary with this included, or compile " "Emacs with the --with-json option.")))))) | |
(if | |
(featurep 'native-compile) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native compilation support")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native compilation support")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Users will see a substantial performance gain by building Emacs with " "native compilation support, availible in emacs 28+." "You must install a prebuilt Emacs binary with this included, or compile " "Emacs with the --with-native-compilation option.")))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for private config conflicts..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(let* | |
((xdg-dir | |
(concat | |
(or | |
(getenv "XDG_CONFIG_HOME") | |
"~/.config") | |
"/doom/")) | |
(doom-dir | |
(or | |
(getenv "DOOMDIR") | |
"~/.doom.d/")) | |
(dir | |
(if | |
(file-directory-p xdg-dir) | |
xdg-dir doom-dir))) | |
(if | |
(file-equal-p dir doom-emacs-dir) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Doom was cloned to %S, not ~/.emacs.d or ~/.config/emacs" | |
(doom-print--class 'path dir)))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom's source and your private Doom config have to live in separate directories. " "Putting them in the same directory (without changing the DOOMDIR environment " "variable) will cause errors on startup."))))))) | |
(if | |
(and | |
(not | |
(file-equal-p xdg-dir doom-dir)) | |
(file-directory-p xdg-dir) | |
(file-directory-p doom-dir)) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected two private configs, in %s and %s") | |
(abbreviate-file-name xdg-dir) | |
doom-dir)) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "The second directory will be ignored, as it has lower precedence.")))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for common environmental issues..."))) | |
(if | |
(string-match-p "/fish$" shell-file-name) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected Fish as your $SHELL"))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Fish (and possibly other non-POSIX shells) is known to inject garbage " "output into some of the child processes that Emacs spawns. Many Emacs " "packages/utilities will choke on this output, causing unpredictable issues. " "To get around this, either:\n\n" " - Add the following to $DOOMDIR/config.el:\n\n" " (setq shell-file-name (executable-find \"bash\"))\n\n" " - Or change your default shell to a POSIX shell (like bash or zsh) " " and explicitly configure your terminal apps to use the shell you " " want.\n\n" "If you opt for option 1 and use one of Emacs' terminal emulators, you " "will also need to configure them to use Fish, e.g.\n\n" " (setq-default vterm-shell (executable-find \"fish\"))\n\n" " (setq-default explicit-shell-file-name (executable-find \"fish\"))\n"))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for stale elc files..."))) | |
(elc-check-dir doom-core-dir) | |
(elc-check-dir doom-modules-dir) | |
(elc-check-dir | |
(doom-path doom-local-dir "straight" straight-build-dir)) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for problematic git global settings..."))) | |
(if | |
(executable-find "git") | |
(if | |
(= 0 | |
(car | |
(doom-call-process "git" "config" "--global" "--get-regexp" "^url\\.git://github\\.com"))) | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected insteadOf rules in your global gitconfig.")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Detected insteadOf rules in your global gitconfig.")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom's package manager heavily relies on git. In particular, many of its packages " "are hosted on github. Rewrite rules like these will break it:\n\n" " [url \"git://github.com\"]\n" " insteadOf = https://github.com\n\n" "Please remove them from your gitconfig or use a conditional includeIf rule to " "only apply your rewrites to specific repositories. See " "'https://git-scm.com/docs/git-config#_includes' for more information."))))))) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `git' binary; this a hard dependecy for Doom!")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `git' binary; this a hard dependecy for Doom!")) | |
doom-doctor--errors)))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking Doom Emacs..."))) | |
(condition-case ex | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(require 'doom-start) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'success "Initialized Doom Emacs %s") | |
doom-version)) | |
(doom-print | |
(doom-print--format | |
(if | |
(hash-table-p doom-modules) | |
(doom-print--class 'success "Detected %d modules" | |
(hash-table-count doom-modules)) | |
(doom-print--class 'warn "Failed to load any modules. Do you have an private init.el?")))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'success "Detected %d packages") | |
(length doom-packages))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking Doom core for irregularities..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(let | |
((tail | |
(list "savehist" "projectile.cache"))) | |
(while tail | |
(let | |
((file | |
(car tail))) | |
(let* | |
((size | |
(and t | |
(condition-case nil | |
(progn | |
(doom-file-size file doom-cache-dir)) | |
(error nil))))) | |
(if size | |
(if | |
(> size 1048576) | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "%s is too large (%.02fmb). This may cause freezes or odd startup delays" file | |
(/ size 1024 1024.0))))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "%s is too large (%.02fmb). This may cause freezes or odd startup delays" file | |
(/ size 1024 1024.0))) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Consider deleting it from your system (manually)"))))))) | |
nil)) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(condition-case nil | |
(progn | |
(executable-find doom-projectile-fd-binary)) | |
(error nil)) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Couldn't find the `fd' binary; project file searches will be slightly slower")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Couldn't find the `fd' binary; project file searches will be slightly slower")) | |
doom-doctor--warnings)))) | |
(require 'projectile) | |
(if | |
(projectile-project-root "~") | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Your $HOME is recognized as a project root")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Your $HOME is recognized as a project root")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Emacs will assume $HOME is the root of any project living under $HOME. If this isn't\n" "desired, you will need to remove \".git\" from `projectile-project-root-files-bottom-up'\n" "(a variable), e.g.\n\n" " (after! projectile\n" " (setq projectile-project-root-files-bottom-up\n" " (remove \".git\" projectile-project-root-files-bottom-up)))"))))))) | |
(if | |
(and | |
(file-equal-p doom-user-dir "~/.config/doom") | |
(file-directory-p "~/.doom.d")) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Both %S and '~/.doom.d' exist on your system") | |
(doom-print--class 'path doom-user-dir))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom will only load one of these (~/.config/doom takes precedence). Possessing\n" "both is rarely intentional; you should one or the other."))))))) | |
(if | |
(not | |
(executable-find "fc-list")) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Warning: unable to detect fonts because fontconfig isn't installed")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Warning: unable to detect fonts because fontconfig isn't installed")) | |
doom-doctor--warnings))) | |
(if | |
(and | |
(cond | |
((eq system-type 'gnu/linux) | |
(let nil | |
(concat | |
(or | |
(getenv "XDG_DATA_HOME") | |
"~/.local/share") | |
"/fonts/"))) | |
((eq system-type 'darwin) | |
(let nil "~/Library/Fonts/"))) | |
(require 'nerd-icons nil t)) | |
(progn | |
(let | |
((temp-buffer | |
(generate-new-buffer " *temp*" t))) | |
(save-current-buffer | |
(set-buffer temp-buffer) | |
(unwind-protect | |
(progn | |
(let | |
((errors 0)) | |
(let* | |
((output | |
(doom-call-process "fc-list" "" "file")) | |
(status | |
(if output | |
(car-safe | |
(prog1 output | |
(setq output | |
(cdr output)))) | |
(signal 'wrong-number-of-arguments | |
(list | |
'(status . output) | |
(length output)))))) | |
(if | |
(not | |
(= 0 status)) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "There was an error running `fc-list'. Is fontconfig installed correctly?"))) | |
(insert | |
(cdr | |
(doom-call-process "fc-list" "" "file"))) | |
(let | |
((tail nerd-icons-font-names)) | |
(while tail | |
(let | |
((font | |
(car tail))) | |
(if | |
(save-excursion | |
(re-search-backward font nil t)) | |
(doom-print | |
(doom-print--format | |
(doom-print--style 'green "Found font %s" font))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "%S font is not installed on your system") | |
font)) | |
(setq errors | |
(1+ errors))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(> errors 0) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Some needed fonts are not properly installed on your system. To download and " "install them, run `M-x nerd-icons-install-fonts' from within Doom Emacs. " "However, on Windows this command will only download them; the fonts must " "be installed manually afterwards."))))))))))) | |
(and | |
(buffer-name temp-buffer) | |
(kill-buffer temp-buffer)))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for stale elc files in your DOOMDIR..."))) | |
(if | |
(file-directory-p doom-user-dir) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(elc-check-dir doom-user-dir))))) | |
(if doom-modules | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking your enabled modules..."))) | |
(advice-add #'require :around #'doom-shut-up-a) | |
(let | |
((tail | |
(doom-module-list))) | |
(while tail | |
(let | |
((x53 | |
(car tail))) | |
(progn | |
(ignore | |
(consp x53)) | |
(let* | |
((x54 | |
(car-safe x53)) | |
(x55 | |
(cdr-safe x53))) | |
(let | |
((group x54) | |
(name x55)) | |
(let | |
((doom-context doom-context)) | |
(let | |
((tail | |
(ensure-list 'doctor))) | |
(while tail | |
(let | |
((context | |
(car tail))) | |
(doom-context-push context) | |
(setq tail | |
(cdr tail))))) | |
(let | |
(doom-local-errors doom-local-warnings) | |
(let | |
(doom-doctor--errors doom-doctor--warnings) | |
(condition-case ex | |
(let | |
((doom-module-context | |
(doom-module-context | |
(cons group name)))) | |
(if doom-inhibit-log nil | |
(doom--log ":context:module: =%s" doom-module-context)) | |
(let | |
((doctor-file | |
(doom-module-expand-path group name "doctor.el")) | |
(packages-file | |
(doom-module-expand-path group name doom-module-packages-file))) | |
(if packages-file | |
(progn | |
(let* | |
((doom-output-indent 6) | |
(--cl-var-- | |
(let | |
((doom-context doom-context)) | |
(let | |
((tail | |
(ensure-list 'packages))) | |
(while tail | |
(let | |
((context | |
(car tail))) | |
(doom-context-push context) | |
(setq tail | |
(cdr tail))))) | |
(let* | |
(doom-packages doom-disabled-packages) | |
(load packages-file 'noerror 'nomessage) | |
(mapcar #'car doom-packages)))) | |
(name nil)) | |
(while | |
(consp --cl-var--) | |
(setq name | |
(car --cl-var--)) | |
(if | |
(or | |
(doom-package-get name :disable) | |
(eval | |
(doom-package-get name :ignore)) | |
(plist-member | |
(doom-package-get name :recipe) | |
:local-repo) | |
(locate-library | |
(symbol-name name)) | |
(doom-package-built-in-p name) | |
(doom-package-installed-p name)) | |
(progn) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Missing emacs package: %S") | |
name))) | |
(setq --cl-var-- | |
(cdr --cl-var--))) | |
nil))) | |
(if doctor-file | |
(progn | |
(let | |
((inhibit-message t)) | |
(load doctor-file 'noerror 'nomessage)))))) | |
((debug file-missing) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "%s" | |
(error-message-string ex))))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "%s" | |
(error-message-string ex))) | |
doom-doctor--errors)))) | |
((debug error) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Syntax error: %s" ex)))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Syntax error: %s" ex)) | |
doom-doctor--errors))))) | |
(if | |
(or doom-doctor--errors doom-doctor--warnings) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start | |
(doom-print--style 'bold "%s %s")) | |
group name)) | |
(doom-print | |
(doom-print--format "%s" | |
(string-join | |
(append doom-doctor--errors doom-doctor--warnings) | |
"\n"))))) | |
(progn | |
(setq doom-local-errors doom-doctor--errors) | |
(setq doom-local-warnings doom-doctor--warnings))))) | |
(setq doom-doctor--errors | |
(append doom-doctor--errors doom-local-errors)) | |
(setq doom-doctor--warnings | |
(append doom-doctor--warnings doom-local-warnings))))))) | |
(setq tail | |
(cdr tail))))))))) | |
((debug error) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Attempt to load DOOM failed\n %s\n" | |
(or | |
(cdr-safe ex) | |
(car ex)))))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Attempt to load DOOM failed\n %s\n" | |
(or | |
(cdr-safe ex) | |
(car ex)))) | |
doom-doctor--warnings))) | |
(setq doom-modules nil))) | |
(terpri) | |
(let | |
((tail | |
(list | |
(list doom-doctor--warnings "warning" 'yellow) | |
(list doom-doctor--errors "error" 'red)))) | |
(while tail | |
(let | |
((msg | |
(car tail))) | |
(if | |
(car msg) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'color | |
(nth 2 msg) | |
(if | |
(cdr | |
(car msg)) | |
"There are %d %ss!" "There is %d %s!") | |
(length | |
(car msg)) | |
(nth 1 msg)))))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(or doom-doctor--errors doom-doctor--warnings) | |
nil | |
(doom-print | |
(doom-print--format | |
(doom-print--style 'green "Everything seems fine, happy Emacs'ing!")))) | |
(exit! :pager? "+G"))) | |
#s(doom-cli | |
("doom" "doctor") | |
nil | |
(("SUMMARY" . "Diagnoses common issues on your system.") | |
("MAIN" . "The Doom doctor is essentially one big, self-contained elisp shell script that\nuses a series of simple heuristics to diagnose common issues on your system.\nIssues that could intefere with Doom Emacs.\n\nDoom modules may optionally have a doctor.el file to run their own heuristics\nin.")) | |
nil nil nil nil | |
(:benchmark nil :prefix | |
(doom) | |
:group "Diagnostics" :docs "Commands for troubleshooting and debugging Doom." :hide nil) | |
(closure | |
(t) | |
(cli alist) | |
(let nil | |
(doom-print | |
(doom-print--format "The doctor will see you now...\n")) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking your Emacs version..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(cond | |
((or | |
(> emacs-major-version 29) | |
(string-match-p ".\\([56]0\\|9[0-9]\\)$" emacs-version)) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected a development version of Emacs (%s)" emacs-version)))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Detected a development version of Emacs (%s)" emacs-version)) | |
doom-doctor--warnings))) | |
(if | |
(> emacs-major-version 29) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "This is the bleeding edge of Emacs. As it is constantly changed, Doom will not " "(officially) support it. If you've found a stable commit, great! But be " "cautious about updating Emacs too eagerly!\n"))))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "A .50, .60, or .9X appended to the version string indicates that this is a version " "of Emacs in between stable releases. These are not well supported.\n")))))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Because development builds are prone to random breakage, there will be a greater " "burden on you to investigate and deal with issues. Please make extra sure that " "your issue is reproducible in 29.1 before reporting them to Doom's issue tracker!\n" "\n" "If this doesn't phase you, read the \"Why does Doom not support Emacs HEAD\" QnA " "in Doom's FAQ. It offers some advice for debugging and surviving issues on the " "bleeding edge. Failing that, 29.1 is highly recommended and will always be " "Doom's best supported version of Emacs.")))))) | |
((= emacs-major-version 27) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs 27 is supported, but consider upgrading to 28.1")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs 27 is supported, but consider upgrading to 28.1")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Emacs 28.1 is better supported, faster, and more stable. Plus, Doom will drop " "27.x support sometime late-2023."))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for Doom's prerequisites..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(not | |
(executable-find "git")) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find git on your machine! Doom's package manager won't work.")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find git on your machine! Doom's package manager won't work.")) | |
doom-doctor--errors))) | |
(let | |
((saved-match-data | |
(match-data))) | |
(unwind-protect | |
(progn | |
(let* | |
((version | |
(cdr | |
(doom-call-process "git" "version"))) | |
(version | |
(and | |
(string-match "git version \\([0-9]+\\(?:\\.[0-9]+\\)\\{2\\}\\)" version) | |
(match-string 1 version)))) | |
(if version | |
(if | |
(version< version "2.23") | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Git %s detected! Doom requires git 2.23 or newer!" version)))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Git %s detected! Doom requires git 2.23 or newer!" version)) | |
doom-doctor--errors))))) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Cannot determine Git version. Doom requires git 2.23 or newer!")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Cannot determine Git version. Doom requires git 2.23 or newer!")) | |
doom-doctor--warnings)))))) | |
(set-match-data saved-match-data t)))) | |
(if | |
(executable-find "rg") | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `rg' binary; this a hard dependecy for Doom, file searches may not work at all")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `rg' binary; this a hard dependecy for Doom, file searches may not work at all")) | |
doom-doctor--errors)))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for Emacs config conflicts..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(or | |
(file-equal-p doom-emacs-dir "~/.emacs.d") | |
(file-equal-p doom-emacs-dir "~/.config/emacs")) | |
nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Doom is installed in a non-standard location"))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "The standard locations are ~/.config/emacs or ~/.emacs.d. Emacs will fail " "to load Doom if it is not explicitly told where to look for it. In Emacs 29+, " "this is possible with the --init-directory option:\n\n" " $ emacs --init-directory '" | |
(abbreviate-file-name doom-emacs-dir) | |
"'\n\n" "However, Emacs 27-28 users have no choice but to move Doom to a standard " "location.\n\n" "Chemacs users may ignore this warning, however.")))))) | |
(let | |
(found?) | |
(let | |
((tail | |
'("~/_emacs" "~/.emacs" "~/.emacs.el" "~/.emacs.d" "~/.config/emacs"))) | |
(while tail | |
(let | |
((file | |
(car tail))) | |
(if | |
(and | |
(file-exists-p file) | |
(not | |
(file-equal-p file doom-emacs-dir))) | |
(progn | |
(setq found? t) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Found another Emacs config: %s (%s)") | |
file | |
(if | |
(file-directory-p file) | |
"directory" "file"))))) | |
(setq tail | |
(cdr tail))))) | |
(if found? | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Having multiple Emacs configs may prevent Doom from loading properly. Emacs " "will load the first it finds and ignore the rest. If Doom isn't starting up " "correctly (e.g. you get a vanilla splash screen), make sure that only one of " "these exist.\n\n" "Chemacs users may ignore this warning.")))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for missing Emacs features..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(functionp 'json-serialize) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native JSON support")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native JSON support")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Users will see a substantial performance gain by building Emacs with " "jansson support (i.e. a native JSON library), particularly LSP users. " "You must install a prebuilt Emacs binary with this included, or compile " "Emacs with the --with-json option.")))))) | |
(if | |
(featurep 'native-compile) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native compilation support")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native compilation support")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Users will see a substantial performance gain by building Emacs with " "native compilation support, availible in emacs 28+." "You must install a prebuilt Emacs binary with this included, or compile " "Emacs with the --with-native-compilation option.")))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for private config conflicts..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(let* | |
((xdg-dir | |
(concat | |
(or | |
(getenv "XDG_CONFIG_HOME") | |
"~/.config") | |
"/doom/")) | |
(doom-dir | |
(or | |
(getenv "DOOMDIR") | |
"~/.doom.d/")) | |
(dir | |
(if | |
(file-directory-p xdg-dir) | |
xdg-dir doom-dir))) | |
(if | |
(file-equal-p dir doom-emacs-dir) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Doom was cloned to %S, not ~/.emacs.d or ~/.config/emacs" | |
(doom-print--class 'path dir)))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom's source and your private Doom config have to live in separate directories. " "Putting them in the same directory (without changing the DOOMDIR environment " "variable) will cause errors on startup."))))))) | |
(if | |
(and | |
(not | |
(file-equal-p xdg-dir doom-dir)) | |
(file-directory-p xdg-dir) | |
(file-directory-p doom-dir)) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected two private configs, in %s and %s") | |
(abbreviate-file-name xdg-dir) | |
doom-dir)) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "The second directory will be ignored, as it has lower precedence.")))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for common environmental issues..."))) | |
(if | |
(string-match-p "/fish$" shell-file-name) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected Fish as your $SHELL"))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Fish (and possibly other non-POSIX shells) is known to inject garbage " "output into some of the child processes that Emacs spawns. Many Emacs " "packages/utilities will choke on this output, causing unpredictable issues. " "To get around this, either:\n\n" " - Add the following to $DOOMDIR/config.el:\n\n" " (setq shell-file-name (executable-find \"bash\"))\n\n" " - Or change your default shell to a POSIX shell (like bash or zsh) " " and explicitly configure your terminal apps to use the shell you " " want.\n\n" "If you opt for option 1 and use one of Emacs' terminal emulators, you " "will also need to configure them to use Fish, e.g.\n\n" " (setq-default vterm-shell (executable-find \"fish\"))\n\n" " (setq-default explicit-shell-file-name (executable-find \"fish\"))\n"))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for stale elc files..."))) | |
(elc-check-dir doom-core-dir) | |
(elc-check-dir doom-modules-dir) | |
(elc-check-dir | |
(doom-path doom-local-dir "straight" straight-build-dir)) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for problematic git global settings..."))) | |
(if | |
(executable-find "git") | |
(if | |
(= 0 | |
(car | |
(doom-call-process "git" "config" "--global" "--get-regexp" "^url\\.git://github\\.com"))) | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected insteadOf rules in your global gitconfig.")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Detected insteadOf rules in your global gitconfig.")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom's package manager heavily relies on git. In particular, many of its packages " "are hosted on github. Rewrite rules like these will break it:\n\n" " [url \"git://github.com\"]\n" " insteadOf = https://github.com\n\n" "Please remove them from your gitconfig or use a conditional includeIf rule to " "only apply your rewrites to specific repositories. See " "'https://git-scm.com/docs/git-config#_includes' for more information."))))))) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `git' binary; this a hard dependecy for Doom!")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `git' binary; this a hard dependecy for Doom!")) | |
doom-doctor--errors)))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking Doom Emacs..."))) | |
(condition-case ex | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(require 'doom-start) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'success "Initialized Doom Emacs %s") | |
doom-version)) | |
(doom-print | |
(doom-print--format | |
(if | |
(hash-table-p doom-modules) | |
(doom-print--class 'success "Detected %d modules" | |
(hash-table-count doom-modules)) | |
(doom-print--class 'warn "Failed to load any modules. Do you have an private init.el?")))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'success "Detected %d packages") | |
(length doom-packages))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking Doom core for irregularities..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(let | |
((tail | |
(list "savehist" "projectile.cache"))) | |
(while tail | |
(let | |
((file | |
(car tail))) | |
(let* | |
((size | |
(and t | |
(condition-case nil | |
(progn | |
(doom-file-size file doom-cache-dir)) | |
(error nil))))) | |
(if size | |
(if | |
(> size 1048576) | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "%s is too large (%.02fmb). This may cause freezes or odd startup delays" file | |
(/ size 1024 1024.0))))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "%s is too large (%.02fmb). This may cause freezes or odd startup delays" file | |
(/ size 1024 1024.0))) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Consider deleting it from your system (manually)"))))))) | |
nil)) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(condition-case nil | |
(progn | |
(executable-find doom-projectile-fd-binary)) | |
(error nil)) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Couldn't find the `fd' binary; project file searches will be slightly slower")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Couldn't find the `fd' binary; project file searches will be slightly slower")) | |
doom-doctor--warnings)))) | |
(require 'projectile) | |
(if | |
(projectile-project-root "~") | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Your $HOME is recognized as a project root")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Your $HOME is recognized as a project root")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Emacs will assume $HOME is the root of any project living under $HOME. If this isn't\n" "desired, you will need to remove \".git\" from `projectile-project-root-files-bottom-up'\n" "(a variable), e.g.\n\n" " (after! projectile\n" " (setq projectile-project-root-files-bottom-up\n" " (remove \".git\" projectile-project-root-files-bottom-up)))"))))))) | |
(if | |
(and | |
(file-equal-p doom-user-dir "~/.config/doom") | |
(file-directory-p "~/.doom.d")) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Both %S and '~/.doom.d' exist on your system") | |
(doom-print--class 'path doom-user-dir))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom will only load one of these (~/.config/doom takes precedence). Possessing\n" "both is rarely intentional; you should one or the other."))))))) | |
(if | |
(not | |
(executable-find "fc-list")) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Warning: unable to detect fonts because fontconfig isn't installed")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Warning: unable to detect fonts because fontconfig isn't installed")) | |
doom-doctor--warnings))) | |
(if | |
(and | |
(cond | |
((eq system-type 'gnu/linux) | |
(let nil | |
(concat | |
(or | |
(getenv "XDG_DATA_HOME") | |
"~/.local/share") | |
"/fonts/"))) | |
((eq system-type 'darwin) | |
(let nil "~/Library/Fonts/"))) | |
(require 'nerd-icons nil t)) | |
(progn | |
(let | |
((temp-buffer | |
(generate-new-buffer " *temp*" t))) | |
(save-current-buffer | |
(set-buffer temp-buffer) | |
(unwind-protect | |
(progn | |
(let | |
((errors 0)) | |
(let* | |
((output | |
(doom-call-process "fc-list" "" "file")) | |
(status | |
(if output | |
(car-safe | |
(prog1 output | |
(setq output | |
(cdr output)))) | |
(signal 'wrong-number-of-arguments | |
(list | |
'(status . output) | |
(length output)))))) | |
(if | |
(not | |
(= 0 status)) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "There was an error running `fc-list'. Is fontconfig installed correctly?"))) | |
(insert | |
(cdr | |
(doom-call-process "fc-list" "" "file"))) | |
(let | |
((tail nerd-icons-font-names)) | |
(while tail | |
(let | |
((font | |
(car tail))) | |
(if | |
(save-excursion | |
(re-search-backward font nil t)) | |
(doom-print | |
(doom-print--format | |
(doom-print--style 'green "Found font %s" font))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "%S font is not installed on your system") | |
font)) | |
(setq errors | |
(1+ errors))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(> errors 0) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Some needed fonts are not properly installed on your system. To download and " "install them, run `M-x nerd-icons-install-fonts' from within Doom Emacs. " "However, on Windows this command will only download them; the fonts must " "be installed manually afterwards."))))))))))) | |
(and | |
(buffer-name temp-buffer) | |
(kill-buffer temp-buffer)))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for stale elc files in your DOOMDIR..."))) | |
(if | |
(file-directory-p doom-user-dir) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(elc-check-dir doom-user-dir))))) | |
(if doom-modules | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking your enabled modules..."))) | |
(advice-add #'require :around #'doom-shut-up-a) | |
(let | |
((tail | |
(doom-module-list))) | |
(while tail | |
(let | |
((x53 | |
(car tail))) | |
(progn | |
(ignore | |
(consp x53)) | |
(let* | |
((x54 | |
(car-safe x53)) | |
(x55 | |
(cdr-safe x53))) | |
(let | |
((group x54) | |
(name x55)) | |
(let | |
((doom-context doom-context)) | |
(let | |
((tail | |
(ensure-list 'doctor))) | |
(while tail | |
(let | |
((context | |
(car tail))) | |
(doom-context-push context) | |
(setq tail | |
(cdr tail))))) | |
(let | |
(doom-local-errors doom-local-warnings) | |
(let | |
(doom-doctor--errors doom-doctor--warnings) | |
(condition-case ex | |
(let | |
((doom-module-context | |
(doom-module-context | |
(cons group name)))) | |
(if doom-inhibit-log nil | |
(doom--log ":context:module: =%s" doom-module-context)) | |
(let | |
((doctor-file | |
(doom-module-expand-path group name "doctor.el")) | |
(packages-file | |
(doom-module-expand-path group name doom-module-packages-file))) | |
(if packages-file | |
(progn | |
(let* | |
((doom-output-indent 6) | |
(--cl-var-- | |
(let | |
((doom-context doom-context)) | |
(let | |
((tail | |
(ensure-list 'packages))) | |
(while tail | |
(let | |
((context | |
(car tail))) | |
(doom-context-push context) | |
(setq tail | |
(cdr tail))))) | |
(let* | |
(doom-packages doom-disabled-packages) | |
(load packages-file 'noerror 'nomessage) | |
(mapcar #'car doom-packages)))) | |
(name nil)) | |
(while | |
(consp --cl-var--) | |
(setq name | |
(car --cl-var--)) | |
(if | |
(or | |
(doom-package-get name :disable) | |
(eval | |
(doom-package-get name :ignore)) | |
(plist-member | |
(doom-package-get name :recipe) | |
:local-repo) | |
(locate-library | |
(symbol-name name)) | |
(doom-package-built-in-p name) | |
(doom-package-installed-p name)) | |
(progn) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Missing emacs package: %S") | |
name))) | |
(setq --cl-var-- | |
(cdr --cl-var--))) | |
nil))) | |
(if doctor-file | |
(progn | |
(let | |
((inhibit-message t)) | |
(load doctor-file 'noerror 'nomessage)))))) | |
((debug file-missing) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "%s" | |
(error-message-string ex))))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "%s" | |
(error-message-string ex))) | |
doom-doctor--errors)))) | |
((debug error) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Syntax error: %s" ex)))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Syntax error: %s" ex)) | |
doom-doctor--errors))))) | |
(if | |
(or doom-doctor--errors doom-doctor--warnings) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start | |
(doom-print--style 'bold "%s %s")) | |
group name)) | |
(doom-print | |
(doom-print--format "%s" | |
(string-join | |
(append doom-doctor--errors doom-doctor--warnings) | |
"\n"))))) | |
(progn | |
(setq doom-local-errors doom-doctor--errors) | |
(setq doom-local-warnings doom-doctor--warnings))))) | |
(setq doom-doctor--errors | |
(append doom-doctor--errors doom-local-errors)) | |
(setq doom-doctor--warnings | |
(append doom-doctor--warnings doom-local-warnings))))))) | |
(setq tail | |
(cdr tail))))))))) | |
((debug error) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Attempt to load DOOM failed\n %s\n" | |
(or | |
(cdr-safe ex) | |
(car ex)))))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Attempt to load DOOM failed\n %s\n" | |
(or | |
(cdr-safe ex) | |
(car ex)))) | |
doom-doctor--warnings))) | |
(setq doom-modules nil))) | |
(terpri) | |
(let | |
((tail | |
(list | |
(list doom-doctor--warnings "warning" 'yellow) | |
(list doom-doctor--errors "error" 'red)))) | |
(while tail | |
(let | |
((msg | |
(car tail))) | |
(if | |
(car msg) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'color | |
(nth 2 msg) | |
(if | |
(cdr | |
(car msg)) | |
"There are %d %ss!" "There is %d %s!") | |
(length | |
(car msg)) | |
(nth 1 msg)))))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(or doom-doctor--errors doom-doctor--warnings) | |
nil | |
(doom-print | |
(doom-print--format | |
(doom-print--style 'green "Everything seems fine, happy Emacs'ing!")))) | |
(exit! :pager? "+G")))) | |
nil) | |
nil) | |
;;;; 64 | |
((doom-cli-execute #s(doom-cli | |
("doom" "doctor") | |
nil | |
(("SUMMARY" . "Diagnoses common issues on your system.") | |
("MAIN" . "The Doom doctor is essentially one big, self-contained elisp shell script that\nuses a series of simple heuristics to diagnose common issues on your system.\nIssues that could intefere with Doom Emacs.\n\nDoom modules may optionally have a doctor.el file to run their own heuristics\nin.")) | |
nil nil nil nil | |
(:benchmark nil :prefix | |
(doom) | |
:group "Diagnostics" :docs "Commands for troubleshooting and debugging Doom." :hide nil) | |
(closure | |
(t) | |
(cli alist) | |
(let nil | |
(doom-print | |
(doom-print--format "The doctor will see you now...\n")) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking your Emacs version..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(cond | |
((or | |
(> emacs-major-version 29) | |
(string-match-p ".\\([56]0\\|9[0-9]\\)$" emacs-version)) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected a development version of Emacs (%s)" emacs-version)))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Detected a development version of Emacs (%s)" emacs-version)) | |
doom-doctor--warnings))) | |
(if | |
(> emacs-major-version 29) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "This is the bleeding edge of Emacs. As it is constantly changed, Doom will not " "(officially) support it. If you've found a stable commit, great! But be " "cautious about updating Emacs too eagerly!\n"))))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "A .50, .60, or .9X appended to the version string indicates that this is a version " "of Emacs in between stable releases. These are not well supported.\n")))))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Because development builds are prone to random breakage, there will be a greater " "burden on you to investigate and deal with issues. Please make extra sure that " "your issue is reproducible in 29.1 before reporting them to Doom's issue tracker!\n" "\n" "If this doesn't phase you, read the \"Why does Doom not support Emacs HEAD\" QnA " "in Doom's FAQ. It offers some advice for debugging and surviving issues on the " "bleeding edge. Failing that, 29.1 is highly recommended and will always be " "Doom's best supported version of Emacs.")))))) | |
((= emacs-major-version 27) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs 27 is supported, but consider upgrading to 28.1")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs 27 is supported, but consider upgrading to 28.1")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Emacs 28.1 is better supported, faster, and more stable. Plus, Doom will drop " "27.x support sometime late-2023."))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for Doom's prerequisites..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(not | |
(executable-find "git")) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find git on your machine! Doom's package manager won't work.")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find git on your machine! Doom's package manager won't work.")) | |
doom-doctor--errors))) | |
(let | |
((saved-match-data | |
(match-data))) | |
(unwind-protect | |
(progn | |
(let* | |
((version | |
(cdr | |
(doom-call-process "git" "version"))) | |
(version | |
(and | |
(string-match "git version \\([0-9]+\\(?:\\.[0-9]+\\)\\{2\\}\\)" version) | |
(match-string 1 version)))) | |
(if version | |
(if | |
(version< version "2.23") | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Git %s detected! Doom requires git 2.23 or newer!" version)))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Git %s detected! Doom requires git 2.23 or newer!" version)) | |
doom-doctor--errors))))) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Cannot determine Git version. Doom requires git 2.23 or newer!")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Cannot determine Git version. Doom requires git 2.23 or newer!")) | |
doom-doctor--warnings)))))) | |
(set-match-data saved-match-data t)))) | |
(if | |
(executable-find "rg") | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `rg' binary; this a hard dependecy for Doom, file searches may not work at all")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `rg' binary; this a hard dependecy for Doom, file searches may not work at all")) | |
doom-doctor--errors)))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for Emacs config conflicts..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(or | |
(file-equal-p doom-emacs-dir "~/.emacs.d") | |
(file-equal-p doom-emacs-dir "~/.config/emacs")) | |
nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Doom is installed in a non-standard location"))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "The standard locations are ~/.config/emacs or ~/.emacs.d. Emacs will fail " "to load Doom if it is not explicitly told where to look for it. In Emacs 29+, " "this is possible with the --init-directory option:\n\n" " $ emacs --init-directory '" | |
(abbreviate-file-name doom-emacs-dir) | |
"'\n\n" "However, Emacs 27-28 users have no choice but to move Doom to a standard " "location.\n\n" "Chemacs users may ignore this warning, however.")))))) | |
(let | |
(found?) | |
(let | |
((tail | |
'("~/_emacs" "~/.emacs" "~/.emacs.el" "~/.emacs.d" "~/.config/emacs"))) | |
(while tail | |
(let | |
((file | |
(car tail))) | |
(if | |
(and | |
(file-exists-p file) | |
(not | |
(file-equal-p file doom-emacs-dir))) | |
(progn | |
(setq found? t) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Found another Emacs config: %s (%s)") | |
file | |
(if | |
(file-directory-p file) | |
"directory" "file"))))) | |
(setq tail | |
(cdr tail))))) | |
(if found? | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Having multiple Emacs configs may prevent Doom from loading properly. Emacs " "will load the first it finds and ignore the rest. If Doom isn't starting up " "correctly (e.g. you get a vanilla splash screen), make sure that only one of " "these exist.\n\n" "Chemacs users may ignore this warning.")))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for missing Emacs features..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(functionp 'json-serialize) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native JSON support")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native JSON support")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Users will see a substantial performance gain by building Emacs with " "jansson support (i.e. a native JSON library), particularly LSP users. " "You must install a prebuilt Emacs binary with this included, or compile " "Emacs with the --with-json option.")))))) | |
(if | |
(featurep 'native-compile) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native compilation support")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native compilation support")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Users will see a substantial performance gain by building Emacs with " "native compilation support, availible in emacs 28+." "You must install a prebuilt Emacs binary with this included, or compile " "Emacs with the --with-native-compilation option.")))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for private config conflicts..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(let* | |
((xdg-dir | |
(concat | |
(or | |
(getenv "XDG_CONFIG_HOME") | |
"~/.config") | |
"/doom/")) | |
(doom-dir | |
(or | |
(getenv "DOOMDIR") | |
"~/.doom.d/")) | |
(dir | |
(if | |
(file-directory-p xdg-dir) | |
xdg-dir doom-dir))) | |
(if | |
(file-equal-p dir doom-emacs-dir) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Doom was cloned to %S, not ~/.emacs.d or ~/.config/emacs" | |
(doom-print--class 'path dir)))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom's source and your private Doom config have to live in separate directories. " "Putting them in the same directory (without changing the DOOMDIR environment " "variable) will cause errors on startup."))))))) | |
(if | |
(and | |
(not | |
(file-equal-p xdg-dir doom-dir)) | |
(file-directory-p xdg-dir) | |
(file-directory-p doom-dir)) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected two private configs, in %s and %s") | |
(abbreviate-file-name xdg-dir) | |
doom-dir)) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "The second directory will be ignored, as it has lower precedence.")))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for common environmental issues..."))) | |
(if | |
(string-match-p "/fish$" shell-file-name) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected Fish as your $SHELL"))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Fish (and possibly other non-POSIX shells) is known to inject garbage " "output into some of the child processes that Emacs spawns. Many Emacs " "packages/utilities will choke on this output, causing unpredictable issues. " "To get around this, either:\n\n" " - Add the following to $DOOMDIR/config.el:\n\n" " (setq shell-file-name (executable-find \"bash\"))\n\n" " - Or change your default shell to a POSIX shell (like bash or zsh) " " and explicitly configure your terminal apps to use the shell you " " want.\n\n" "If you opt for option 1 and use one of Emacs' terminal emulators, you " "will also need to configure them to use Fish, e.g.\n\n" " (setq-default vterm-shell (executable-find \"fish\"))\n\n" " (setq-default explicit-shell-file-name (executable-find \"fish\"))\n"))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for stale elc files..."))) | |
(elc-check-dir doom-core-dir) | |
(elc-check-dir doom-modules-dir) | |
(elc-check-dir | |
(doom-path doom-local-dir "straight" straight-build-dir)) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for problematic git global settings..."))) | |
(if | |
(executable-find "git") | |
(if | |
(= 0 | |
(car | |
(doom-call-process "git" "config" "--global" "--get-regexp" "^url\\.git://github\\.com"))) | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected insteadOf rules in your global gitconfig.")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Detected insteadOf rules in your global gitconfig.")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom's package manager heavily relies on git. In particular, many of its packages " "are hosted on github. Rewrite rules like these will break it:\n\n" " [url \"git://github.com\"]\n" " insteadOf = https://github.com\n\n" "Please remove them from your gitconfig or use a conditional includeIf rule to " "only apply your rewrites to specific repositories. See " "'https://git-scm.com/docs/git-config#_includes' for more information."))))))) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `git' binary; this a hard dependecy for Doom!")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `git' binary; this a hard dependecy for Doom!")) | |
doom-doctor--errors)))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking Doom Emacs..."))) | |
(condition-case ex | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(require 'doom-start) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'success "Initialized Doom Emacs %s") | |
doom-version)) | |
(doom-print | |
(doom-print--format | |
(if | |
(hash-table-p doom-modules) | |
(doom-print--class 'success "Detected %d modules" | |
(hash-table-count doom-modules)) | |
(doom-print--class 'warn "Failed to load any modules. Do you have an private init.el?")))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'success "Detected %d packages") | |
(length doom-packages))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking Doom core for irregularities..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(let | |
((tail | |
(list "savehist" "projectile.cache"))) | |
(while tail | |
(let | |
((file | |
(car tail))) | |
(let* | |
((size | |
(and t | |
(condition-case nil | |
(progn | |
(doom-file-size file doom-cache-dir)) | |
(error nil))))) | |
(if size | |
(if | |
(> size 1048576) | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "%s is too large (%.02fmb). This may cause freezes or odd startup delays" file | |
(/ size 1024 1024.0))))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "%s is too large (%.02fmb). This may cause freezes or odd startup delays" file | |
(/ size 1024 1024.0))) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Consider deleting it from your system (manually)"))))))) | |
nil)) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(condition-case nil | |
(progn | |
(executable-find doom-projectile-fd-binary)) | |
(error nil)) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Couldn't find the `fd' binary; project file searches will be slightly slower")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Couldn't find the `fd' binary; project file searches will be slightly slower")) | |
doom-doctor--warnings)))) | |
(require 'projectile) | |
(if | |
(projectile-project-root "~") | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Your $HOME is recognized as a project root")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Your $HOME is recognized as a project root")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Emacs will assume $HOME is the root of any project living under $HOME. If this isn't\n" "desired, you will need to remove \".git\" from `projectile-project-root-files-bottom-up'\n" "(a variable), e.g.\n\n" " (after! projectile\n" " (setq projectile-project-root-files-bottom-up\n" " (remove \".git\" projectile-project-root-files-bottom-up)))"))))))) | |
(if | |
(and | |
(file-equal-p doom-user-dir "~/.config/doom") | |
(file-directory-p "~/.doom.d")) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Both %S and '~/.doom.d' exist on your system") | |
(doom-print--class 'path doom-user-dir))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom will only load one of these (~/.config/doom takes precedence). Possessing\n" "both is rarely intentional; you should one or the other."))))))) | |
(if | |
(not | |
(executable-find "fc-list")) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Warning: unable to detect fonts because fontconfig isn't installed")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Warning: unable to detect fonts because fontconfig isn't installed")) | |
doom-doctor--warnings))) | |
(if | |
(and | |
(cond | |
((eq system-type 'gnu/linux) | |
(let nil | |
(concat | |
(or | |
(getenv "XDG_DATA_HOME") | |
"~/.local/share") | |
"/fonts/"))) | |
((eq system-type 'darwin) | |
(let nil "~/Library/Fonts/"))) | |
(require 'nerd-icons nil t)) | |
(progn | |
(let | |
((temp-buffer | |
(generate-new-buffer " *temp*" t))) | |
(save-current-buffer | |
(set-buffer temp-buffer) | |
(unwind-protect | |
(progn | |
(let | |
((errors 0)) | |
(let* | |
((output | |
(doom-call-process "fc-list" "" "file")) | |
(status | |
(if output | |
(car-safe | |
(prog1 output | |
(setq output | |
(cdr output)))) | |
(signal 'wrong-number-of-arguments | |
(list | |
'(status . output) | |
(length output)))))) | |
(if | |
(not | |
(= 0 status)) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "There was an error running `fc-list'. Is fontconfig installed correctly?"))) | |
(insert | |
(cdr | |
(doom-call-process "fc-list" "" "file"))) | |
(let | |
((tail nerd-icons-font-names)) | |
(while tail | |
(let | |
((font | |
(car tail))) | |
(if | |
(save-excursion | |
(re-search-backward font nil t)) | |
(doom-print | |
(doom-print--format | |
(doom-print--style 'green "Found font %s" font))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "%S font is not installed on your system") | |
font)) | |
(setq errors | |
(1+ errors))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(> errors 0) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Some needed fonts are not properly installed on your system. To download and " "install them, run `M-x nerd-icons-install-fonts' from within Doom Emacs. " "However, on Windows this command will only download them; the fonts must " "be installed manually afterwards."))))))))))) | |
(and | |
(buffer-name temp-buffer) | |
(kill-buffer temp-buffer)))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for stale elc files in your DOOMDIR..."))) | |
(if | |
(file-directory-p doom-user-dir) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(elc-check-dir doom-user-dir))))) | |
(if doom-modules | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking your enabled modules..."))) | |
(advice-add #'require :around #'doom-shut-up-a) | |
(let | |
((tail | |
(doom-module-list))) | |
(while tail | |
(let | |
((x53 | |
(car tail))) | |
(progn | |
(ignore | |
(consp x53)) | |
(let* | |
((x54 | |
(car-safe x53)) | |
(x55 | |
(cdr-safe x53))) | |
(let | |
((group x54) | |
(name x55)) | |
(let | |
((doom-context doom-context)) | |
(let | |
((tail | |
(ensure-list 'doctor))) | |
(while tail | |
(let | |
((context | |
(car tail))) | |
(doom-context-push context) | |
(setq tail | |
(cdr tail))))) | |
(let | |
(doom-local-errors doom-local-warnings) | |
(let | |
(doom-doctor--errors doom-doctor--warnings) | |
(condition-case ex | |
(let | |
((doom-module-context | |
(doom-module-context | |
(cons group name)))) | |
(if doom-inhibit-log nil | |
(doom--log ":context:module: =%s" doom-module-context)) | |
(let | |
((doctor-file | |
(doom-module-expand-path group name "doctor.el")) | |
(packages-file | |
(doom-module-expand-path group name doom-module-packages-file))) | |
(if packages-file | |
(progn | |
(let* | |
((doom-output-indent 6) | |
(--cl-var-- | |
(let | |
((doom-context doom-context)) | |
(let | |
((tail | |
(ensure-list 'packages))) | |
(while tail | |
(let | |
((context | |
(car tail))) | |
(doom-context-push context) | |
(setq tail | |
(cdr tail))))) | |
(let* | |
(doom-packages doom-disabled-packages) | |
(load packages-file 'noerror 'nomessage) | |
(mapcar #'car doom-packages)))) | |
(name nil)) | |
(while | |
(consp --cl-var--) | |
(setq name | |
(car --cl-var--)) | |
(if | |
(or | |
(doom-package-get name :disable) | |
(eval | |
(doom-package-get name :ignore)) | |
(plist-member | |
(doom-package-get name :recipe) | |
:local-repo) | |
(locate-library | |
(symbol-name name)) | |
(doom-package-built-in-p name) | |
(doom-package-installed-p name)) | |
(progn) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Missing emacs package: %S") | |
name))) | |
(setq --cl-var-- | |
(cdr --cl-var--))) | |
nil))) | |
(if doctor-file | |
(progn | |
(let | |
((inhibit-message t)) | |
(load doctor-file 'noerror 'nomessage)))))) | |
((debug file-missing) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "%s" | |
(error-message-string ex))))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "%s" | |
(error-message-string ex))) | |
doom-doctor--errors)))) | |
((debug error) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Syntax error: %s" ex)))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Syntax error: %s" ex)) | |
doom-doctor--errors))))) | |
(if | |
(or doom-doctor--errors doom-doctor--warnings) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start | |
(doom-print--style 'bold "%s %s")) | |
group name)) | |
(doom-print | |
(doom-print--format "%s" | |
(string-join | |
(append doom-doctor--errors doom-doctor--warnings) | |
"\n"))))) | |
(progn | |
(setq doom-local-errors doom-doctor--errors) | |
(setq doom-local-warnings doom-doctor--warnings))))) | |
(setq doom-doctor--errors | |
(append doom-doctor--errors doom-local-errors)) | |
(setq doom-doctor--warnings | |
(append doom-doctor--warnings doom-local-warnings))))))) | |
(setq tail | |
(cdr tail))))))))) | |
((debug error) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Attempt to load DOOM failed\n %s\n" | |
(or | |
(cdr-safe ex) | |
(car ex)))))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Attempt to load DOOM failed\n %s\n" | |
(or | |
(cdr-safe ex) | |
(car ex)))) | |
doom-doctor--warnings))) | |
(setq doom-modules nil))) | |
(terpri) | |
(let | |
((tail | |
(list | |
(list doom-doctor--warnings "warning" 'yellow) | |
(list doom-doctor--errors "error" 'red)))) | |
(while tail | |
(let | |
((msg | |
(car tail))) | |
(if | |
(car msg) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'color | |
(nth 2 msg) | |
(if | |
(cdr | |
(car msg)) | |
"There are %d %ss!" "There is %d %s!") | |
(length | |
(car msg)) | |
(nth 1 msg)))))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(or doom-doctor--errors doom-doctor--warnings) | |
nil | |
(doom-print | |
(doom-print--format | |
(doom-print--style 'green "Everything seems fine, happy Emacs'ing!")))) | |
(exit! :pager? "+G")))) | |
nil) | |
((cli . #s(doom-cli | |
("doom" "doctor") | |
nil | |
(("SUMMARY" . "Diagnoses common issues on your system.") | |
("MAIN" . "The Doom doctor is essentially one big, self-contained elisp shell script that\nuses a series of simple heuristics to diagnose common issues on your system.\nIssues that could intefere with Doom Emacs.\n\nDoom modules may optionally have a doctor.el file to run their own heuristics\nin.")) | |
nil nil nil nil | |
(:benchmark nil :prefix | |
(doom) | |
:group "Diagnostics" :docs "Commands for troubleshooting and debugging Doom." :hide nil) | |
(closure | |
(t) | |
(cli alist) | |
(let nil | |
(doom-print | |
(doom-print--format "The doctor will see you now...\n")) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking your Emacs version..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(cond | |
((or | |
(> emacs-major-version 29) | |
(string-match-p ".\\([56]0\\|9[0-9]\\)$" emacs-version)) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected a development version of Emacs (%s)" emacs-version)))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Detected a development version of Emacs (%s)" emacs-version)) | |
doom-doctor--warnings))) | |
(if | |
(> emacs-major-version 29) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "This is the bleeding edge of Emacs. As it is constantly changed, Doom will not " "(officially) support it. If you've found a stable commit, great! But be " "cautious about updating Emacs too eagerly!\n"))))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "A .50, .60, or .9X appended to the version string indicates that this is a version " "of Emacs in between stable releases. These are not well supported.\n")))))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Because development builds are prone to random breakage, there will be a greater " "burden on you to investigate and deal with issues. Please make extra sure that " "your issue is reproducible in 29.1 before reporting them to Doom's issue tracker!\n" "\n" "If this doesn't phase you, read the \"Why does Doom not support Emacs HEAD\" QnA " "in Doom's FAQ. It offers some advice for debugging and surviving issues on the " "bleeding edge. Failing that, 29.1 is highly recommended and will always be " "Doom's best supported version of Emacs.")))))) | |
((= emacs-major-version 27) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs 27 is supported, but consider upgrading to 28.1")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs 27 is supported, but consider upgrading to 28.1")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Emacs 28.1 is better supported, faster, and more stable. Plus, Doom will drop " "27.x support sometime late-2023."))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for Doom's prerequisites..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(not | |
(executable-find "git")) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find git on your machine! Doom's package manager won't work.")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find git on your machine! Doom's package manager won't work.")) | |
doom-doctor--errors))) | |
(let | |
((saved-match-data | |
(match-data))) | |
(unwind-protect | |
(progn | |
(let* | |
((version | |
(cdr | |
(doom-call-process "git" "version"))) | |
(version | |
(and | |
(string-match "git version \\([0-9]+\\(?:\\.[0-9]+\\)\\{2\\}\\)" version) | |
(match-string 1 version)))) | |
(if version | |
(if | |
(version< version "2.23") | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Git %s detected! Doom requires git 2.23 or newer!" version)))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Git %s detected! Doom requires git 2.23 or newer!" version)) | |
doom-doctor--errors))))) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Cannot determine Git version. Doom requires git 2.23 or newer!")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Cannot determine Git version. Doom requires git 2.23 or newer!")) | |
doom-doctor--warnings)))))) | |
(set-match-data saved-match-data t)))) | |
(if | |
(executable-find "rg") | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `rg' binary; this a hard dependecy for Doom, file searches may not work at all")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `rg' binary; this a hard dependecy for Doom, file searches may not work at all")) | |
doom-doctor--errors)))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for Emacs config conflicts..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(or | |
(file-equal-p doom-emacs-dir "~/.emacs.d") | |
(file-equal-p doom-emacs-dir "~/.config/emacs")) | |
nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Doom is installed in a non-standard location"))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "The standard locations are ~/.config/emacs or ~/.emacs.d. Emacs will fail " "to load Doom if it is not explicitly told where to look for it. In Emacs 29+, " "this is possible with the --init-directory option:\n\n" " $ emacs --init-directory '" | |
(abbreviate-file-name doom-emacs-dir) | |
"'\n\n" "However, Emacs 27-28 users have no choice but to move Doom to a standard " "location.\n\n" "Chemacs users may ignore this warning, however.")))))) | |
(let | |
(found?) | |
(let | |
((tail | |
'("~/_emacs" "~/.emacs" "~/.emacs.el" "~/.emacs.d" "~/.config/emacs"))) | |
(while tail | |
(let | |
((file | |
(car tail))) | |
(if | |
(and | |
(file-exists-p file) | |
(not | |
(file-equal-p file doom-emacs-dir))) | |
(progn | |
(setq found? t) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Found another Emacs config: %s (%s)") | |
file | |
(if | |
(file-directory-p file) | |
"directory" "file"))))) | |
(setq tail | |
(cdr tail))))) | |
(if found? | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Having multiple Emacs configs may prevent Doom from loading properly. Emacs " "will load the first it finds and ignore the rest. If Doom isn't starting up " "correctly (e.g. you get a vanilla splash screen), make sure that only one of " "these exist.\n\n" "Chemacs users may ignore this warning.")))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for missing Emacs features..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(functionp 'json-serialize) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native JSON support")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native JSON support")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Users will see a substantial performance gain by building Emacs with " "jansson support (i.e. a native JSON library), particularly LSP users. " "You must install a prebuilt Emacs binary with this included, or compile " "Emacs with the --with-json option.")))))) | |
(if | |
(featurep 'native-compile) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native compilation support")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native compilation support")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Users will see a substantial performance gain by building Emacs with " "native compilation support, availible in emacs 28+." "You must install a prebuilt Emacs binary with this included, or compile " "Emacs with the --with-native-compilation option.")))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for private config conflicts..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(let* | |
((xdg-dir | |
(concat | |
(or | |
(getenv "XDG_CONFIG_HOME") | |
"~/.config") | |
"/doom/")) | |
(doom-dir | |
(or | |
(getenv "DOOMDIR") | |
"~/.doom.d/")) | |
(dir | |
(if | |
(file-directory-p xdg-dir) | |
xdg-dir doom-dir))) | |
(if | |
(file-equal-p dir doom-emacs-dir) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Doom was cloned to %S, not ~/.emacs.d or ~/.config/emacs" | |
(doom-print--class 'path dir)))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom's source and your private Doom config have to live in separate directories. " "Putting them in the same directory (without changing the DOOMDIR environment " "variable) will cause errors on startup."))))))) | |
(if | |
(and | |
(not | |
(file-equal-p xdg-dir doom-dir)) | |
(file-directory-p xdg-dir) | |
(file-directory-p doom-dir)) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected two private configs, in %s and %s") | |
(abbreviate-file-name xdg-dir) | |
doom-dir)) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "The second directory will be ignored, as it has lower precedence.")))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for common environmental issues..."))) | |
(if | |
(string-match-p "/fish$" shell-file-name) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected Fish as your $SHELL"))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Fish (and possibly other non-POSIX shells) is known to inject garbage " "output into some of the child processes that Emacs spawns. Many Emacs " "packages/utilities will choke on this output, causing unpredictable issues. " "To get around this, either:\n\n" " - Add the following to $DOOMDIR/config.el:\n\n" " (setq shell-file-name (executable-find \"bash\"))\n\n" " - Or change your default shell to a POSIX shell (like bash or zsh) " " and explicitly configure your terminal apps to use the shell you " " want.\n\n" "If you opt for option 1 and use one of Emacs' terminal emulators, you " "will also need to configure them to use Fish, e.g.\n\n" " (setq-default vterm-shell (executable-find \"fish\"))\n\n" " (setq-default explicit-shell-file-name (executable-find \"fish\"))\n"))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for stale elc files..."))) | |
(elc-check-dir doom-core-dir) | |
(elc-check-dir doom-modules-dir) | |
(elc-check-dir | |
(doom-path doom-local-dir "straight" straight-build-dir)) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for problematic git global settings..."))) | |
(if | |
(executable-find "git") | |
(if | |
(= 0 | |
(car | |
(doom-call-process "git" "config" "--global" "--get-regexp" "^url\\.git://github\\.com"))) | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected insteadOf rules in your global gitconfig.")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Detected insteadOf rules in your global gitconfig.")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom's package manager heavily relies on git. In particular, many of its packages " "are hosted on github. Rewrite rules like these will break it:\n\n" " [url \"git://github.com\"]\n" " insteadOf = https://github.com\n\n" "Please remove them from your gitconfig or use a conditional includeIf rule to " "only apply your rewrites to specific repositories. See " "'https://git-scm.com/docs/git-config#_includes' for more information."))))))) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `git' binary; this a hard dependecy for Doom!")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `git' binary; this a hard dependecy for Doom!")) | |
doom-doctor--errors)))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking Doom Emacs..."))) | |
(condition-case ex | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(require 'doom-start) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'success "Initialized Doom Emacs %s") | |
doom-version)) | |
(doom-print | |
(doom-print--format | |
(if | |
(hash-table-p doom-modules) | |
(doom-print--class 'success "Detected %d modules" | |
(hash-table-count doom-modules)) | |
(doom-print--class 'warn "Failed to load any modules. Do you have an private init.el?")))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'success "Detected %d packages") | |
(length doom-packages))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking Doom core for irregularities..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(let | |
((tail | |
(list "savehist" "projectile.cache"))) | |
(while tail | |
(let | |
((file | |
(car tail))) | |
(let* | |
((size | |
(and t | |
(condition-case nil | |
(progn | |
(doom-file-size file doom-cache-dir)) | |
(error nil))))) | |
(if size | |
(if | |
(> size 1048576) | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "%s is too large (%.02fmb). This may cause freezes or odd startup delays" file | |
(/ size 1024 1024.0))))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "%s is too large (%.02fmb). This may cause freezes or odd startup delays" file | |
(/ size 1024 1024.0))) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Consider deleting it from your system (manually)"))))))) | |
nil)) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(condition-case nil | |
(progn | |
(executable-find doom-projectile-fd-binary)) | |
(error nil)) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Couldn't find the `fd' binary; project file searches will be slightly slower")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Couldn't find the `fd' binary; project file searches will be slightly slower")) | |
doom-doctor--warnings)))) | |
(require 'projectile) | |
(if | |
(projectile-project-root "~") | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Your $HOME is recognized as a project root")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Your $HOME is recognized as a project root")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Emacs will assume $HOME is the root of any project living under $HOME. If this isn't\n" "desired, you will need to remove \".git\" from `projectile-project-root-files-bottom-up'\n" "(a variable), e.g.\n\n" " (after! projectile\n" " (setq projectile-project-root-files-bottom-up\n" " (remove \".git\" projectile-project-root-files-bottom-up)))"))))))) | |
(if | |
(and | |
(file-equal-p doom-user-dir "~/.config/doom") | |
(file-directory-p "~/.doom.d")) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Both %S and '~/.doom.d' exist on your system") | |
(doom-print--class 'path doom-user-dir))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom will only load one of these (~/.config/doom takes precedence). Possessing\n" "both is rarely intentional; you should one or the other."))))))) | |
(if | |
(not | |
(executable-find "fc-list")) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Warning: unable to detect fonts because fontconfig isn't installed")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Warning: unable to detect fonts because fontconfig isn't installed")) | |
doom-doctor--warnings))) | |
(if | |
(and | |
(cond | |
((eq system-type 'gnu/linux) | |
(let nil | |
(concat | |
(or | |
(getenv "XDG_DATA_HOME") | |
"~/.local/share") | |
"/fonts/"))) | |
((eq system-type 'darwin) | |
(let nil "~/Library/Fonts/"))) | |
(require 'nerd-icons nil t)) | |
(progn | |
(let | |
((temp-buffer | |
(generate-new-buffer " *temp*" t))) | |
(save-current-buffer | |
(set-buffer temp-buffer) | |
(unwind-protect | |
(progn | |
(let | |
((errors 0)) | |
(let* | |
((output | |
(doom-call-process "fc-list" "" "file")) | |
(status | |
(if output | |
(car-safe | |
(prog1 output | |
(setq output | |
(cdr output)))) | |
(signal 'wrong-number-of-arguments | |
(list | |
'(status . output) | |
(length output)))))) | |
(if | |
(not | |
(= 0 status)) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "There was an error running `fc-list'. Is fontconfig installed correctly?"))) | |
(insert | |
(cdr | |
(doom-call-process "fc-list" "" "file"))) | |
(let | |
((tail nerd-icons-font-names)) | |
(while tail | |
(let | |
((font | |
(car tail))) | |
(if | |
(save-excursion | |
(re-search-backward font nil t)) | |
(doom-print | |
(doom-print--format | |
(doom-print--style 'green "Found font %s" font))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "%S font is not installed on your system") | |
font)) | |
(setq errors | |
(1+ errors))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(> errors 0) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Some needed fonts are not properly installed on your system. To download and " "install them, run `M-x nerd-icons-install-fonts' from within Doom Emacs. " "However, on Windows this command will only download them; the fonts must " "be installed manually afterwards."))))))))))) | |
(and | |
(buffer-name temp-buffer) | |
(kill-buffer temp-buffer)))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for stale elc files in your DOOMDIR..."))) | |
(if | |
(file-directory-p doom-user-dir) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(elc-check-dir doom-user-dir))))) | |
(if doom-modules | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking your enabled modules..."))) | |
(advice-add #'require :around #'doom-shut-up-a) | |
(let | |
((tail | |
(doom-module-list))) | |
(while tail | |
(let | |
((x53 | |
(car tail))) | |
(progn | |
(ignore | |
(consp x53)) | |
(let* | |
((x54 | |
(car-safe x53)) | |
(x55 | |
(cdr-safe x53))) | |
(let | |
((group x54) | |
(name x55)) | |
(let | |
((doom-context doom-context)) | |
(let | |
((tail | |
(ensure-list 'doctor))) | |
(while tail | |
(let | |
((context | |
(car tail))) | |
(doom-context-push context) | |
(setq tail | |
(cdr tail))))) | |
(let | |
(doom-local-errors doom-local-warnings) | |
(let | |
(doom-doctor--errors doom-doctor--warnings) | |
(condition-case ex | |
(let | |
((doom-module-context | |
(doom-module-context | |
(cons group name)))) | |
(if doom-inhibit-log nil | |
(doom--log ":context:module: =%s" doom-module-context)) | |
(let | |
((doctor-file | |
(doom-module-expand-path group name "doctor.el")) | |
(packages-file | |
(doom-module-expand-path group name doom-module-packages-file))) | |
(if packages-file | |
(progn | |
(let* | |
((doom-output-indent 6) | |
(--cl-var-- | |
(let | |
((doom-context doom-context)) | |
(let | |
((tail | |
(ensure-list 'packages))) | |
(while tail | |
(let | |
((context | |
(car tail))) | |
(doom-context-push context) | |
(setq tail | |
(cdr tail))))) | |
(let* | |
(doom-packages doom-disabled-packages) | |
(load packages-file 'noerror 'nomessage) | |
(mapcar #'car doom-packages)))) | |
(name nil)) | |
(while | |
(consp --cl-var--) | |
(setq name | |
(car --cl-var--)) | |
(if | |
(or | |
(doom-package-get name :disable) | |
(eval | |
(doom-package-get name :ignore)) | |
(plist-member | |
(doom-package-get name :recipe) | |
:local-repo) | |
(locate-library | |
(symbol-name name)) | |
(doom-package-built-in-p name) | |
(doom-package-installed-p name)) | |
(progn) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Missing emacs package: %S") | |
name))) | |
(setq --cl-var-- | |
(cdr --cl-var--))) | |
nil))) | |
(if doctor-file | |
(progn | |
(let | |
((inhibit-message t)) | |
(load doctor-file 'noerror 'nomessage)))))) | |
((debug file-missing) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "%s" | |
(error-message-string ex))))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "%s" | |
(error-message-string ex))) | |
doom-doctor--errors)))) | |
((debug error) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Syntax error: %s" ex)))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Syntax error: %s" ex)) | |
doom-doctor--errors))))) | |
(if | |
(or doom-doctor--errors doom-doctor--warnings) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start | |
(doom-print--style 'bold "%s %s")) | |
group name)) | |
(doom-print | |
(doom-print--format "%s" | |
(string-join | |
(append doom-doctor--errors doom-doctor--warnings) | |
"\n"))))) | |
(progn | |
(setq doom-local-errors doom-doctor--errors) | |
(setq doom-local-warnings doom-doctor--warnings))))) | |
(setq doom-doctor--errors | |
(append doom-doctor--errors doom-local-errors)) | |
(setq doom-doctor--warnings | |
(append doom-doctor--warnings doom-local-warnings))))))) | |
(setq tail | |
(cdr tail))))))))) | |
((debug error) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Attempt to load DOOM failed\n %s\n" | |
(or | |
(cdr-safe ex) | |
(car ex)))))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Attempt to load DOOM failed\n %s\n" | |
(or | |
(cdr-safe ex) | |
(car ex)))) | |
doom-doctor--warnings))) | |
(setq doom-modules nil))) | |
(terpri) | |
(let | |
((tail | |
(list | |
(list doom-doctor--warnings "warning" 'yellow) | |
(list doom-doctor--errors "error" 'red)))) | |
(while tail | |
(let | |
((msg | |
(car tail))) | |
(if | |
(car msg) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'color | |
(nth 2 msg) | |
(if | |
(cdr | |
(car msg)) | |
"There are %d %ss!" "There is %d %s!") | |
(length | |
(car msg)) | |
(nth 1 msg)))))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(or doom-doctor--errors doom-doctor--warnings) | |
nil | |
(doom-print | |
(doom-print--format | |
(doom-print--style 'green "Everything seems fine, happy Emacs'ing!")))) | |
(exit! :pager? "+G"))))) | |
(bindings))) | |
;;;; 65 | |
((let | |
((cli x16) | |
(bindings x17)) | |
(doom-cli-execute cli bindings)) | |
((context . #s(doom-cli-context | |
(26166 61947 588707 130000) | |
18982 0 | |
(182 . 40) | |
nil nil "doom" nil nil | |
("doom" "doctor") | |
nil | |
("doctor") | |
(("--eval") | |
("-E") | |
("--strict-load") | |
("--load") | |
("-L") | |
("--color") | |
("--benchmark") | |
("--profile") | |
("--pager") | |
("--emacsdir") | |
("--doomdir") | |
("--verbose") | |
("-v") | |
("--debug") | |
("-D") | |
("--force") | |
("-!")) | |
((t) | |
(("doom" "doctor")) | |
(("doom") | |
"doctor")) | |
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil)) | |
(command "doom" "doctor") | |
(cli . #s(doom-cli | |
("doom" "doctor") | |
nil | |
(("SUMMARY" . "Diagnoses common issues on your system.") | |
("MAIN" . "The Doom doctor is essentially one big, self-contained elisp shell script that\nuses a series of simple heuristics to diagnose common issues on your system.\nIssues that could intefere with Doom Emacs.\n\nDoom modules may optionally have a doctor.el file to run their own heuristics\nin.")) | |
nil nil nil nil | |
(:benchmark nil :prefix | |
(doom) | |
:group "Diagnostics" :docs "Commands for troubleshooting and debugging Doom." :hide nil) | |
(closure | |
(t) | |
(cli alist) | |
(let nil | |
(doom-print | |
(doom-print--format "The doctor will see you now...\n")) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking your Emacs version..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(cond | |
((or | |
(> emacs-major-version 29) | |
(string-match-p ".\\([56]0\\|9[0-9]\\)$" emacs-version)) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected a development version of Emacs (%s)" emacs-version)))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Detected a development version of Emacs (%s)" emacs-version)) | |
doom-doctor--warnings))) | |
(if | |
(> emacs-major-version 29) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "This is the bleeding edge of Emacs. As it is constantly changed, Doom will not " "(officially) support it. If you've found a stable commit, great! But be " "cautious about updating Emacs too eagerly!\n"))))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "A .50, .60, or .9X appended to the version string indicates that this is a version " "of Emacs in between stable releases. These are not well supported.\n")))))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Because development builds are prone to random breakage, there will be a greater " "burden on you to investigate and deal with issues. Please make extra sure that " "your issue is reproducible in 29.1 before reporting them to Doom's issue tracker!\n" "\n" "If this doesn't phase you, read the \"Why does Doom not support Emacs HEAD\" QnA " "in Doom's FAQ. It offers some advice for debugging and surviving issues on the " "bleeding edge. Failing that, 29.1 is highly recommended and will always be " "Doom's best supported version of Emacs.")))))) | |
((= emacs-major-version 27) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs 27 is supported, but consider upgrading to 28.1")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs 27 is supported, but consider upgrading to 28.1")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Emacs 28.1 is better supported, faster, and more stable. Plus, Doom will drop " "27.x support sometime late-2023."))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for Doom's prerequisites..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(not | |
(executable-find "git")) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find git on your machine! Doom's package manager won't work.")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find git on your machine! Doom's package manager won't work.")) | |
doom-doctor--errors))) | |
(let | |
((saved-match-data | |
(match-data))) | |
(unwind-protect | |
(progn | |
(let* | |
((version | |
(cdr | |
(doom-call-process "git" "version"))) | |
(version | |
(and | |
(string-match "git version \\([0-9]+\\(?:\\.[0-9]+\\)\\{2\\}\\)" version) | |
(match-string 1 version)))) | |
(if version | |
(if | |
(version< version "2.23") | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Git %s detected! Doom requires git 2.23 or newer!" version)))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Git %s detected! Doom requires git 2.23 or newer!" version)) | |
doom-doctor--errors))))) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Cannot determine Git version. Doom requires git 2.23 or newer!")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Cannot determine Git version. Doom requires git 2.23 or newer!")) | |
doom-doctor--warnings)))))) | |
(set-match-data saved-match-data t)))) | |
(if | |
(executable-find "rg") | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `rg' binary; this a hard dependecy for Doom, file searches may not work at all")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `rg' binary; this a hard dependecy for Doom, file searches may not work at all")) | |
doom-doctor--errors)))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for Emacs config conflicts..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(or | |
(file-equal-p doom-emacs-dir "~/.emacs.d") | |
(file-equal-p doom-emacs-dir "~/.config/emacs")) | |
nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Doom is installed in a non-standard location"))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "The standard locations are ~/.config/emacs or ~/.emacs.d. Emacs will fail " "to load Doom if it is not explicitly told where to look for it. In Emacs 29+, " "this is possible with the --init-directory option:\n\n" " $ emacs --init-directory '" | |
(abbreviate-file-name doom-emacs-dir) | |
"'\n\n" "However, Emacs 27-28 users have no choice but to move Doom to a standard " "location.\n\n" "Chemacs users may ignore this warning, however.")))))) | |
(let | |
(found?) | |
(let | |
((tail | |
'("~/_emacs" "~/.emacs" "~/.emacs.el" "~/.emacs.d" "~/.config/emacs"))) | |
(while tail | |
(let | |
((file | |
(car tail))) | |
(if | |
(and | |
(file-exists-p file) | |
(not | |
(file-equal-p file doom-emacs-dir))) | |
(progn | |
(setq found? t) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Found another Emacs config: %s (%s)") | |
file | |
(if | |
(file-directory-p file) | |
"directory" "file"))))) | |
(setq tail | |
(cdr tail))))) | |
(if found? | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Having multiple Emacs configs may prevent Doom from loading properly. Emacs " "will load the first it finds and ignore the rest. If Doom isn't starting up " "correctly (e.g. you get a vanilla splash screen), make sure that only one of " "these exist.\n\n" "Chemacs users may ignore this warning.")))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for missing Emacs features..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(functionp 'json-serialize) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native JSON support")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native JSON support")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Users will see a substantial performance gain by building Emacs with " "jansson support (i.e. a native JSON library), particularly LSP users. " "You must install a prebuilt Emacs binary with this included, or compile " "Emacs with the --with-json option.")))))) | |
(if | |
(featurep 'native-compile) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native compilation support")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native compilation support")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Users will see a substantial performance gain by building Emacs with " "native compilation support, availible in emacs 28+." "You must install a prebuilt Emacs binary with this included, or compile " "Emacs with the --with-native-compilation option.")))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for private config conflicts..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(let* | |
((xdg-dir | |
(concat | |
(or | |
(getenv "XDG_CONFIG_HOME") | |
"~/.config") | |
"/doom/")) | |
(doom-dir | |
(or | |
(getenv "DOOMDIR") | |
"~/.doom.d/")) | |
(dir | |
(if | |
(file-directory-p xdg-dir) | |
xdg-dir doom-dir))) | |
(if | |
(file-equal-p dir doom-emacs-dir) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Doom was cloned to %S, not ~/.emacs.d or ~/.config/emacs" | |
(doom-print--class 'path dir)))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom's source and your private Doom config have to live in separate directories. " "Putting them in the same directory (without changing the DOOMDIR environment " "variable) will cause errors on startup."))))))) | |
(if | |
(and | |
(not | |
(file-equal-p xdg-dir doom-dir)) | |
(file-directory-p xdg-dir) | |
(file-directory-p doom-dir)) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected two private configs, in %s and %s") | |
(abbreviate-file-name xdg-dir) | |
doom-dir)) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "The second directory will be ignored, as it has lower precedence.")))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for common environmental issues..."))) | |
(if | |
(string-match-p "/fish$" shell-file-name) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected Fish as your $SHELL"))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Fish (and possibly other non-POSIX shells) is known to inject garbage " "output into some of the child processes that Emacs spawns. Many Emacs " "packages/utilities will choke on this output, causing unpredictable issues. " "To get around this, either:\n\n" " - Add the following to $DOOMDIR/config.el:\n\n" " (setq shell-file-name (executable-find \"bash\"))\n\n" " - Or change your default shell to a POSIX shell (like bash or zsh) " " and explicitly configure your terminal apps to use the shell you " " want.\n\n" "If you opt for option 1 and use one of Emacs' terminal emulators, you " "will also need to configure them to use Fish, e.g.\n\n" " (setq-default vterm-shell (executable-find \"fish\"))\n\n" " (setq-default explicit-shell-file-name (executable-find \"fish\"))\n"))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for stale elc files..."))) | |
(elc-check-dir doom-core-dir) | |
(elc-check-dir doom-modules-dir) | |
(elc-check-dir | |
(doom-path doom-local-dir "straight" straight-build-dir)) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for problematic git global settings..."))) | |
(if | |
(executable-find "git") | |
(if | |
(= 0 | |
(car | |
(doom-call-process "git" "config" "--global" "--get-regexp" "^url\\.git://github\\.com"))) | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected insteadOf rules in your global gitconfig.")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Detected insteadOf rules in your global gitconfig.")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom's package manager heavily relies on git. In particular, many of its packages " "are hosted on github. Rewrite rules like these will break it:\n\n" " [url \"git://github.com\"]\n" " insteadOf = https://github.com\n\n" "Please remove them from your gitconfig or use a conditional includeIf rule to " "only apply your rewrites to specific repositories. See " "'https://git-scm.com/docs/git-config#_includes' for more information."))))))) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `git' binary; this a hard dependecy for Doom!")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `git' binary; this a hard dependecy for Doom!")) | |
doom-doctor--errors)))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking Doom Emacs..."))) | |
(condition-case ex | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(require 'doom-start) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'success "Initialized Doom Emacs %s") | |
doom-version)) | |
(doom-print | |
(doom-print--format | |
(if | |
(hash-table-p doom-modules) | |
(doom-print--class 'success "Detected %d modules" | |
(hash-table-count doom-modules)) | |
(doom-print--class 'warn "Failed to load any modules. Do you have an private init.el?")))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'success "Detected %d packages") | |
(length doom-packages))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking Doom core for irregularities..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(let | |
((tail | |
(list "savehist" "projectile.cache"))) | |
(while tail | |
(let | |
((file | |
(car tail))) | |
(let* | |
((size | |
(and t | |
(condition-case nil | |
(progn | |
(doom-file-size file doom-cache-dir)) | |
(error nil))))) | |
(if size | |
(if | |
(> size 1048576) | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "%s is too large (%.02fmb). This may cause freezes or odd startup delays" file | |
(/ size 1024 1024.0))))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "%s is too large (%.02fmb). This may cause freezes or odd startup delays" file | |
(/ size 1024 1024.0))) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Consider deleting it from your system (manually)"))))))) | |
nil)) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(condition-case nil | |
(progn | |
(executable-find doom-projectile-fd-binary)) | |
(error nil)) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Couldn't find the `fd' binary; project file searches will be slightly slower")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Couldn't find the `fd' binary; project file searches will be slightly slower")) | |
doom-doctor--warnings)))) | |
(require 'projectile) | |
(if | |
(projectile-project-root "~") | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Your $HOME is recognized as a project root")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Your $HOME is recognized as a project root")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Emacs will assume $HOME is the root of any project living under $HOME. If this isn't\n" "desired, you will need to remove \".git\" from `projectile-project-root-files-bottom-up'\n" "(a variable), e.g.\n\n" " (after! projectile\n" " (setq projectile-project-root-files-bottom-up\n" " (remove \".git\" projectile-project-root-files-bottom-up)))"))))))) | |
(if | |
(and | |
(file-equal-p doom-user-dir "~/.config/doom") | |
(file-directory-p "~/.doom.d")) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Both %S and '~/.doom.d' exist on your system") | |
(doom-print--class 'path doom-user-dir))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom will only load one of these (~/.config/doom takes precedence). Possessing\n" "both is rarely intentional; you should one or the other."))))))) | |
(if | |
(not | |
(executable-find "fc-list")) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Warning: unable to detect fonts because fontconfig isn't installed")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Warning: unable to detect fonts because fontconfig isn't installed")) | |
doom-doctor--warnings))) | |
(if | |
(and | |
(cond | |
((eq system-type 'gnu/linux) | |
(let nil | |
(concat | |
(or | |
(getenv "XDG_DATA_HOME") | |
"~/.local/share") | |
"/fonts/"))) | |
((eq system-type 'darwin) | |
(let nil "~/Library/Fonts/"))) | |
(require 'nerd-icons nil t)) | |
(progn | |
(let | |
((temp-buffer | |
(generate-new-buffer " *temp*" t))) | |
(save-current-buffer | |
(set-buffer temp-buffer) | |
(unwind-protect | |
(progn | |
(let | |
((errors 0)) | |
(let* | |
((output | |
(doom-call-process "fc-list" "" "file")) | |
(status | |
(if output | |
(car-safe | |
(prog1 output | |
(setq output | |
(cdr output)))) | |
(signal 'wrong-number-of-arguments | |
(list | |
'(status . output) | |
(length output)))))) | |
(if | |
(not | |
(= 0 status)) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "There was an error running `fc-list'. Is fontconfig installed correctly?"))) | |
(insert | |
(cdr | |
(doom-call-process "fc-list" "" "file"))) | |
(let | |
((tail nerd-icons-font-names)) | |
(while tail | |
(let | |
((font | |
(car tail))) | |
(if | |
(save-excursion | |
(re-search-backward font nil t)) | |
(doom-print | |
(doom-print--format | |
(doom-print--style 'green "Found font %s" font))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "%S font is not installed on your system") | |
font)) | |
(setq errors | |
(1+ errors))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(> errors 0) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Some needed fonts are not properly installed on your system. To download and " "install them, run `M-x nerd-icons-install-fonts' from within Doom Emacs. " "However, on Windows this command will only download them; the fonts must " "be installed manually afterwards."))))))))))) | |
(and | |
(buffer-name temp-buffer) | |
(kill-buffer temp-buffer)))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for stale elc files in your DOOMDIR..."))) | |
(if | |
(file-directory-p doom-user-dir) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(elc-check-dir doom-user-dir))))) | |
(if doom-modules | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking your enabled modules..."))) | |
(advice-add #'require :around #'doom-shut-up-a) | |
(let | |
((tail | |
(doom-module-list))) | |
(while tail | |
(let | |
((x53 | |
(car tail))) | |
(progn | |
(ignore | |
(consp x53)) | |
(let* | |
((x54 | |
(car-safe x53)) | |
(x55 | |
(cdr-safe x53))) | |
(let | |
((group x54) | |
(name x55)) | |
(let | |
((doom-context doom-context)) | |
(let | |
((tail | |
(ensure-list 'doctor))) | |
(while tail | |
(let | |
((context | |
(car tail))) | |
(doom-context-push context) | |
(setq tail | |
(cdr tail))))) | |
(let | |
(doom-local-errors doom-local-warnings) | |
(let | |
(doom-doctor--errors doom-doctor--warnings) | |
(condition-case ex | |
(let | |
((doom-module-context | |
(doom-module-context | |
(cons group name)))) | |
(if doom-inhibit-log nil | |
(doom--log ":context:module: =%s" doom-module-context)) | |
(let | |
((doctor-file | |
(doom-module-expand-path group name "doctor.el")) | |
(packages-file | |
(doom-module-expand-path group name doom-module-packages-file))) | |
(if packages-file | |
(progn | |
(let* | |
((doom-output-indent 6) | |
(--cl-var-- | |
(let | |
((doom-context doom-context)) | |
(let | |
((tail | |
(ensure-list 'packages))) | |
(while tail | |
(let | |
((context | |
(car tail))) | |
(doom-context-push context) | |
(setq tail | |
(cdr tail))))) | |
(let* | |
(doom-packages doom-disabled-packages) | |
(load packages-file 'noerror 'nomessage) | |
(mapcar #'car doom-packages)))) | |
(name nil)) | |
(while | |
(consp --cl-var--) | |
(setq name | |
(car --cl-var--)) | |
(if | |
(or | |
(doom-package-get name :disable) | |
(eval | |
(doom-package-get name :ignore)) | |
(plist-member | |
(doom-package-get name :recipe) | |
:local-repo) | |
(locate-library | |
(symbol-name name)) | |
(doom-package-built-in-p name) | |
(doom-package-installed-p name)) | |
(progn) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Missing emacs package: %S") | |
name))) | |
(setq --cl-var-- | |
(cdr --cl-var--))) | |
nil))) | |
(if doctor-file | |
(progn | |
(let | |
((inhibit-message t)) | |
(load doctor-file 'noerror 'nomessage)))))) | |
((debug file-missing) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "%s" | |
(error-message-string ex))))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "%s" | |
(error-message-string ex))) | |
doom-doctor--errors)))) | |
((debug error) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Syntax error: %s" ex)))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Syntax error: %s" ex)) | |
doom-doctor--errors))))) | |
(if | |
(or doom-doctor--errors doom-doctor--warnings) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start | |
(doom-print--style 'bold "%s %s")) | |
group name)) | |
(doom-print | |
(doom-print--format "%s" | |
(string-join | |
(append doom-doctor--errors doom-doctor--warnings) | |
"\n"))))) | |
(progn | |
(setq doom-local-errors doom-doctor--errors) | |
(setq doom-local-warnings doom-doctor--warnings))))) | |
(setq doom-doctor--errors | |
(append doom-doctor--errors doom-local-errors)) | |
(setq doom-doctor--warnings | |
(append doom-doctor--warnings doom-local-warnings))))))) | |
(setq tail | |
(cdr tail))))))))) | |
((debug error) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Attempt to load DOOM failed\n %s\n" | |
(or | |
(cdr-safe ex) | |
(car ex)))))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Attempt to load DOOM failed\n %s\n" | |
(or | |
(cdr-safe ex) | |
(car ex)))) | |
doom-doctor--warnings))) | |
(setq doom-modules nil))) | |
(terpri) | |
(let | |
((tail | |
(list | |
(list doom-doctor--warnings "warning" 'yellow) | |
(list doom-doctor--errors "error" 'red)))) | |
(while tail | |
(let | |
((msg | |
(car tail))) | |
(if | |
(car msg) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'color | |
(nth 2 msg) | |
(if | |
(cdr | |
(car msg)) | |
"There are %d %ss!" "There is %d %s!") | |
(length | |
(car msg)) | |
(nth 1 msg)))))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(or doom-doctor--errors doom-doctor--warnings) | |
nil | |
(doom-print | |
(doom-print--format | |
(doom-print--style 'green "Everything seems fine, happy Emacs'ing!")))) | |
(exit! :pager? "+G"))))) | |
(prefix . "doom") | |
(seen t) | |
(runners | |
(#s(doom-cli | |
("doom" "doctor") | |
nil | |
(("SUMMARY" . "Diagnoses common issues on your system.") | |
("MAIN" . "The Doom doctor is essentially one big, self-contained elisp shell script that\nuses a series of simple heuristics to diagnose common issues on your system.\nIssues that could intefere with Doom Emacs.\n\nDoom modules may optionally have a doctor.el file to run their own heuristics\nin.")) | |
nil nil nil nil | |
(:benchmark nil :prefix | |
(doom) | |
:group "Diagnostics" :docs "Commands for troubleshooting and debugging Doom." :hide nil) | |
(closure | |
(t) | |
(cli alist) | |
(let nil | |
(doom-print | |
(doom-print--format "The doctor will see you now...\n")) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking your Emacs version..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(cond | |
((or | |
(> emacs-major-version 29) | |
(string-match-p ".\\([56]0\\|9[0-9]\\)$" emacs-version)) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected a development version of Emacs (%s)" emacs-version)))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Detected a development version of Emacs (%s)" emacs-version)) | |
doom-doctor--warnings))) | |
(if | |
(> emacs-major-version 29) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "This is the bleeding edge of Emacs. As it is constantly changed, Doom will not " "(officially) support it. If you've found a stable commit, great! But be " "cautious about updating Emacs too eagerly!\n"))))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "A .50, .60, or .9X appended to the version string indicates that this is a version " "of Emacs in between stable releases. These are not well supported.\n")))))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Because development builds are prone to random breakage, there will be a greater " "burden on you to investigate and deal with issues. Please make extra sure that " "your issue is reproducible in 29.1 before reporting them to Doom's issue tracker!\n" "\n" "If this doesn't phase you, read the \"Why does Doom not support Emacs HEAD\" QnA " "in Doom's FAQ. It offers some advice for debugging and surviving issues on the " "bleeding edge. Failing that, 29.1 is highly recommended and will always be " "Doom's best supported version of Emacs.")))))) | |
((= emacs-major-version 27) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs 27 is supported, but consider upgrading to 28.1")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs 27 is supported, but consider upgrading to 28.1")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Emacs 28.1 is better supported, faster, and more stable. Plus, Doom will drop " "27.x support sometime late-2023."))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for Doom's prerequisites..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(not | |
(executable-find "git")) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find git on your machine! Doom's package manager won't work.")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find git on your machine! Doom's package manager won't work.")) | |
doom-doctor--errors))) | |
(let | |
((saved-match-data | |
(match-data))) | |
(unwind-protect | |
(progn | |
(let* | |
((version | |
(cdr | |
(doom-call-process "git" "version"))) | |
(version | |
(and | |
(string-match "git version \\([0-9]+\\(?:\\.[0-9]+\\)\\{2\\}\\)" version) | |
(match-string 1 version)))) | |
(if version | |
(if | |
(version< version "2.23") | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Git %s detected! Doom requires git 2.23 or newer!" version)))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Git %s detected! Doom requires git 2.23 or newer!" version)) | |
doom-doctor--errors))))) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Cannot determine Git version. Doom requires git 2.23 or newer!")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Cannot determine Git version. Doom requires git 2.23 or newer!")) | |
doom-doctor--warnings)))))) | |
(set-match-data saved-match-data t)))) | |
(if | |
(executable-find "rg") | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `rg' binary; this a hard dependecy for Doom, file searches may not work at all")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `rg' binary; this a hard dependecy for Doom, file searches may not work at all")) | |
doom-doctor--errors)))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for Emacs config conflicts..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(or | |
(file-equal-p doom-emacs-dir "~/.emacs.d") | |
(file-equal-p doom-emacs-dir "~/.config/emacs")) | |
nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Doom is installed in a non-standard location"))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "The standard locations are ~/.config/emacs or ~/.emacs.d. Emacs will fail " "to load Doom if it is not explicitly told where to look for it. In Emacs 29+, " "this is possible with the --init-directory option:\n\n" " $ emacs --init-directory '" | |
(abbreviate-file-name doom-emacs-dir) | |
"'\n\n" "However, Emacs 27-28 users have no choice but to move Doom to a standard " "location.\n\n" "Chemacs users may ignore this warning, however.")))))) | |
(let | |
(found?) | |
(let | |
((tail | |
'("~/_emacs" "~/.emacs" "~/.emacs.el" "~/.emacs.d" "~/.config/emacs"))) | |
(while tail | |
(let | |
((file | |
(car tail))) | |
(if | |
(and | |
(file-exists-p file) | |
(not | |
(file-equal-p file doom-emacs-dir))) | |
(progn | |
(setq found? t) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Found another Emacs config: %s (%s)") | |
file | |
(if | |
(file-directory-p file) | |
"directory" "file"))))) | |
(setq tail | |
(cdr tail))))) | |
(if found? | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Having multiple Emacs configs may prevent Doom from loading properly. Emacs " "will load the first it finds and ignore the rest. If Doom isn't starting up " "correctly (e.g. you get a vanilla splash screen), make sure that only one of " "these exist.\n\n" "Chemacs users may ignore this warning.")))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for missing Emacs features..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(functionp 'json-serialize) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native JSON support")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native JSON support")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Users will see a substantial performance gain by building Emacs with " "jansson support (i.e. a native JSON library), particularly LSP users. " "You must install a prebuilt Emacs binary with this included, or compile " "Emacs with the --with-json option.")))))) | |
(if | |
(featurep 'native-compile) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native compilation support")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native compilation support")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Users will see a substantial performance gain by building Emacs with " "native compilation support, availible in emacs 28+." "You must install a prebuilt Emacs binary with this included, or compile " "Emacs with the --with-native-compilation option.")))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for private config conflicts..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(let* | |
((xdg-dir | |
(concat | |
(or | |
(getenv "XDG_CONFIG_HOME") | |
"~/.config") | |
"/doom/")) | |
(doom-dir | |
(or | |
(getenv "DOOMDIR") | |
"~/.doom.d/")) | |
(dir | |
(if | |
(file-directory-p xdg-dir) | |
xdg-dir doom-dir))) | |
(if | |
(file-equal-p dir doom-emacs-dir) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Doom was cloned to %S, not ~/.emacs.d or ~/.config/emacs" | |
(doom-print--class 'path dir)))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom's source and your private Doom config have to live in separate directories. " "Putting them in the same directory (without changing the DOOMDIR environment " "variable) will cause errors on startup."))))))) | |
(if | |
(and | |
(not | |
(file-equal-p xdg-dir doom-dir)) | |
(file-directory-p xdg-dir) | |
(file-directory-p doom-dir)) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected two private configs, in %s and %s") | |
(abbreviate-file-name xdg-dir) | |
doom-dir)) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "The second directory will be ignored, as it has lower precedence.")))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for common environmental issues..."))) | |
(if | |
(string-match-p "/fish$" shell-file-name) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected Fish as your $SHELL"))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Fish (and possibly other non-POSIX shells) is known to inject garbage " "output into some of the child processes that Emacs spawns. Many Emacs " "packages/utilities will choke on this output, causing unpredictable issues. " "To get around this, either:\n\n" " - Add the following to $DOOMDIR/config.el:\n\n" " (setq shell-file-name (executable-find \"bash\"))\n\n" " - Or change your default shell to a POSIX shell (like bash or zsh) " " and explicitly configure your terminal apps to use the shell you " " want.\n\n" "If you opt for option 1 and use one of Emacs' terminal emulators, you " "will also need to configure them to use Fish, e.g.\n\n" " (setq-default vterm-shell (executable-find \"fish\"))\n\n" " (setq-default explicit-shell-file-name (executable-find \"fish\"))\n"))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for stale elc files..."))) | |
(elc-check-dir doom-core-dir) | |
(elc-check-dir doom-modules-dir) | |
(elc-check-dir | |
(doom-path doom-local-dir "straight" straight-build-dir)) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for problematic git global settings..."))) | |
(if | |
(executable-find "git") | |
(if | |
(= 0 | |
(car | |
(doom-call-process "git" "config" "--global" "--get-regexp" "^url\\.git://github\\.com"))) | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected insteadOf rules in your global gitconfig.")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Detected insteadOf rules in your global gitconfig.")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom's package manager heavily relies on git. In particular, many of its packages " "are hosted on github. Rewrite rules like these will break it:\n\n" " [url \"git://github.com\"]\n" " insteadOf = https://github.com\n\n" "Please remove them from your gitconfig or use a conditional includeIf rule to " "only apply your rewrites to specific repositories. See " "'https://git-scm.com/docs/git-config#_includes' for more information."))))))) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `git' binary; this a hard dependecy for Doom!")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `git' binary; this a hard dependecy for Doom!")) | |
doom-doctor--errors)))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking Doom Emacs..."))) | |
(condition-case ex | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(require 'doom-start) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'success "Initialized Doom Emacs %s") | |
doom-version)) | |
(doom-print | |
(doom-print--format | |
(if | |
(hash-table-p doom-modules) | |
(doom-print--class 'success "Detected %d modules" | |
(hash-table-count doom-modules)) | |
(doom-print--class 'warn "Failed to load any modules. Do you have an private init.el?")))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'success "Detected %d packages") | |
(length doom-packages))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking Doom core for irregularities..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(let | |
((tail | |
(list "savehist" "projectile.cache"))) | |
(while tail | |
(let | |
((file | |
(car tail))) | |
(let* | |
((size | |
(and t | |
(condition-case nil | |
(progn | |
(doom-file-size file doom-cache-dir)) | |
(error nil))))) | |
(if size | |
(if | |
(> size 1048576) | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "%s is too large (%.02fmb). This may cause freezes or odd startup delays" file | |
(/ size 1024 1024.0))))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "%s is too large (%.02fmb). This may cause freezes or odd startup delays" file | |
(/ size 1024 1024.0))) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Consider deleting it from your system (manually)"))))))) | |
nil)) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(condition-case nil | |
(progn | |
(executable-find doom-projectile-fd-binary)) | |
(error nil)) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Couldn't find the `fd' binary; project file searches will be slightly slower")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Couldn't find the `fd' binary; project file searches will be slightly slower")) | |
doom-doctor--warnings)))) | |
(require 'projectile) | |
(if | |
(projectile-project-root "~") | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Your $HOME is recognized as a project root")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Your $HOME is recognized as a project root")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Emacs will assume $HOME is the root of any project living under $HOME. If this isn't\n" "desired, you will need to remove \".git\" from `projectile-project-root-files-bottom-up'\n" "(a variable), e.g.\n\n" " (after! projectile\n" " (setq projectile-project-root-files-bottom-up\n" " (remove \".git\" projectile-project-root-files-bottom-up)))"))))))) | |
(if | |
(and | |
(file-equal-p doom-user-dir "~/.config/doom") | |
(file-directory-p "~/.doom.d")) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Both %S and '~/.doom.d' exist on your system") | |
(doom-print--class 'path doom-user-dir))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom will only load one of these (~/.config/doom takes precedence). Possessing\n" "both is rarely intentional; you should one or the other."))))))) | |
(if | |
(not | |
(executable-find "fc-list")) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Warning: unable to detect fonts because fontconfig isn't installed")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Warning: unable to detect fonts because fontconfig isn't installed")) | |
doom-doctor--warnings))) | |
(if | |
(and | |
(cond | |
((eq system-type 'gnu/linux) | |
(let nil | |
(concat | |
(or | |
(getenv "XDG_DATA_HOME") | |
"~/.local/share") | |
"/fonts/"))) | |
((eq system-type 'darwin) | |
(let nil "~/Library/Fonts/"))) | |
(require 'nerd-icons nil t)) | |
(progn | |
(let | |
((temp-buffer | |
(generate-new-buffer " *temp*" t))) | |
(save-current-buffer | |
(set-buffer temp-buffer) | |
(unwind-protect | |
(progn | |
(let | |
((errors 0)) | |
(let* | |
((output | |
(doom-call-process "fc-list" "" "file")) | |
(status | |
(if output | |
(car-safe | |
(prog1 output | |
(setq output | |
(cdr output)))) | |
(signal 'wrong-number-of-arguments | |
(list | |
'(status . output) | |
(length output)))))) | |
(if | |
(not | |
(= 0 status)) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "There was an error running `fc-list'. Is fontconfig installed correctly?"))) | |
(insert | |
(cdr | |
(doom-call-process "fc-list" "" "file"))) | |
(let | |
((tail nerd-icons-font-names)) | |
(while tail | |
(let | |
((font | |
(car tail))) | |
(if | |
(save-excursion | |
(re-search-backward font nil t)) | |
(doom-print | |
(doom-print--format | |
(doom-print--style 'green "Found font %s" font))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "%S font is not installed on your system") | |
font)) | |
(setq errors | |
(1+ errors))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(> errors 0) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Some needed fonts are not properly installed on your system. To download and " "install them, run `M-x nerd-icons-install-fonts' from within Doom Emacs. " "However, on Windows this command will only download them; the fonts must " "be installed manually afterwards."))))))))))) | |
(and | |
(buffer-name temp-buffer) | |
(kill-buffer temp-buffer)))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for stale elc files in your DOOMDIR..."))) | |
(if | |
(file-directory-p doom-user-dir) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(elc-check-dir doom-user-dir))))) | |
(if doom-modules | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking your enabled modules..."))) | |
(advice-add #'require :around #'doom-shut-up-a) | |
(let | |
((tail | |
(doom-module-list))) | |
(while tail | |
(let | |
((x53 | |
(car tail))) | |
(progn | |
(ignore | |
(consp x53)) | |
(let* | |
((x54 | |
(car-safe x53)) | |
(x55 | |
(cdr-safe x53))) | |
(let | |
((group x54) | |
(name x55)) | |
(let | |
((doom-context doom-context)) | |
(let | |
((tail | |
(ensure-list 'doctor))) | |
(while tail | |
(let | |
((context | |
(car tail))) | |
(doom-context-push context) | |
(setq tail | |
(cdr tail))))) | |
(let | |
(doom-local-errors doom-local-warnings) | |
(let | |
(doom-doctor--errors doom-doctor--warnings) | |
(condition-case ex | |
(let | |
((doom-module-context | |
(doom-module-context | |
(cons group name)))) | |
(if doom-inhibit-log nil | |
(doom--log ":context:module: =%s" doom-module-context)) | |
(let | |
((doctor-file | |
(doom-module-expand-path group name "doctor.el")) | |
(packages-file | |
(doom-module-expand-path group name doom-module-packages-file))) | |
(if packages-file | |
(progn | |
(let* | |
((doom-output-indent 6) | |
(--cl-var-- | |
(let | |
((doom-context doom-context)) | |
(let | |
((tail | |
(ensure-list 'packages))) | |
(while tail | |
(let | |
((context | |
(car tail))) | |
(doom-context-push context) | |
(setq tail | |
(cdr tail))))) | |
(let* | |
(doom-packages doom-disabled-packages) | |
(load packages-file 'noerror 'nomessage) | |
(mapcar #'car doom-packages)))) | |
(name nil)) | |
(while | |
(consp --cl-var--) | |
(setq name | |
(car --cl-var--)) | |
(if | |
(or | |
(doom-package-get name :disable) | |
(eval | |
(doom-package-get name :ignore)) | |
(plist-member | |
(doom-package-get name :recipe) | |
:local-repo) | |
(locate-library | |
(symbol-name name)) | |
(doom-package-built-in-p name) | |
(doom-package-installed-p name)) | |
(progn) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Missing emacs package: %S") | |
name))) | |
(setq --cl-var-- | |
(cdr --cl-var--))) | |
nil))) | |
(if doctor-file | |
(progn | |
(let | |
((inhibit-message t)) | |
(load doctor-file 'noerror 'nomessage)))))) | |
((debug file-missing) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "%s" | |
(error-message-string ex))))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "%s" | |
(error-message-string ex))) | |
doom-doctor--errors)))) | |
((debug error) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Syntax error: %s" ex)))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Syntax error: %s" ex)) | |
doom-doctor--errors))))) | |
(if | |
(or doom-doctor--errors doom-doctor--warnings) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start | |
(doom-print--style 'bold "%s %s")) | |
group name)) | |
(doom-print | |
(doom-print--format "%s" | |
(string-join | |
(append doom-doctor--errors doom-doctor--warnings) | |
"\n"))))) | |
(progn | |
(setq doom-local-errors doom-doctor--errors) | |
(setq doom-local-warnings doom-doctor--warnings))))) | |
(setq doom-doctor--errors | |
(append doom-doctor--errors doom-local-errors)) | |
(setq doom-doctor--warnings | |
(append doom-doctor--warnings doom-local-warnings))))))) | |
(setq tail | |
(cdr tail))))))))) | |
((debug error) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Attempt to load DOOM failed\n %s\n" | |
(or | |
(cdr-safe ex) | |
(car ex)))))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Attempt to load DOOM failed\n %s\n" | |
(or | |
(cdr-safe ex) | |
(car ex)))) | |
doom-doctor--warnings))) | |
(setq doom-modules nil))) | |
(terpri) | |
(let | |
((tail | |
(list | |
(list doom-doctor--warnings "warning" 'yellow) | |
(list doom-doctor--errors "error" 'red)))) | |
(while tail | |
(let | |
((msg | |
(car tail))) | |
(if | |
(car msg) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'color | |
(nth 2 msg) | |
(if | |
(cdr | |
(car msg)) | |
"There are %d %ss!" "There is %d %s!") | |
(length | |
(car msg)) | |
(nth 1 msg)))))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(or doom-doctor--errors doom-doctor--warnings) | |
nil | |
(doom-print | |
(doom-print--format | |
(doom-print--style 'green "Everything seems fine, happy Emacs'ing!")))) | |
(exit! :pager? "+G")))))) | |
(tail | |
(#s(doom-cli | |
("doom" "doctor") | |
nil | |
(("SUMMARY" . "Diagnoses common issues on your system.") | |
("MAIN" . "The Doom doctor is essentially one big, self-contained elisp shell script that\nuses a series of simple heuristics to diagnose common issues on your system.\nIssues that could intefere with Doom Emacs.\n\nDoom modules may optionally have a doctor.el file to run their own heuristics\nin.")) | |
nil nil nil nil | |
(:benchmark nil :prefix | |
(doom) | |
:group "Diagnostics" :docs "Commands for troubleshooting and debugging Doom." :hide nil) | |
(closure | |
(t) | |
(cli alist) | |
(let nil | |
(doom-print | |
(doom-print--format "The doctor will see you now...\n")) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking your Emacs version..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(cond | |
((or | |
(> emacs-major-version 29) | |
(string-match-p ".\\([56]0\\|9[0-9]\\)$" emacs-version)) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected a development version of Emacs (%s)" emacs-version)))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Detected a development version of Emacs (%s)" emacs-version)) | |
doom-doctor--warnings))) | |
(if | |
(> emacs-major-version 29) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "This is the bleeding edge of Emacs. As it is constantly changed, Doom will not " "(officially) support it. If you've found a stable commit, great! But be " "cautious about updating Emacs too eagerly!\n"))))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "A .50, .60, or .9X appended to the version string indicates that this is a version " "of Emacs in between stable releases. These are not well supported.\n")))))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Because development builds are prone to random breakage, there will be a greater " "burden on you to investigate and deal with issues. Please make extra sure that " "your issue is reproducible in 29.1 before reporting them to Doom's issue tracker!\n" "\n" "If this doesn't phase you, read the \"Why does Doom not support Emacs HEAD\" QnA " "in Doom's FAQ. It offers some advice for debugging and surviving issues on the " "bleeding edge. Failing that, 29.1 is highly recommended and will always be " "Doom's best supported version of Emacs.")))))) | |
((= emacs-major-version 27) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs 27 is supported, but consider upgrading to 28.1")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs 27 is supported, but consider upgrading to 28.1")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Emacs 28.1 is better supported, faster, and more stable. Plus, Doom will drop " "27.x support sometime late-2023."))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for Doom's prerequisites..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(not | |
(executable-find "git")) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find git on your machine! Doom's package manager won't work.")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find git on your machine! Doom's package manager won't work.")) | |
doom-doctor--errors))) | |
(let | |
((saved-match-data | |
(match-data))) | |
(unwind-protect | |
(progn | |
(let* | |
((version | |
(cdr | |
(doom-call-process "git" "version"))) | |
(version | |
(and | |
(string-match "git version \\([0-9]+\\(?:\\.[0-9]+\\)\\{2\\}\\)" version) | |
(match-string 1 version)))) | |
(if version | |
(if | |
(version< version "2.23") | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Git %s detected! Doom requires git 2.23 or newer!" version)))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Git %s detected! Doom requires git 2.23 or newer!" version)) | |
doom-doctor--errors))))) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Cannot determine Git version. Doom requires git 2.23 or newer!")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Cannot determine Git version. Doom requires git 2.23 or newer!")) | |
doom-doctor--warnings)))))) | |
(set-match-data saved-match-data t)))) | |
(if | |
(executable-find "rg") | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `rg' binary; this a hard dependecy for Doom, file searches may not work at all")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `rg' binary; this a hard dependecy for Doom, file searches may not work at all")) | |
doom-doctor--errors)))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for Emacs config conflicts..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(or | |
(file-equal-p doom-emacs-dir "~/.emacs.d") | |
(file-equal-p doom-emacs-dir "~/.config/emacs")) | |
nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Doom is installed in a non-standard location"))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "The standard locations are ~/.config/emacs or ~/.emacs.d. Emacs will fail " "to load Doom if it is not explicitly told where to look for it. In Emacs 29+, " "this is possible with the --init-directory option:\n\n" " $ emacs --init-directory '" | |
(abbreviate-file-name doom-emacs-dir) | |
"'\n\n" "However, Emacs 27-28 users have no choice but to move Doom to a standard " "location.\n\n" "Chemacs users may ignore this warning, however.")))))) | |
(let | |
(found?) | |
(let | |
((tail | |
'("~/_emacs" "~/.emacs" "~/.emacs.el" "~/.emacs.d" "~/.config/emacs"))) | |
(while tail | |
(let | |
((file | |
(car tail))) | |
(if | |
(and | |
(file-exists-p file) | |
(not | |
(file-equal-p file doom-emacs-dir))) | |
(progn | |
(setq found? t) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Found another Emacs config: %s (%s)") | |
file | |
(if | |
(file-directory-p file) | |
"directory" "file"))))) | |
(setq tail | |
(cdr tail))))) | |
(if found? | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Having multiple Emacs configs may prevent Doom from loading properly. Emacs " "will load the first it finds and ignore the rest. If Doom isn't starting up " "correctly (e.g. you get a vanilla splash screen), make sure that only one of " "these exist.\n\n" "Chemacs users may ignore this warning.")))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for missing Emacs features..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(functionp 'json-serialize) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native JSON support")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native JSON support")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Users will see a substantial performance gain by building Emacs with " "jansson support (i.e. a native JSON library), particularly LSP users. " "You must install a prebuilt Emacs binary with this included, or compile " "Emacs with the --with-json option.")))))) | |
(if | |
(featurep 'native-compile) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native compilation support")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native compilation support")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Users will see a substantial performance gain by building Emacs with " "native compilation support, availible in emacs 28+." "You must install a prebuilt Emacs binary with this included, or compile " "Emacs with the --with-native-compilation option.")))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for private config conflicts..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(let* | |
((xdg-dir | |
(concat | |
(or | |
(getenv "XDG_CONFIG_HOME") | |
"~/.config") | |
"/doom/")) | |
(doom-dir | |
(or | |
(getenv "DOOMDIR") | |
"~/.doom.d/")) | |
(dir | |
(if | |
(file-directory-p xdg-dir) | |
xdg-dir doom-dir))) | |
(if | |
(file-equal-p dir doom-emacs-dir) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Doom was cloned to %S, not ~/.emacs.d or ~/.config/emacs" | |
(doom-print--class 'path dir)))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom's source and your private Doom config have to live in separate directories. " "Putting them in the same directory (without changing the DOOMDIR environment " "variable) will cause errors on startup."))))))) | |
(if | |
(and | |
(not | |
(file-equal-p xdg-dir doom-dir)) | |
(file-directory-p xdg-dir) | |
(file-directory-p doom-dir)) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected two private configs, in %s and %s") | |
(abbreviate-file-name xdg-dir) | |
doom-dir)) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "The second directory will be ignored, as it has lower precedence.")))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for common environmental issues..."))) | |
(if | |
(string-match-p "/fish$" shell-file-name) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected Fish as your $SHELL"))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Fish (and possibly other non-POSIX shells) is known to inject garbage " "output into some of the child processes that Emacs spawns. Many Emacs " "packages/utilities will choke on this output, causing unpredictable issues. " "To get around this, either:\n\n" " - Add the following to $DOOMDIR/config.el:\n\n" " (setq shell-file-name (executable-find \"bash\"))\n\n" " - Or change your default shell to a POSIX shell (like bash or zsh) " " and explicitly configure your terminal apps to use the shell you " " want.\n\n" "If you opt for option 1 and use one of Emacs' terminal emulators, you " "will also need to configure them to use Fish, e.g.\n\n" " (setq-default vterm-shell (executable-find \"fish\"))\n\n" " (setq-default explicit-shell-file-name (executable-find \"fish\"))\n"))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for stale elc files..."))) | |
(elc-check-dir doom-core-dir) | |
(elc-check-dir doom-modules-dir) | |
(elc-check-dir | |
(doom-path doom-local-dir "straight" straight-build-dir)) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for problematic git global settings..."))) | |
(if | |
(executable-find "git") | |
(if | |
(= 0 | |
(car | |
(doom-call-process "git" "config" "--global" "--get-regexp" "^url\\.git://github\\.com"))) | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected insteadOf rules in your global gitconfig.")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Detected insteadOf rules in your global gitconfig.")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom's package manager heavily relies on git. In particular, many of its packages " "are hosted on github. Rewrite rules like these will break it:\n\n" " [url \"git://github.com\"]\n" " insteadOf = https://github.com\n\n" "Please remove them from your gitconfig or use a conditional includeIf rule to " "only apply your rewrites to specific repositories. See " "'https://git-scm.com/docs/git-config#_includes' for more information."))))))) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `git' binary; this a hard dependecy for Doom!")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `git' binary; this a hard dependecy for Doom!")) | |
doom-doctor--errors)))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking Doom Emacs..."))) | |
(condition-case ex | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(require 'doom-start) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'success "Initialized Doom Emacs %s") | |
doom-version)) | |
(doom-print | |
(doom-print--format | |
(if | |
(hash-table-p doom-modules) | |
(doom-print--class 'success "Detected %d modules" | |
(hash-table-count doom-modules)) | |
(doom-print--class 'warn "Failed to load any modules. Do you have an private init.el?")))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'success "Detected %d packages") | |
(length doom-packages))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking Doom core for irregularities..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(let | |
((tail | |
(list "savehist" "projectile.cache"))) | |
(while tail | |
(let | |
((file | |
(car tail))) | |
(let* | |
((size | |
(and t | |
(condition-case nil | |
(progn | |
(doom-file-size file doom-cache-dir)) | |
(error nil))))) | |
(if size | |
(if | |
(> size 1048576) | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "%s is too large (%.02fmb). This may cause freezes or odd startup delays" file | |
(/ size 1024 1024.0))))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "%s is too large (%.02fmb). This may cause freezes or odd startup delays" file | |
(/ size 1024 1024.0))) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Consider deleting it from your system (manually)"))))))) | |
nil)) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(condition-case nil | |
(progn | |
(executable-find doom-projectile-fd-binary)) | |
(error nil)) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Couldn't find the `fd' binary; project file searches will be slightly slower")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Couldn't find the `fd' binary; project file searches will be slightly slower")) | |
doom-doctor--warnings)))) | |
(require 'projectile) | |
(if | |
(projectile-project-root "~") | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Your $HOME is recognized as a project root")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Your $HOME is recognized as a project root")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Emacs will assume $HOME is the root of any project living under $HOME. If this isn't\n" "desired, you will need to remove \".git\" from `projectile-project-root-files-bottom-up'\n" "(a variable), e.g.\n\n" " (after! projectile\n" " (setq projectile-project-root-files-bottom-up\n" " (remove \".git\" projectile-project-root-files-bottom-up)))"))))))) | |
(if | |
(and | |
(file-equal-p doom-user-dir "~/.config/doom") | |
(file-directory-p "~/.doom.d")) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Both %S and '~/.doom.d' exist on your system") | |
(doom-print--class 'path doom-user-dir))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom will only load one of these (~/.config/doom takes precedence). Possessing\n" "both is rarely intentional; you should one or the other."))))))) | |
(if | |
(not | |
(executable-find "fc-list")) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Warning: unable to detect fonts because fontconfig isn't installed")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Warning: unable to detect fonts because fontconfig isn't installed")) | |
doom-doctor--warnings))) | |
(if | |
(and | |
(cond | |
((eq system-type 'gnu/linux) | |
(let nil | |
(concat | |
(or | |
(getenv "XDG_DATA_HOME") | |
"~/.local/share") | |
"/fonts/"))) | |
((eq system-type 'darwin) | |
(let nil "~/Library/Fonts/"))) | |
(require 'nerd-icons nil t)) | |
(progn | |
(let | |
((temp-buffer | |
(generate-new-buffer " *temp*" t))) | |
(save-current-buffer | |
(set-buffer temp-buffer) | |
(unwind-protect | |
(progn | |
(let | |
((errors 0)) | |
(let* | |
((output | |
(doom-call-process "fc-list" "" "file")) | |
(status | |
(if output | |
(car-safe | |
(prog1 output | |
(setq output | |
(cdr output)))) | |
(signal 'wrong-number-of-arguments | |
(list | |
'(status . output) | |
(length output)))))) | |
(if | |
(not | |
(= 0 status)) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "There was an error running `fc-list'. Is fontconfig installed correctly?"))) | |
(insert | |
(cdr | |
(doom-call-process "fc-list" "" "file"))) | |
(let | |
((tail nerd-icons-font-names)) | |
(while tail | |
(let | |
((font | |
(car tail))) | |
(if | |
(save-excursion | |
(re-search-backward font nil t)) | |
(doom-print | |
(doom-print--format | |
(doom-print--style 'green "Found font %s" font))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "%S font is not installed on your system") | |
font)) | |
(setq errors | |
(1+ errors))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(> errors 0) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Some needed fonts are not properly installed on your system. To download and " "install them, run `M-x nerd-icons-install-fonts' from within Doom Emacs. " "However, on Windows this command will only download them; the fonts must " "be installed manually afterwards."))))))))))) | |
(and | |
(buffer-name temp-buffer) | |
(kill-buffer temp-buffer)))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for stale elc files in your DOOMDIR..."))) | |
(if | |
(file-directory-p doom-user-dir) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(elc-check-dir doom-user-dir))))) | |
(if doom-modules | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking your enabled modules..."))) | |
(advice-add #'require :around #'doom-shut-up-a) | |
(let | |
((tail | |
(doom-module-list))) | |
(while tail | |
(let | |
((x53 | |
(car tail))) | |
(progn | |
(ignore | |
(consp x53)) | |
(let* | |
((x54 | |
(car-safe x53)) | |
(x55 | |
(cdr-safe x53))) | |
(let | |
((group x54) | |
(name x55)) | |
(let | |
((doom-context doom-context)) | |
(let | |
((tail | |
(ensure-list 'doctor))) | |
(while tail | |
(let | |
((context | |
(car tail))) | |
(doom-context-push context) | |
(setq tail | |
(cdr tail))))) | |
(let | |
(doom-local-errors doom-local-warnings) | |
(let | |
(doom-doctor--errors doom-doctor--warnings) | |
(condition-case ex | |
(let | |
((doom-module-context | |
(doom-module-context | |
(cons group name)))) | |
(if doom-inhibit-log nil | |
(doom--log ":context:module: =%s" doom-module-context)) | |
(let | |
((doctor-file | |
(doom-module-expand-path group name "doctor.el")) | |
(packages-file | |
(doom-module-expand-path group name doom-module-packages-file))) | |
(if packages-file | |
(progn | |
(let* | |
((doom-output-indent 6) | |
(--cl-var-- | |
(let | |
((doom-context doom-context)) | |
(let | |
((tail | |
(ensure-list 'packages))) | |
(while tail | |
(let | |
((context | |
(car tail))) | |
(doom-context-push context) | |
(setq tail | |
(cdr tail))))) | |
(let* | |
(doom-packages doom-disabled-packages) | |
(load packages-file 'noerror 'nomessage) | |
(mapcar #'car doom-packages)))) | |
(name nil)) | |
(while | |
(consp --cl-var--) | |
(setq name | |
(car --cl-var--)) | |
(if | |
(or | |
(doom-package-get name :disable) | |
(eval | |
(doom-package-get name :ignore)) | |
(plist-member | |
(doom-package-get name :recipe) | |
:local-repo) | |
(locate-library | |
(symbol-name name)) | |
(doom-package-built-in-p name) | |
(doom-package-installed-p name)) | |
(progn) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Missing emacs package: %S") | |
name))) | |
(setq --cl-var-- | |
(cdr --cl-var--))) | |
nil))) | |
(if doctor-file | |
(progn | |
(let | |
((inhibit-message t)) | |
(load doctor-file 'noerror 'nomessage)))))) | |
((debug file-missing) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "%s" | |
(error-message-string ex))))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "%s" | |
(error-message-string ex))) | |
doom-doctor--errors)))) | |
((debug error) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Syntax error: %s" ex)))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Syntax error: %s" ex)) | |
doom-doctor--errors))))) | |
(if | |
(or doom-doctor--errors doom-doctor--warnings) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start | |
(doom-print--style 'bold "%s %s")) | |
group name)) | |
(doom-print | |
(doom-print--format "%s" | |
(string-join | |
(append doom-doctor--errors doom-doctor--warnings) | |
"\n"))))) | |
(progn | |
(setq doom-local-errors doom-doctor--errors) | |
(setq doom-local-warnings doom-doctor--warnings))))) | |
(setq doom-doctor--errors | |
(append doom-doctor--errors doom-local-errors)) | |
(setq doom-doctor--warnings | |
(append doom-doctor--warnings doom-local-warnings))))))) | |
(setq tail | |
(cdr tail))))))))) | |
((debug error) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Attempt to load DOOM failed\n %s\n" | |
(or | |
(cdr-safe ex) | |
(car ex)))))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Attempt to load DOOM failed\n %s\n" | |
(or | |
(cdr-safe ex) | |
(car ex)))) | |
doom-doctor--warnings))) | |
(setq doom-modules nil))) | |
(terpri) | |
(let | |
((tail | |
(list | |
(list doom-doctor--warnings "warning" 'yellow) | |
(list doom-doctor--errors "error" 'red)))) | |
(while tail | |
(let | |
((msg | |
(car tail))) | |
(if | |
(car msg) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'color | |
(nth 2 msg) | |
(if | |
(cdr | |
(car msg)) | |
"There are %d %ss!" "There is %d %s!") | |
(length | |
(car msg)) | |
(nth 1 msg)))))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(or doom-doctor--errors doom-doctor--warnings) | |
nil | |
(doom-print | |
(doom-print--format | |
(doom-print--style 'green "Everything seems fine, happy Emacs'ing!")))) | |
(exit! :pager? "+G")))))) | |
(x15 #s(doom-cli | |
("doom" "doctor") | |
nil | |
(("SUMMARY" . "Diagnoses common issues on your system.") | |
("MAIN" . "The Doom doctor is essentially one big, self-contained elisp shell script that\nuses a series of simple heuristics to diagnose common issues on your system.\nIssues that could intefere with Doom Emacs.\n\nDoom modules may optionally have a doctor.el file to run their own heuristics\nin.")) | |
nil nil nil nil | |
(:benchmark nil :prefix | |
(doom) | |
:group "Diagnostics" :docs "Commands for troubleshooting and debugging Doom." :hide nil) | |
(closure | |
(t) | |
(cli alist) | |
(let nil | |
(doom-print | |
(doom-print--format "The doctor will see you now...\n")) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking your Emacs version..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(cond | |
((or | |
(> emacs-major-version 29) | |
(string-match-p ".\\([56]0\\|9[0-9]\\)$" emacs-version)) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected a development version of Emacs (%s)" emacs-version)))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Detected a development version of Emacs (%s)" emacs-version)) | |
doom-doctor--warnings))) | |
(if | |
(> emacs-major-version 29) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "This is the bleeding edge of Emacs. As it is constantly changed, Doom will not " "(officially) support it. If you've found a stable commit, great! But be " "cautious about updating Emacs too eagerly!\n"))))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "A .50, .60, or .9X appended to the version string indicates that this is a version " "of Emacs in between stable releases. These are not well supported.\n")))))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Because development builds are prone to random breakage, there will be a greater " "burden on you to investigate and deal with issues. Please make extra sure that " "your issue is reproducible in 29.1 before reporting them to Doom's issue tracker!\n" "\n" "If this doesn't phase you, read the \"Why does Doom not support Emacs HEAD\" QnA " "in Doom's FAQ. It offers some advice for debugging and surviving issues on the " "bleeding edge. Failing that, 29.1 is highly recommended and will always be " "Doom's best supported version of Emacs.")))))) | |
((= emacs-major-version 27) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs 27 is supported, but consider upgrading to 28.1")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs 27 is supported, but consider upgrading to 28.1")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Emacs 28.1 is better supported, faster, and more stable. Plus, Doom will drop " "27.x support sometime late-2023."))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for Doom's prerequisites..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(not | |
(executable-find "git")) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find git on your machine! Doom's package manager won't work.")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find git on your machine! Doom's package manager won't work.")) | |
doom-doctor--errors))) | |
(let | |
((saved-match-data | |
(match-data))) | |
(unwind-protect | |
(progn | |
(let* | |
((version | |
(cdr | |
(doom-call-process "git" "version"))) | |
(version | |
(and | |
(string-match "git version \\([0-9]+\\(?:\\.[0-9]+\\)\\{2\\}\\)" version) | |
(match-string 1 version)))) | |
(if version | |
(if | |
(version< version "2.23") | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Git %s detected! Doom requires git 2.23 or newer!" version)))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Git %s detected! Doom requires git 2.23 or newer!" version)) | |
doom-doctor--errors))))) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Cannot determine Git version. Doom requires git 2.23 or newer!")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Cannot determine Git version. Doom requires git 2.23 or newer!")) | |
doom-doctor--warnings)))))) | |
(set-match-data saved-match-data t)))) | |
(if | |
(executable-find "rg") | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `rg' binary; this a hard dependecy for Doom, file searches may not work at all")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `rg' binary; this a hard dependecy for Doom, file searches may not work at all")) | |
doom-doctor--errors)))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for Emacs config conflicts..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(or | |
(file-equal-p doom-emacs-dir "~/.emacs.d") | |
(file-equal-p doom-emacs-dir "~/.config/emacs")) | |
nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Doom is installed in a non-standard location"))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "The standard locations are ~/.config/emacs or ~/.emacs.d. Emacs will fail " "to load Doom if it is not explicitly told where to look for it. In Emacs 29+, " "this is possible with the --init-directory option:\n\n" " $ emacs --init-directory '" | |
(abbreviate-file-name doom-emacs-dir) | |
"'\n\n" "However, Emacs 27-28 users have no choice but to move Doom to a standard " "location.\n\n" "Chemacs users may ignore this warning, however.")))))) | |
(let | |
(found?) | |
(let | |
((tail | |
'("~/_emacs" "~/.emacs" "~/.emacs.el" "~/.emacs.d" "~/.config/emacs"))) | |
(while tail | |
(let | |
((file | |
(car tail))) | |
(if | |
(and | |
(file-exists-p file) | |
(not | |
(file-equal-p file doom-emacs-dir))) | |
(progn | |
(setq found? t) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Found another Emacs config: %s (%s)") | |
file | |
(if | |
(file-directory-p file) | |
"directory" "file"))))) | |
(setq tail | |
(cdr tail))))) | |
(if found? | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Having multiple Emacs configs may prevent Doom from loading properly. Emacs " "will load the first it finds and ignore the rest. If Doom isn't starting up " "correctly (e.g. you get a vanilla splash screen), make sure that only one of " "these exist.\n\n" "Chemacs users may ignore this warning.")))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for missing Emacs features..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(functionp 'json-serialize) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native JSON support")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native JSON support")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Users will see a substantial performance gain by building Emacs with " "jansson support (i.e. a native JSON library), particularly LSP users. " "You must install a prebuilt Emacs binary with this included, or compile " "Emacs with the --with-json option.")))))) | |
(if | |
(featurep 'native-compile) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native compilation support")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native compilation support")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Users will see a substantial performance gain by building Emacs with " "native compilation support, availible in emacs 28+." "You must install a prebuilt Emacs binary with this included, or compile " "Emacs with the --with-native-compilation option.")))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for private config conflicts..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(let* | |
((xdg-dir | |
(concat | |
(or | |
(getenv "XDG_CONFIG_HOME") | |
"~/.config") | |
"/doom/")) | |
(doom-dir | |
(or | |
(getenv "DOOMDIR") | |
"~/.doom.d/")) | |
(dir | |
(if | |
(file-directory-p xdg-dir) | |
xdg-dir doom-dir))) | |
(if | |
(file-equal-p dir doom-emacs-dir) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Doom was cloned to %S, not ~/.emacs.d or ~/.config/emacs" | |
(doom-print--class 'path dir)))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom's source and your private Doom config have to live in separate directories. " "Putting them in the same directory (without changing the DOOMDIR environment " "variable) will cause errors on startup."))))))) | |
(if | |
(and | |
(not | |
(file-equal-p xdg-dir doom-dir)) | |
(file-directory-p xdg-dir) | |
(file-directory-p doom-dir)) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected two private configs, in %s and %s") | |
(abbreviate-file-name xdg-dir) | |
doom-dir)) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "The second directory will be ignored, as it has lower precedence.")))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for common environmental issues..."))) | |
(if | |
(string-match-p "/fish$" shell-file-name) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected Fish as your $SHELL"))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Fish (and possibly other non-POSIX shells) is known to inject garbage " "output into some of the child processes that Emacs spawns. Many Emacs " "packages/utilities will choke on this output, causing unpredictable issues. " "To get around this, either:\n\n" " - Add the following to $DOOMDIR/config.el:\n\n" " (setq shell-file-name (executable-find \"bash\"))\n\n" " - Or change your default shell to a POSIX shell (like bash or zsh) " " and explicitly configure your terminal apps to use the shell you " " want.\n\n" "If you opt for option 1 and use one of Emacs' terminal emulators, you " "will also need to configure them to use Fish, e.g.\n\n" " (setq-default vterm-shell (executable-find \"fish\"))\n\n" " (setq-default explicit-shell-file-name (executable-find \"fish\"))\n"))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for stale elc files..."))) | |
(elc-check-dir doom-core-dir) | |
(elc-check-dir doom-modules-dir) | |
(elc-check-dir | |
(doom-path doom-local-dir "straight" straight-build-dir)) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for problematic git global settings..."))) | |
(if | |
(executable-find "git") | |
(if | |
(= 0 | |
(car | |
(doom-call-process "git" "config" "--global" "--get-regexp" "^url\\.git://github\\.com"))) | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected insteadOf rules in your global gitconfig.")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Detected insteadOf rules in your global gitconfig.")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom's package manager heavily relies on git. In particular, many of its packages " "are hosted on github. Rewrite rules like these will break it:\n\n" " [url \"git://github.com\"]\n" " insteadOf = https://github.com\n\n" "Please remove them from your gitconfig or use a conditional includeIf rule to " "only apply your rewrites to specific repositories. See " "'https://git-scm.com/docs/git-config#_includes' for more information."))))))) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `git' binary; this a hard dependecy for Doom!")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `git' binary; this a hard dependecy for Doom!")) | |
doom-doctor--errors)))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking Doom Emacs..."))) | |
(condition-case ex | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(require 'doom-start) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'success "Initialized Doom Emacs %s") | |
doom-version)) | |
(doom-print | |
(doom-print--format | |
(if | |
(hash-table-p doom-modules) | |
(doom-print--class 'success "Detected %d modules" | |
(hash-table-count doom-modules)) | |
(doom-print--class 'warn "Failed to load any modules. Do you have an private init.el?")))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'success "Detected %d packages") | |
(length doom-packages))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking Doom core for irregularities..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(let | |
((tail | |
(list "savehist" "projectile.cache"))) | |
(while tail | |
(let | |
((file | |
(car tail))) | |
(let* | |
((size | |
(and t | |
(condition-case nil | |
(progn | |
(doom-file-size file doom-cache-dir)) | |
(error nil))))) | |
(if size | |
(if | |
(> size 1048576) | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "%s is too large (%.02fmb). This may cause freezes or odd startup delays" file | |
(/ size 1024 1024.0))))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "%s is too large (%.02fmb). This may cause freezes or odd startup delays" file | |
(/ size 1024 1024.0))) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Consider deleting it from your system (manually)"))))))) | |
nil)) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(condition-case nil | |
(progn | |
(executable-find doom-projectile-fd-binary)) | |
(error nil)) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Couldn't find the `fd' binary; project file searches will be slightly slower")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Couldn't find the `fd' binary; project file searches will be slightly slower")) | |
doom-doctor--warnings)))) | |
(require 'projectile) | |
(if | |
(projectile-project-root "~") | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Your $HOME is recognized as a project root")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Your $HOME is recognized as a project root")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Emacs will assume $HOME is the root of any project living under $HOME. If this isn't\n" "desired, you will need to remove \".git\" from `projectile-project-root-files-bottom-up'\n" "(a variable), e.g.\n\n" " (after! projectile\n" " (setq projectile-project-root-files-bottom-up\n" " (remove \".git\" projectile-project-root-files-bottom-up)))"))))))) | |
(if | |
(and | |
(file-equal-p doom-user-dir "~/.config/doom") | |
(file-directory-p "~/.doom.d")) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Both %S and '~/.doom.d' exist on your system") | |
(doom-print--class 'path doom-user-dir))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom will only load one of these (~/.config/doom takes precedence). Possessing\n" "both is rarely intentional; you should one or the other."))))))) | |
(if | |
(not | |
(executable-find "fc-list")) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Warning: unable to detect fonts because fontconfig isn't installed")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Warning: unable to detect fonts because fontconfig isn't installed")) | |
doom-doctor--warnings))) | |
(if | |
(and | |
(cond | |
((eq system-type 'gnu/linux) | |
(let nil | |
(concat | |
(or | |
(getenv "XDG_DATA_HOME") | |
"~/.local/share") | |
"/fonts/"))) | |
((eq system-type 'darwin) | |
(let nil "~/Library/Fonts/"))) | |
(require 'nerd-icons nil t)) | |
(progn | |
(let | |
((temp-buffer | |
(generate-new-buffer " *temp*" t))) | |
(save-current-buffer | |
(set-buffer temp-buffer) | |
(unwind-protect | |
(progn | |
(let | |
((errors 0)) | |
(let* | |
((output | |
(doom-call-process "fc-list" "" "file")) | |
(status | |
(if output | |
(car-safe | |
(prog1 output | |
(setq output | |
(cdr output)))) | |
(signal 'wrong-number-of-arguments | |
(list | |
'(status . output) | |
(length output)))))) | |
(if | |
(not | |
(= 0 status)) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "There was an error running `fc-list'. Is fontconfig installed correctly?"))) | |
(insert | |
(cdr | |
(doom-call-process "fc-list" "" "file"))) | |
(let | |
((tail nerd-icons-font-names)) | |
(while tail | |
(let | |
((font | |
(car tail))) | |
(if | |
(save-excursion | |
(re-search-backward font nil t)) | |
(doom-print | |
(doom-print--format | |
(doom-print--style 'green "Found font %s" font))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "%S font is not installed on your system") | |
font)) | |
(setq errors | |
(1+ errors))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(> errors 0) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Some needed fonts are not properly installed on your system. To download and " "install them, run `M-x nerd-icons-install-fonts' from within Doom Emacs. " "However, on Windows this command will only download them; the fonts must " "be installed manually afterwards."))))))))))) | |
(and | |
(buffer-name temp-buffer) | |
(kill-buffer temp-buffer)))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for stale elc files in your DOOMDIR..."))) | |
(if | |
(file-directory-p doom-user-dir) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(elc-check-dir doom-user-dir))))) | |
(if doom-modules | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking your enabled modules..."))) | |
(advice-add #'require :around #'doom-shut-up-a) | |
(let | |
((tail | |
(doom-module-list))) | |
(while tail | |
(let | |
((x53 | |
(car tail))) | |
(progn | |
(ignore | |
(consp x53)) | |
(let* | |
((x54 | |
(car-safe x53)) | |
(x55 | |
(cdr-safe x53))) | |
(let | |
((group x54) | |
(name x55)) | |
(let | |
((doom-context doom-context)) | |
(let | |
((tail | |
(ensure-list 'doctor))) | |
(while tail | |
(let | |
((context | |
(car tail))) | |
(doom-context-push context) | |
(setq tail | |
(cdr tail))))) | |
(let | |
(doom-local-errors doom-local-warnings) | |
(let | |
(doom-doctor--errors doom-doctor--warnings) | |
(condition-case ex | |
(let | |
((doom-module-context | |
(doom-module-context | |
(cons group name)))) | |
(if doom-inhibit-log nil | |
(doom--log ":context:module: =%s" doom-module-context)) | |
(let | |
((doctor-file | |
(doom-module-expand-path group name "doctor.el")) | |
(packages-file | |
(doom-module-expand-path group name doom-module-packages-file))) | |
(if packages-file | |
(progn | |
(let* | |
((doom-output-indent 6) | |
(--cl-var-- | |
(let | |
((doom-context doom-context)) | |
(let | |
((tail | |
(ensure-list 'packages))) | |
(while tail | |
(let | |
((context | |
(car tail))) | |
(doom-context-push context) | |
(setq tail | |
(cdr tail))))) | |
(let* | |
(doom-packages doom-disabled-packages) | |
(load packages-file 'noerror 'nomessage) | |
(mapcar #'car doom-packages)))) | |
(name nil)) | |
(while | |
(consp --cl-var--) | |
(setq name | |
(car --cl-var--)) | |
(if | |
(or | |
(doom-package-get name :disable) | |
(eval | |
(doom-package-get name :ignore)) | |
(plist-member | |
(doom-package-get name :recipe) | |
:local-repo) | |
(locate-library | |
(symbol-name name)) | |
(doom-package-built-in-p name) | |
(doom-package-installed-p name)) | |
(progn) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Missing emacs package: %S") | |
name))) | |
(setq --cl-var-- | |
(cdr --cl-var--))) | |
nil))) | |
(if doctor-file | |
(progn | |
(let | |
((inhibit-message t)) | |
(load doctor-file 'noerror 'nomessage)))))) | |
((debug file-missing) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "%s" | |
(error-message-string ex))))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "%s" | |
(error-message-string ex))) | |
doom-doctor--errors)))) | |
((debug error) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Syntax error: %s" ex)))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Syntax error: %s" ex)) | |
doom-doctor--errors))))) | |
(if | |
(or doom-doctor--errors doom-doctor--warnings) | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start | |
(doom-print--style 'bold "%s %s")) | |
group name)) | |
(doom-print | |
(doom-print--format "%s" | |
(string-join | |
(append doom-doctor--errors doom-doctor--warnings) | |
"\n"))))) | |
(progn | |
(setq doom-local-errors doom-doctor--errors) | |
(setq doom-local-warnings doom-doctor--warnings))))) | |
(setq doom-doctor--errors | |
(append doom-doctor--errors doom-local-errors)) | |
(setq doom-doctor--warnings | |
(append doom-doctor--warnings doom-local-warnings))))))) | |
(setq tail | |
(cdr tail))))))))) | |
((debug error) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Attempt to load DOOM failed\n %s\n" | |
(or | |
(cdr-safe ex) | |
(car ex)))))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Attempt to load DOOM failed\n %s\n" | |
(or | |
(cdr-safe ex) | |
(car ex)))) | |
doom-doctor--warnings))) | |
(setq doom-modules nil))) | |
(terpri) | |
(let | |
((tail | |
(list | |
(list doom-doctor--warnings "warning" 'yellow) | |
(list doom-doctor--errors "error" 'red)))) | |
(while tail | |
(let | |
((msg | |
(car tail))) | |
(if | |
(car msg) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'color | |
(nth 2 msg) | |
(if | |
(cdr | |
(car msg)) | |
"There are %d %ss!" "There is %d %s!") | |
(length | |
(car msg)) | |
(nth 1 msg)))))) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(or doom-doctor--errors doom-doctor--warnings) | |
nil | |
(doom-print | |
(doom-print--format | |
(doom-print--style 'green "Everything seems fine, happy Emacs'ing!")))) | |
(exit! :pager? "+G"))))) | |
(x16 . #s(doom-cli | |
("doom" "doctor") | |
nil | |
(("SUMMARY" . "Diagnoses common issues on your system.") | |
("MAIN" . "The Doom doctor is essentially one big, self-contained elisp shell script that\nuses a series of simple heuristics to diagnose common issues on your system.\nIssues that could intefere with Doom Emacs.\n\nDoom modules may optionally have a doctor.el file to run their own heuristics\nin.")) | |
nil nil nil nil | |
(:benchmark nil :prefix | |
(doom) | |
:group "Diagnostics" :docs "Commands for troubleshooting and debugging Doom." :hide nil) | |
(closure | |
(t) | |
(cli alist) | |
(let nil | |
(doom-print | |
(doom-print--format "The doctor will see you now...\n")) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking your Emacs version..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(cond | |
((or | |
(> emacs-major-version 29) | |
(string-match-p ".\\([56]0\\|9[0-9]\\)$" emacs-version)) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected a development version of Emacs (%s)" emacs-version)))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Detected a development version of Emacs (%s)" emacs-version)) | |
doom-doctor--warnings))) | |
(if | |
(> emacs-major-version 29) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "This is the bleeding edge of Emacs. As it is constantly changed, Doom will not " "(officially) support it. If you've found a stable commit, great! But be " "cautious about updating Emacs too eagerly!\n"))))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "A .50, .60, or .9X appended to the version string indicates that this is a version " "of Emacs in between stable releases. These are not well supported.\n")))))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Because development builds are prone to random breakage, there will be a greater " "burden on you to investigate and deal with issues. Please make extra sure that " "your issue is reproducible in 29.1 before reporting them to Doom's issue tracker!\n" "\n" "If this doesn't phase you, read the \"Why does Doom not support Emacs HEAD\" QnA " "in Doom's FAQ. It offers some advice for debugging and surviving issues on the " "bleeding edge. Failing that, 29.1 is highly recommended and will always be " "Doom's best supported version of Emacs.")))))) | |
((= emacs-major-version 27) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs 27 is supported, but consider upgrading to 28.1")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs 27 is supported, but consider upgrading to 28.1")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Emacs 28.1 is better supported, faster, and more stable. Plus, Doom will drop " "27.x support sometime late-2023."))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for Doom's prerequisites..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(not | |
(executable-find "git")) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find git on your machine! Doom's package manager won't work.")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find git on your machine! Doom's package manager won't work.")) | |
doom-doctor--errors))) | |
(let | |
((saved-match-data | |
(match-data))) | |
(unwind-protect | |
(progn | |
(let* | |
((version | |
(cdr | |
(doom-call-process "git" "version"))) | |
(version | |
(and | |
(string-match "git version \\([0-9]+\\(?:\\.[0-9]+\\)\\{2\\}\\)" version) | |
(match-string 1 version)))) | |
(if version | |
(if | |
(version< version "2.23") | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Git %s detected! Doom requires git 2.23 or newer!" version)))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Git %s detected! Doom requires git 2.23 or newer!" version)) | |
doom-doctor--errors))))) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Cannot determine Git version. Doom requires git 2.23 or newer!")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Cannot determine Git version. Doom requires git 2.23 or newer!")) | |
doom-doctor--warnings)))))) | |
(set-match-data saved-match-data t)))) | |
(if | |
(executable-find "rg") | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `rg' binary; this a hard dependecy for Doom, file searches may not work at all")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `rg' binary; this a hard dependecy for Doom, file searches may not work at all")) | |
doom-doctor--errors)))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for Emacs config conflicts..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(or | |
(file-equal-p doom-emacs-dir "~/.emacs.d") | |
(file-equal-p doom-emacs-dir "~/.config/emacs")) | |
nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Doom is installed in a non-standard location"))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "The standard locations are ~/.config/emacs or ~/.emacs.d. Emacs will fail " "to load Doom if it is not explicitly told where to look for it. In Emacs 29+, " "this is possible with the --init-directory option:\n\n" " $ emacs --init-directory '" | |
(abbreviate-file-name doom-emacs-dir) | |
"'\n\n" "However, Emacs 27-28 users have no choice but to move Doom to a standard " "location.\n\n" "Chemacs users may ignore this warning, however.")))))) | |
(let | |
(found?) | |
(let | |
((tail | |
'("~/_emacs" "~/.emacs" "~/.emacs.el" "~/.emacs.d" "~/.config/emacs"))) | |
(while tail | |
(let | |
((file | |
(car tail))) | |
(if | |
(and | |
(file-exists-p file) | |
(not | |
(file-equal-p file doom-emacs-dir))) | |
(progn | |
(setq found? t) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Found another Emacs config: %s (%s)") | |
file | |
(if | |
(file-directory-p file) | |
"directory" "file"))))) | |
(setq tail | |
(cdr tail))))) | |
(if found? | |
(progn | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Having multiple Emacs configs may prevent Doom from loading properly. Emacs " "will load the first it finds and ignore the rest. If Doom isn't starting up " "correctly (e.g. you get a vanilla splash screen), make sure that only one of " "these exist.\n\n" "Chemacs users may ignore this warning.")))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for missing Emacs features..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(if | |
(functionp 'json-serialize) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native JSON support")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native JSON support")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Users will see a substantial performance gain by building Emacs with " "jansson support (i.e. a native JSON library), particularly LSP users. " "You must install a prebuilt Emacs binary with this included, or compile " "Emacs with the --with-json option.")))))) | |
(if | |
(featurep 'native-compile) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native compilation support")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Emacs was not built with native compilation support")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Users will see a substantial performance gain by building Emacs with " "native compilation support, availible in emacs 28+." "You must install a prebuilt Emacs binary with this included, or compile " "Emacs with the --with-native-compilation option.")))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for private config conflicts..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(let* | |
((xdg-dir | |
(concat | |
(or | |
(getenv "XDG_CONFIG_HOME") | |
"~/.config") | |
"/doom/")) | |
(doom-dir | |
(or | |
(getenv "DOOMDIR") | |
"~/.doom.d/")) | |
(dir | |
(if | |
(file-directory-p xdg-dir) | |
xdg-dir doom-dir))) | |
(if | |
(file-equal-p dir doom-emacs-dir) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Doom was cloned to %S, not ~/.emacs.d or ~/.config/emacs" | |
(doom-print--class 'path dir)))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom's source and your private Doom config have to live in separate directories. " "Putting them in the same directory (without changing the DOOMDIR environment " "variable) will cause errors on startup."))))))) | |
(if | |
(and | |
(not | |
(file-equal-p xdg-dir doom-dir)) | |
(file-directory-p xdg-dir) | |
(file-directory-p doom-dir)) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected two private configs, in %s and %s") | |
(abbreviate-file-name xdg-dir) | |
doom-dir)) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "The second directory will be ignored, as it has lower precedence.")))))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for common environmental issues..."))) | |
(if | |
(string-match-p "/fish$" shell-file-name) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected Fish as your $SHELL"))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Fish (and possibly other non-POSIX shells) is known to inject garbage " "output into some of the child processes that Emacs spawns. Many Emacs " "packages/utilities will choke on this output, causing unpredictable issues. " "To get around this, either:\n\n" " - Add the following to $DOOMDIR/config.el:\n\n" " (setq shell-file-name (executable-find \"bash\"))\n\n" " - Or change your default shell to a POSIX shell (like bash or zsh) " " and explicitly configure your terminal apps to use the shell you " " want.\n\n" "If you opt for option 1 and use one of Emacs' terminal emulators, you " "will also need to configure them to use Fish, e.g.\n\n" " (setq-default vterm-shell (executable-find \"fish\"))\n\n" " (setq-default explicit-shell-file-name (executable-find \"fish\"))\n"))))))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for stale elc files..."))) | |
(elc-check-dir doom-core-dir) | |
(elc-check-dir doom-modules-dir) | |
(elc-check-dir | |
(doom-path doom-local-dir "straight" straight-build-dir)) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking for problematic git global settings..."))) | |
(if | |
(executable-find "git") | |
(if | |
(= 0 | |
(car | |
(doom-call-process "git" "config" "--global" "--get-regexp" "^url\\.git://github\\.com"))) | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Detected insteadOf rules in your global gitconfig.")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Detected insteadOf rules in your global gitconfig.")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom's package manager heavily relies on git. In particular, many of its packages " "are hosted on github. Rewrite rules like these will break it:\n\n" " [url \"git://github.com\"]\n" " insteadOf = https://github.com\n\n" "Please remove them from your gitconfig or use a conditional includeIf rule to " "only apply your rewrites to specific repositories. See " "'https://git-scm.com/docs/git-config#_includes' for more information."))))))) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `git' binary; this a hard dependecy for Doom!")))) | |
(setq doom-doctor--errors | |
(cons | |
(doom-print--format | |
(doom-print--class 'error "Couldn't find the `git' binary; this a hard dependecy for Doom!")) | |
doom-doctor--errors)))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking Doom Emacs..."))) | |
(condition-case ex | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(require 'doom-start) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'success "Initialized Doom Emacs %s") | |
doom-version)) | |
(doom-print | |
(doom-print--format | |
(if | |
(hash-table-p doom-modules) | |
(doom-print--class 'success "Detected %d modules" | |
(hash-table-count doom-modules)) | |
(doom-print--class 'warn "Failed to load any modules. Do you have an private init.el?")))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'success "Detected %d packages") | |
(length doom-packages))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'start "Checking Doom core for irregularities..."))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(let | |
((tail | |
(list "savehist" "projectile.cache"))) | |
(while tail | |
(let | |
((file | |
(car tail))) | |
(let* | |
((size | |
(and t | |
(condition-case nil | |
(progn | |
(doom-file-size file doom-cache-dir)) | |
(error nil))))) | |
(if size | |
(if | |
(> size 1048576) | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "%s is too large (%.02fmb). This may cause freezes or odd startup delays" file | |
(/ size 1024 1024.0))))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "%s is too large (%.02fmb). This may cause freezes or odd startup delays" file | |
(/ size 1024 1024.0))) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Consider deleting it from your system (manually)"))))))) | |
nil)) | |
(setq tail | |
(cdr tail))))) | |
(if | |
(condition-case nil | |
(progn | |
(executable-find doom-projectile-fd-binary)) | |
(error nil)) | |
nil | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Couldn't find the `fd' binary; project file searches will be slightly slower")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Couldn't find the `fd' binary; project file searches will be slightly slower")) | |
doom-doctor--warnings)))) | |
(require 'projectile) | |
(if | |
(projectile-project-root "~") | |
(progn | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Your $HOME is recognized as a project root")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Your $HOME is recognized as a project root")) | |
doom-doctor--warnings))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Emacs will assume $HOME is the root of any project living under $HOME. If this isn't\n" "desired, you will need to remove \".git\" from `projectile-project-root-files-bottom-up'\n" "(a variable), e.g.\n\n" " (after! projectile\n" " (setq projectile-project-root-files-bottom-up\n" " (remove \".git\" projectile-project-root-files-bottom-up)))"))))))) | |
(if | |
(and | |
(file-equal-p doom-user-dir "~/.config/doom") | |
(file-directory-p "~/.doom.d")) | |
(progn | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Both %S and '~/.doom.d' exist on your system") | |
(doom-print--class 'path doom-user-dir))) | |
(progn | |
(let | |
((doom-print-level | |
(or nil doom-print-level)) | |
(doom-print-indent | |
(+ | |
(if t | |
(or nil doom-print-indent-increment) | |
0) | |
doom-print-indent))) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'p "Doom will only load one of these (~/.config/doom takes precedence). Possessing\n" "both is rarely intentional; you should one or the other."))))))) | |
(if | |
(not | |
(executable-find "fc-list")) | |
(progn | |
(if inhibit-message nil | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'warn "Warning: unable to detect fonts because fontconfig isn't installed")))) | |
(setq doom-doctor--warnings | |
(cons | |
(doom-print--format | |
(doom-print--class 'warn "Warning: unable to detect fonts because fontconfig isn't installed")) | |
doom-doctor--warnings))) | |
(if | |
(and | |
(cond | |
((eq system-type 'gnu/linux) | |
(let nil | |
(concat | |
(or | |
(getenv "XDG_DATA_HOME") | |
"~/.local/share") | |
"/fonts/"))) | |
((eq system-type 'darwin) | |
(let nil "~/Library/Fonts/"))) | |
(require 'nerd-icons nil t)) | |
(progn | |
(let | |
((temp-buffer | |
(generate-new-buffer " *temp*" t))) | |
(save-current-buffer | |
(set-buffer temp-buffer) | |
(unwind-protect | |
(progn | |
(let | |
((errors 0)) | |
(let* | |
((output | |
(doom-call-process "fc-list" "" "file")) | |
(status | |
(if output | |
(car-safe | |
(prog1 output | |
(setq output | |
(cdr output)))) | |
(signal 'wrong-number-of-arguments | |
(list | |
'(status . output) | |
(length output)))))) | |
(if | |
(not | |
(= 0 status)) | |
(doom-print | |
(doom-print--format | |
(doom-print--class 'error "There was an error running `fc-list'. Is fontconfig installed correctly?"))) | |
(insert | |
(cdr | |
(doom-call-process "fc-list" "" "file"))) | |
(let | |
((tail nerd-icons-font-names)) | |
(while tail | |
(let | |
((font | |
(car tail))) | |
(if | |
(save-excursion | |
(re-search-backward font nil t)) | |
(doom-print | |
(doom-print--format | |
(doom-print--style 'green "Found font %s" font))) | |
(doom-print | |
(doom-print--format | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment