unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: Richard Stallman <rms@gnu.org>
Cc: 41373@debbugs.gnu.org, Stefan Kangas <stefankangas@gmail.com>,
	dgutov@yandex.ru
Subject: bug#41373: GNU ELPA: Add "reporting bugs" to individual package pages
Date: Tue, 19 May 2020 22:30:40 -0700	[thread overview]
Message-ID: <87imgr9nr3.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <E1jbFo4-0004AY-8c@fencepost.gnu.org> (Richard Stallman's message of "Tue, 19 May 2020 23:54:12 -0400")

[-- Attachment #1: Type: text/plain, Size: 1072 bytes --]

Richard Stallman <rms@gnu.org> writes:

> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
> We could have report-emacs-bug ask for which package the bug is in.
> The Bug Subject argument could be one of the acceptable package names,
> including 'emacs' and whichever ELPA packages have been loaded.  The
> user could specify one of those.
>
> If the definition of a package says where to send bug reports for it,
> report-emacs-bug could send each bug to the right place.
>
> If Bug Subject argument isn't on that list, report-emacs-bug could ask,
> "Would you like to specify one of the ELPA packages that have been
> loaded?"  But you would not have to do that.  If Bug Subject is unknown,
> the message would go to bug-gnu-emacs, as now.

Several years ago I cooked up something basic like that. I've attached
the patch from that thread, which might serve as the basis for something
usable.

Eric


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Cc-package-maintainers-when-reporting-emacs-bugs.patch --]
[-- Type: text/x-patch, Size: 2480 bytes --]

From 542d7b342d0ce86933d8c6998ca7a817952b0b3f Mon Sep 17 00:00:00 2001
From: Eric Abrahamsen <eric@ericabrahamsen.net>
Date: Thu, 21 Jul 2016 15:58:47 -0400
Subject: [PATCH] Cc package maintainers when reporting emacs bugs

* lisp/mail/emacsbug.el (report-emacs-bug): Prompt for a package to
  report a bug against, and cc the package maintainer, if any, on the
  bug report.
---
 lisp/mail/emacsbug.el | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el
index 18eaa22..87ac234 100644
--- a/lisp/mail/emacsbug.el
+++ b/lisp/mail/emacsbug.el
@@ -144,11 +144,17 @@ message-send-mail-function
 (defvar message-sendmail-envelope-from)

 ;;;###autoload
-(defun report-emacs-bug (topic &optional unused)
+(defun report-emacs-bug (topic package &optional unused)
   "Report a bug in GNU Emacs.
 Prompts for bug subject.  Leaves you in a mail buffer."
   (declare (advertised-calling-convention (topic) "24.5"))
-  (interactive "sBug Subject: ")
+  (interactive (list
+                (read-string "Bug Subject: ")
+                (completing-read
+                 "Package: "
+                 (progn
+                   (package-initialize)
+                   package-alist))))
   ;; The syntax `version;' is preferred to `[version]' because the
   ;; latter could be mistakenly stripped by mailing software.
   (if (eq system-type 'ms-dos)
@@ -158,6 +164,9 @@ report-emacs-bug
   (let ((from-buffer (current-buffer))
 	(can-insert-mail (or (report-emacs-bug-can-use-xdg-email)
 			     (report-emacs-bug-can-use-osx-open)))
+        (cc (unless (or (string-empty-p package) (string= package "emacs"))
+              (require 'finder)
+              (lm-maintainer (find-library-name package))))
         user-point message-end-point)
     (setq message-end-point
 	  (with-current-buffer (messages-buffer)
@@ -184,6 +193,13 @@ report-emacs-bug
       (when (and (not message-sendmail-envelope-from)
 		 (message-bogus-recipient-p (message-make-address)))
 	(set (make-local-variable 'message-sendmail-envelope-from) 'header)))
+    (when (cdr cc) ;; The cdr is the email address.
+      (if (derived-mode-p 'message-mode)
+          (message-goto-cc)
+        (mail-cc))
+      (if (car cc)
+          (insert (format "%s <%s>" (car cc) (cdr cc)))
+        (insert (format "%s" (cdr cc)))))
     (rfc822-goto-eoh)
     (forward-line 1)
     ;; Move the mail signature to the proper place.
--
2.9.0

  reply	other threads:[~2020-05-20  5:30 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-18  2:14 bug#41373: GNU ELPA: Add "reporting bugs" to individual package pages Stefan Kangas
2020-05-18 18:04 ` Glenn Morris
2020-05-18 18:07 ` Eli Zaretskii
2020-05-19  0:20   ` Stefan Kangas
2020-05-18 18:12 ` Dmitry Gutov
2020-05-19  0:15   ` Stefan Kangas
2020-05-20  3:54     ` Richard Stallman
2020-05-20  5:30       ` Eric Abrahamsen [this message]
2020-05-25  9:04         ` Bastien
2020-05-25 15:39           ` Eric Abrahamsen
2020-05-25 17:09             ` Glenn Morris
2020-05-25 17:49               ` Eric Abrahamsen
2020-06-01  6:32             ` Bastien
2020-06-01 18:29               ` Eric Abrahamsen
2020-06-01 18:41                 ` Eli Zaretskii
2020-06-01 19:25                   ` Eric Abrahamsen
2020-06-01 19:38                     ` Eli Zaretskii
2020-06-01 20:06                       ` Eric Abrahamsen
2020-06-01 19:52                 ` Glenn Morris
2020-06-01 20:31                   ` Eric Abrahamsen
2020-05-25 11:51       ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87imgr9nr3.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=41373@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=rms@gnu.org \
    --cc=stefankangas@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).