From 5048b72c12b2084fc861d127780f31c574a835a5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 31 Dec 2017 17:49:27 -0500 Subject: [PATCH] Add doom/info command This copies debug information about the current session of Doom Emacs in the clipboard, which folks can use to include system information with their bug reports! --- core/autoload/debug.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/core/autoload/debug.el b/core/autoload/debug.el index 0bffa5da3..e5d907837 100644 --- a/core/autoload/debug.el +++ b/core/autoload/debug.el @@ -86,3 +86,15 @@ selection of all minor-modes, active or not." (profiler-report) (profiler-stop)) (setq doom--profiler (not doom--profiler))) + +;;;###autoload +(defun doom/info () + "Collects information about this session of Doom Emacs and copies it to the +clipboard. Helpful when filing bug reports!" + (interactive) + (message "Producing information about your system...") + (with-temp-buffer + (call-process (expand-file-name "bin/doom-doctor" doom-emacs-dir) nil t) + (ansi-color-apply-on-region (point-min) (point-max)) + (kill-new (buffer-string))) + (message "Copied to clipboard!"))