Rewrite doom/info

This commit is contained in:
Henrik Lissner 2018-02-10 17:27:02 -05:00
parent 0be42fe473
commit 0019deb276
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -90,16 +90,13 @@ the profiling report otherwise."
(setq doom--profiler (not doom--profiler)))
;;;###autoload
(defun doom/info ()
"Collects some debug information about your Emacs session, formats it into
markdown and copies it to your clipboard, ready to be pasted into bug reports!"
(declare (interactive-only t))
(interactive)
(message "Generating Doom info...")
(let* ((default-directory doom-emacs-dir)
(str (format
(concat "### System Information\n"
"- OS: %s (%s)\n"
(defun doom-info ()
"Returns diagnostic information about the current Emacs session in markdown,
ready to be pasted in a bug report on github."
(require 'vc-git)
(let ((default-directory doom-emacs-dir))
(format
(concat "- OS: %s (%s)\n"
"- Emacs: %s (%s)\n"
"- Doom: %s (%s https://github.com/hlissner/doom-emacs/commit/%s)\n"
"- Graphic display: %s (daemon: %s)\n"
@ -156,8 +153,18 @@ markdown and copies it to your clipboard, ready to be pasted into bug reports!"
:test #'equal))
"n/a")
exec-path)))
(kill-new str)
(message "Done! Copied to your clipboard")))
;;;###autoload
(defun doom/info ()
"Collects some debug information about your Emacs session, formats it into
markdown and copies it to your clipboard, ready to be pasted into bug reports!"
(declare (interactive-only t))
(interactive)
(if noninteractive
(message "%s" (doom-info))
(message "Generating Doom info...")
(kill-new (doom-info))
(message "Done! Copied to clipboard.")))
;;;###autoload
(defun doom/toggle-debug-mode ()