From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.bugs Subject: bug#41373: GNU ELPA: Add "reporting bugs" to individual package pages Date: Mon, 01 Jun 2020 11:29:14 -0700 Message-ID: <877dwqbpxh.fsf@ericabrahamsen.net> References: <87imgr9nr3.fsf@ericabrahamsen.net> <87r1v85qs3.fsf@gnu.org> <87imgkt469.fsf@ericabrahamsen.net> <87h7vvjnyf.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="112371"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 41373@debbugs.gnu.org, Stefan Kangas , Richard Stallman , dgutov@yandex.ru To: Bastien Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 01 20:32:49 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jfpEv-000TBM-7u for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Jun 2020 20:32:49 +0200 Original-Received: from localhost ([::1]:50538 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfpEu-0005sl-9G for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Jun 2020 14:32:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40712) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfpCE-00045P-R8 for bug-gnu-emacs@gnu.org; Mon, 01 Jun 2020 14:30:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53686) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jfpCE-0005IE-GX for bug-gnu-emacs@gnu.org; Mon, 01 Jun 2020 14:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jfpCE-00046s-DY for bug-gnu-emacs@gnu.org; Mon, 01 Jun 2020 14:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Jun 2020 18:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41373 X-GNU-PR-Package: emacs Original-Received: via spool by 41373-submit@debbugs.gnu.org id=B41373.159103617215713 (code B ref 41373); Mon, 01 Jun 2020 18:30:02 +0000 Original-Received: (at 41373) by debbugs.gnu.org; 1 Jun 2020 18:29:32 +0000 Original-Received: from localhost ([127.0.0.1]:36995 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jfpBk-00045N-7E for submit@debbugs.gnu.org; Mon, 01 Jun 2020 14:29:32 -0400 Original-Received: from ericabrahamsen.net ([52.70.2.18]:41726 helo=mail.ericabrahamsen.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jfpBa-000453-Ve for 41373@debbugs.gnu.org; Mon, 01 Jun 2020 14:29:30 -0400 Original-Received: from localhost (c-73-254-86-141.hsd1.wa.comcast.net [73.254.86.141]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 4493CFA034; Mon, 1 Jun 2020 18:29:16 +0000 (UTC) In-Reply-To: <87h7vvjnyf.fsf@gnu.org> (Bastien's message of "Mon, 01 Jun 2020 08:32:24 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:181363 Archived-At: --=-=-= Content-Type: text/plain On 06/01/20 08:32 AM, Bastien wrote: > Hi Eric, > > Eric Abrahamsen writes: > >> I think in the original discussion the patch went back and forth between >> completing on `package-alist' and completing on `features'. The former >> didn't offer enough, the latter offered too much. > > While not offering "enough", the former is already an improvement, I'd > be in favor of implementing it. The latter really offers too much IMO. Yes, I've come to the same conclusion over time. >> If we complete on `features', that's definitely an issue. I think my >> solution in that version of the patch simply dropped the issue if the >> Maintainer header was emacs-devel, or there was no Maintainer. > > Yes, it looks fine to me like this. > >> My pleasure -- as Dmitry notes, this might not solve the problem that >> this thread is about, but I think it's definitely worthwhile on its own. > > Definitely. What is still needed here so that you can make this change? Here's a new version of the patch. It: 1. doesn't require a package 2. only honors the Maintainer header (not the Author header, if there's no Maintainer) 3. screens out "emacs.devel@gnu.org" as a Maintainer value (we could easily add more values to screen out) 4. uses X-Debbugs-CC instead of Cc 5. Adds a "Package:" pseudo-header Remaining questions: 1. I've seen some reference to a X-Debbugs-Package header, is that honored? 2. Glenn mentioned the fact that some package maintainers might not want anything to do with debbugs. I'm not sure how to handle that situation, except manually. I suppose, if we do end up adding a package maintainer, we could also add a line of text in the intangible instructions saying, "If you don't want to deal with this bug on the Emacs bug tracker, please send a message to XXX-done@debbugs.gnu.org to close it." 3. Lastly, this is a fairly in-your-face change to how Emacs bugs are reported, and I'm not sure everyone agrees it's a good idea! Adding an extra prompt to the process is a bit intrusive. Eric --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Cc-package-maintainers-when-reporting-emacs-bugs.patch >From ae806f23a8e8b784ed1c18a0783c563fa013f601 Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen 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 | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el index 7f3dc4454a..0a39cb682f 100644 --- a/lisp/mail/emacsbug.el +++ b/lisp/mail/emacsbug.el @@ -206,17 +206,30 @@ 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) + nil nil))) ;; The syntax `version;' is preferred to `[version]' because the ;; latter could be mistakenly stripped by mailing software. (setq topic (concat emacs-version "; " topic)) (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-with-file (find-library-name package) + ;; Don't use `lm-maintainer', as that falls back on + ;; author. + (lm-header "maintainer")))) user-point message-end-point) (setq message-end-point (with-current-buffer (messages-buffer) @@ -232,7 +245,7 @@ report-emacs-bug (compose-mail report-emacs-bug-address topic) ;; The rest of this does not execute if the user was asked to ;; confirm and said no. - (when (eq major-mode 'message-mode) + (when (derived-mode-p 'message-mode) ;; Message-mode sorts the headers before sending. We sort now so ;; that report-emacs-bug-orig-text remains valid. (Bug#5178) (message-sort-headers) @@ -243,6 +256,15 @@ 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 (and cc + (setq cc (lm-crack-address cc)) + (null (string= "emacs.devel@gnu.org" (cdr cc)))) + (if (derived-mode-p 'message-mode) + (message-position-on-field "X-Debbugs-CC") + (mail-position-on-field "X-Debbugs-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. @@ -415,7 +437,9 @@ report-emacs-bug (make-local-variable 'report-emacs-bug-orig-text) (setq report-emacs-bug-orig-text (buffer-substring-no-properties (point-min) (point))) - (goto-char user-point))) + (goto-char user-point) + (unless (string-empty-p package) + (insert "Package: " package "\n\n")))) (define-obsolete-function-alias 'report-emacs-bug-info 'info-emacs-bug "24.3") -- 2.26.2 --=-=-=--