From 3f019810539488812f558c5570c381bdc5b5cd26 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Mon, 7 Aug 2023 15:35:53 +0300 Subject: [PATCH] Add missing 'sweeprolog-submit-bug-report' command 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 | 13 ++++++++----- sweeprolog.el | 39 +++++++++++++++++++++++++++++++++++++-- 2 files changed, 45 insertions(+), 7 deletions(-) diff --git a/README.org b/README.org index 2be0d9e..adfa298 100644 --- a/README.org +++ b/README.org @@ -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. diff --git a/sweeprolog.el b/sweeprolog.el index d01167e..fb3560c 100644 --- a/sweeprolog.el +++ b/sweeprolog.el @@ -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) -- 2.39.5