emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: can Gnus simply use the Emacs bug tracker?


From: Ted Zlatanov
Subject: Re: can Gnus simply use the Emacs bug tracker?
Date: Thu, 17 Mar 2011 14:12:13 -0500
User-agent: Gnus/5.110014 (No Gnus v0.14) Emacs/24.0.50 (gnu/linux)

On Thu, 17 Mar 2011 18:40:51 +0100 Lars Magne Ingebrigtsen <address@hidden> 
wrote: 

LMI> I think the Gnus variable snarfer and stuff should just be removed, and
LMI> gnus-bug should just be a shim over report-emacs-bugs.  The variables
LMI> that are picked out can be somewhat sensitive, and not all that useful.
LMI> The standard report-emacs-bugs data is more useful, I think.

OK.  Patch attached, although I didn't remove all the cruft related to
`gnus-bug' from gnus-msg.el or elsewhere.  The patch is against the
Emacs trunk because it modifies `report-emacs-bug' a little bit.

On Thu, 17 Mar 2011 13:50:06 -0400 Glenn Morris <address@hidden> wrote: 

GM> You can also specify a "Version: " pseudo-header, which can be useful.
GM> Though probably not very useful with a non-numeric version like "No Gnus
GM> v0.14".

I'm not sure either.  Lars?

Ted

=== modified file 'lisp/gnus/gnus-msg.el'
--- lisp/gnus/gnus-msg.el       2011-02-23 13:35:35 +0000
+++ lisp/gnus/gnus-msg.el       2011-03-17 19:09:20 +0000
@@ -1429,42 +1429,15 @@
        (gnus-inews-yank-articles (list (cdr gnus-article-current)))))))
 
 (defvar nntp-server-type)
-(defun gnus-bug ()
+(defun gnus-bug (topic &optional recent-keys)
   "Send a bug report to the Gnus maintainers."
-  (interactive)
+  (interactive (reverse (list (recent-keys) (read-string "Bug Subject: "))))
   (unless (gnus-alive-p)
     (error "Gnus has been shut down"))
-  (gnus-setup-message (if (message-mail-user-agent) 'message 'bug)
-    (unless (message-mail-user-agent)
-      (delete-other-windows)
-      (when gnus-bug-create-help-buffer
-       (switch-to-buffer "*Gnus Help Bug*")
-       (erase-buffer)
-       (insert gnus-bug-message)
-       (goto-char (point-min)))
-      (message-pop-to-buffer "*Gnus Bug*"))
-    (let ((message-this-is-mail t))
-      (message-setup `((To . ,gnus-maintainer) (Subject . ""))))
-    (when gnus-bug-create-help-buffer
-      (push `(gnus-bug-kill-buffer) message-send-actions))
-    (goto-char (point-min))
-    (re-search-forward (concat "^" (regexp-quote mail-header-separator) "$"))
-    (forward-line 1)
-    (insert (gnus-version) "\n"
-           (emacs-version) "\n")
-    (when (and (boundp 'nntp-server-type)
-              (stringp nntp-server-type))
-      (insert nntp-server-type))
-    (insert "\n\n\n\n\n")
-    (let (text)
-      (with-current-buffer (gnus-get-buffer-create " *gnus environment info*")
-       (erase-buffer)
-       (gnus-debug)
-       (setq text (buffer-string)))
-      (insert "<#part type=application/emacs-lisp disposition=inline 
description=\"User settings\">\n" text "\n<#/part>"))
-    (goto-char (point-min))
-    (search-forward "Subject: " nil t)
-    (message "")))
+  (let ((report-emacs-bug-address gnus-maintainer)
+        (report-emacs-bug-body-prepend
+         (format "Package: %s\n" gnus-bug-package)))
+    (report-emacs-bug topic recent-keys)))
 
 (defun gnus-bug-kill-buffer ()
   (when (get-buffer "*Gnus Help Bug*")

=== modified file 'lisp/gnus/gnus.el'
--- lisp/gnus/gnus.el   2011-03-06 02:43:19 +0000
+++ lisp/gnus/gnus.el   2011-03-17 19:08:27 +0000
@@ -2633,9 +2633,13 @@
 (defvar gnus-have-read-active-file nil)
 
 (defconst gnus-maintainer
-  "address@hidden (The Gnus Bugfixing Girls + Boys)"
+  "address@hidden (The Gnus Bugfixing Girls + Boys)"
   "The mail address of the Gnus maintainers.")
 
+(defconst gnus-bug-package
+  "gnus"
+  "The package to use in the bug submission.")
+
 (defvar gnus-info-nodes
   '((gnus-group-mode "(gnus)Group Buffer")
     (gnus-summary-mode "(gnus)Summary Buffer")

=== modified file 'lisp/mail/emacsbug.el'
--- lisp/mail/emacsbug.el       2011-02-06 15:04:31 +0000
+++ lisp/mail/emacsbug.el       2011-03-17 18:37:08 +0000
@@ -171,6 +171,8 @@
       (set (make-local-variable 'message-strip-special-text-properties) nil))
     (rfc822-goto-eoh)
     (forward-line 1)
+    (when (boundp 'report-emacs-bug-body-prepend)
+      (insert (symbol-value 'report-emacs-bug-body-prepend)))
     (let ((signature (buffer-substring (point) (point-max))))
       (delete-region (point) (point-max))
       (insert signature)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]