Rewrite doom/info
This commit is contained in:
parent
0be42fe473
commit
0019deb276
1 changed files with 70 additions and 63 deletions
|
@ -90,16 +90,13 @@ the profiling report otherwise."
|
||||||
(setq doom--profiler (not doom--profiler)))
|
(setq doom--profiler (not doom--profiler)))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun doom/info ()
|
(defun doom-info ()
|
||||||
"Collects some debug information about your Emacs session, formats it into
|
"Returns diagnostic information about the current Emacs session in markdown,
|
||||||
markdown and copies it to your clipboard, ready to be pasted into bug reports!"
|
ready to be pasted in a bug report on github."
|
||||||
(declare (interactive-only t))
|
(require 'vc-git)
|
||||||
(interactive)
|
(let ((default-directory doom-emacs-dir))
|
||||||
(message "Generating Doom info...")
|
(format
|
||||||
(let* ((default-directory doom-emacs-dir)
|
(concat "- OS: %s (%s)\n"
|
||||||
(str (format
|
|
||||||
(concat "### System Information\n"
|
|
||||||
"- OS: %s (%s)\n"
|
|
||||||
"- Emacs: %s (%s)\n"
|
"- Emacs: %s (%s)\n"
|
||||||
"- 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"
|
||||||
|
@ -156,8 +153,18 @@ markdown and copies it to your clipboard, ready to be pasted into bug reports!"
|
||||||
:test #'equal))
|
:test #'equal))
|
||||||
"n/a")
|
"n/a")
|
||||||
exec-path)))
|
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
|
;;;###autoload
|
||||||
(defun doom/toggle-debug-mode ()
|
(defun doom/toggle-debug-mode ()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue