]> git.eshelyaron.com Git - sweep.git/commitdiff
Add missing 'sweeprolog-submit-bug-report' command
authorEshel Yaron <me@eshelyaron.com>
Mon, 7 Aug 2023 12:35:53 +0000 (15:35 +0300)
committerEshel Yaron <me@eshelyaron.com>
Mon, 7 Aug 2023 12:35:53 +0000 (15:35 +0300)
This command has been documented since Sweep version 0.6.0 but its
implementation was unintentionally committed.  This fixes that.

* sweeprolog.el (sweeprolog-submit-bug-report): New command.
(sweeprolog-menu): Add entry for 'sweeprolog-submit-bug-report'.
* README.org (Setting up Sweep for local development): Capitalize.
(Submitting patches and bug reports): Update.

README.org
sweeprolog.el

index 2be0d9e120cee211648dc836aa51f722ba50eb74..adfa29811d2c5c008d20b74fb83844fb07562c14 100644 (file)
@@ -2677,7 +2677,7 @@ patches, improvement suggestions, and general feedback.
 
 For a list of known desired improvements in Sweep, see [[*Things to do][Things to do]].
 
-** Setting up sweep for local development
+** Setting up Sweep for local development
 :PROPERTIES:
 :CUSTOM_ID: development-setup
 :DESCRIPTION: Instructions for preparing a local development environment for working on sweep
@@ -2718,14 +2718,17 @@ achieved with the following command executed in
 :PROPERTIES:
 :CUSTOM_ID: submitting-patches
 :DESCRIPTION: Commands for contacting the maintainers of this project
-:ALT_TITLE: Submitting Patches
+:ALT_TITLE: Bug Reports
 :END:
 
-The best way to get in touch with the Sweep maintainers is via [[https://lists.sr.ht/~eshel/dev][the
-sweep mailing list]].
+The best way to get in touch with the Sweep maintainers is via [[https://lists.sr.ht/~eshel/dev][the Sweep
+mailing list]].
 
 #+FINDEX: sweeprolog-submit-bug-report
-The command ~M-x sweeprolog-submit-bug-report~ can be used to easily
+- Command: sweeprolog-submit-bug-report :: Report a bug in Sweep to
+  the maintainers via mail.
+
+You can use the command ~M-x sweeprolog-submit-bug-report~ to easily
 contact the Sweep maintainers from within Emacs.  This command opens a
 new buffer with a message template ready to be sent to the Sweep
 mailing list.
index d01167e385aec43d57ca7a70abbc913e793c683e..fb3560cf3099d5496a538b52721f3454cab48fa5 100644 (file)
@@ -648,8 +648,9 @@ for top-level buffers that don't belong to any project."
     "--"
     [ "Reset Sweep" sweeprolog-restart t ]
     [ "View Messages" sweeprolog-view-messages t ]
-    [ "Read the Sweep Manual" sweeprolog-info-manual t]
-    [ "Sweep News" sweeprolog-view-news t]))
+    [ "Read the Sweep Manual" sweeprolog-info-manual t ]
+    [ "Sweep News" sweeprolog-view-news t ]
+    [ "Report Bug" sweeprolog-submit-bug-report t ]))
 
 
 ;;;; Local variables
@@ -6909,6 +6910,40 @@ This function is used as a `add-log-current-defun-function' in
       (concat (when mod (concat mod ":"))
               fun ind (number-to-string ari)))))
 
+
+;;;; Bug Reports
+
+(defvar reporter-prompt-for-summary-p)
+
+(defun sweeprolog-submit-bug-report ()
+  "Report a bug in Sweep to the maintainers via mail."
+  (interactive)
+  (require 'reporter)
+  (let ((version
+         (with-current-buffer (find-file-noselect
+                               (expand-file-name "sweeprolog.el"
+                                                 sweeprolog--directory))
+           (package-get-version)))
+        (reporter-prompt-for-summary-p t))
+    (reporter-submit-bug-report
+     "Sweep Development <~eshel/dev@lists.sr.ht>"
+     (format "Sweep v%s" version)
+     '(sweeprolog--directory
+       sweeprolog--initialized
+       sweeprolog-init-args
+       sweeprolog-swipl-path
+       sweeprolog-libswipl-path
+       system-configuration-features)
+     nil nil
+     (propertize " "
+                 'display
+                 (propertize
+                  "Insert your bug report below.
+If possible, specify where you got Emacs, SWI-Prolog and Sweep,
+and include a recipe for reproducing your issue.
+[This line and the above text are not included in your report.]"
+                  'face 'italic)))))
+
 ;;;; Footer
 
 (provide 'sweeprolog)