Fix whitespace inconsistencies in doom/info

This commit is contained in:
Henrik Lissner 2018-02-03 22:24:15 -05:00
parent 3830a8aba1
commit ee24aba034
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -102,7 +102,13 @@ your clipboard. Use this when you are filing bug reports!"
"- Doom: %s (%s https://github.com/hlissner/doom-emacs/commit/%s)\n" "- Doom: %s (%s https://github.com/hlissner/doom-emacs/commit/%s)\n"
"- Graphic display: %s (daemon: %s)\n" "- Graphic display: %s (daemon: %s)\n"
"- System features: %s\n" "- System features: %s\n"
"- Details:\n ```elisp\n modules:\t%s packages:\t%s compiled files:\t%s exec-path:\t%s ```\n") "- Details:\n"
" ```elisp\n"
" modules: %s\n"
" packages: %s\n"
" elc files: %s\n"
" exec-path: %s\n"
" ```\n")
system-type system-type
emacs-version (format-time-string "%b %d, %Y" emacs-build-time) emacs-version (format-time-string "%b %d, %Y" emacs-build-time)
doom-version doom-version
@ -110,37 +116,43 @@ your clipboard. Use this when you are filing bug reports!"
(display-graphic-p) (daemonp) (display-graphic-p) (daemonp)
(bound-and-true-p system-configuration-features) (bound-and-true-p system-configuration-features)
;; details ;; details
(pp-to-string ; modules (or (cl-loop with cat = nil
(or (ignore-errors for key being the hash-keys of doom-modules
(cl-loop with cat = nil if (or (not cat) (not (eq cat (car key))))
for key being the hash-keys of doom-modules do (setq cat (car key)) and collect cat
if (or (not cat) (not (eq cat (car key)))) else collect
do (setq cat (car key)) and collect cat (let ((flags (doom-module-flags cat (cdr key))))
else collect (cdr key))) (if (equal flags '(t))
"n/a")) (cdr key)
(pp-to-string ; packages (list (cdr key) flags))))
(or (ignore-errors "n/a")
(let (packages) (or (let (packages)
(require 'async) (ignore-errors
(async-get (require 'async)
(async-start ;; collect these in another session to protect this
`(lambda () ;; session's state
(setq load-path ',load-path) (async-get
(load ,(expand-file-name "core/core.el" doom-emacs-dir)) (async-start
(load ,(expand-file-name "init.el" doom-emacs-dir)) `(lambda ()
(load ,(expand-file-name "core/autoload/packages.el" doom-emacs-dir)) (setq load-path ',load-path)
(doom-get-packages)) (load ,(expand-file-name "core/core.el" doom-emacs-dir))
(lambda (p) (setq packages p)))) (load ,(expand-file-name "init.el" doom-emacs-dir))
(cl-sort (mapcar #'car packages) #'string-lessp :key #'symbol-name))) (load ,(expand-file-name "core/autoload/packages.el" doom-emacs-dir))
"n/a")) (doom-get-packages))
(pp-to-string ; compiled files (lambda (p) (setq packages p))))
(or (ignore-errors (mapcar (lambda (x)
(cl-delete-duplicates (if (cdr x)
(cl-loop for file in (append (reverse (directory-files-recursively doom-core-dir "\\.elc$")) (format "%s" x)
(reverse (directory-files-recursively doom-modules-dir "\\.elc$"))) (symbol-name (car x))))
collect (file-relative-name (file-name-directory file) doom-emacs-dir)) (cl-sort packages #'string-lessp :key (lambda (x) (symbol-name (car x)))))))
:test #'equal)) "n/a")
"n/a")) (or (ignore-errors
(pp-to-string exec-path)))) (cl-delete-duplicates
(cl-loop for file in (append (reverse (directory-files-recursively doom-core-dir "\\.elc$"))
(reverse (directory-files-recursively doom-modules-dir "\\.elc$")))
collect (file-relative-name (file-name-directory file) doom-emacs-dir))
:test #'equal))
"n/a")
exec-path)))
(kill-new str) (kill-new str)
(message "Done! Copied to your clipboard"))) (message "Done! Copied to your clipboard")))