(feature): org-roam-diagnostics command (#653)
Automates collection of user environment information.
This commit is contained in:
parent
74f12ee8aa
commit
7844827757
2 changed files with 20 additions and 3 deletions
6
.github/ISSUE_TEMPLATE/bug_report.md
vendored
6
.github/ISSUE_TEMPLATE/bug_report.md
vendored
|
@ -36,8 +36,8 @@ Example:
|
|||
|
||||
<!-- Example: File A is missing -->
|
||||
|
||||
### Versions
|
||||
### Environment
|
||||
|
||||
<!-- Please M-x org-roam-diagnostics and paste results here -->
|
||||
|
||||
- Emacs (Paste `M-x emacs-version` output here)
|
||||
- Org (Paste `M-x org-version` output here)
|
||||
- Org-roam commit: https://github.com/jethrokuan/org-roam/commit/commithashhere
|
||||
|
|
17
org-roam.el
17
org-roam.el
|
@ -1019,6 +1019,7 @@ Otherwise, behave as if called interactively."
|
|||
(org-roam-db--update-file file-from)))
|
||||
(org-roam-db--update-file new-path))))
|
||||
|
||||
;;;; Diagnostics
|
||||
;;;###autoload
|
||||
(defun org-roam-version (&optional message)
|
||||
"Return `org-roam' version.
|
||||
|
@ -1035,5 +1036,21 @@ Interactively, or when MESSAGE is non-nil, show in the echo area."
|
|||
(message "%s" version)
|
||||
version)))
|
||||
|
||||
;;;###autoload
|
||||
(defun org-roam-diagnostics ()
|
||||
"Collect and print info for `org-roam' issues."
|
||||
(interactive)
|
||||
(with-current-buffer (switch-to-buffer-other-window (get-buffer-create "*org-roam diagnostics*"))
|
||||
(erase-buffer)
|
||||
(insert (propertize "Copy info below this line into issue:\n" 'face '(:weight bold)))
|
||||
(insert (format "- Emacs: %s\n" (emacs-version)))
|
||||
(insert (format "- Framework: %s\n"
|
||||
(condition-case _
|
||||
(completing-read "I'm using the following Emacs framework:"
|
||||
'("Doom" "Spacemacs" "N/A" "I don't know"))
|
||||
(quit "N/A"))))
|
||||
(insert (format "- Org: %s\n" (org-version nil 'full)))
|
||||
(insert (format "- Org-roam: %s" (org-roam-version)))))
|
||||
|
||||
(provide 'org-roam)
|
||||
;;; org-roam.el ends here
|
||||
|
|
Loading…
Reference in a new issue