mirror of
https://github.com/org-roam/org-roam
synced 2025-08-01 12:17:21 -05:00
(feature): org-roam-diagnostics command (#653)
Automates collection of user environment information.
This commit is contained in:
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 -->
|
<!-- 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
|
- 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 file-from)))
|
||||||
(org-roam-db--update-file new-path))))
|
(org-roam-db--update-file new-path))))
|
||||||
|
|
||||||
|
;;;; Diagnostics
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun org-roam-version (&optional message)
|
(defun org-roam-version (&optional message)
|
||||||
"Return `org-roam' version.
|
"Return `org-roam' version.
|
||||||
@ -1035,5 +1036,21 @@ Interactively, or when MESSAGE is non-nil, show in the echo area."
|
|||||||
(message "%s" version)
|
(message "%s" version)
|
||||||
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)
|
(provide 'org-roam)
|
||||||
;;; org-roam.el ends here
|
;;; org-roam.el ends here
|
||||||
|
Reference in New Issue
Block a user