A while ago now, Nikodemus Siivola moved
bug information for SBCL
from a flat text file to Launchpad.
Historically I have had almost nothing but displeasure
working with the "standard" or "industrial" bug trackers; I
have found Bugzilla
horrible to work with, both as a bug reporter and as an
administrator; lighter-weight solutions such as Trac are just about
tolerable, but basically anything that requires me
to have a Web Browser seems to end up confusing and
distracting me. An honourable mention at this point goes to
debbugs:
being able to report, manipulate, update and close bugs by
e-mail is close to my idea of Nirvana.
So, Launchpad.
Initially, I was dismayed, because there doesn't seem to be
a way of getting notifications of bug updates over RSS,
which would be a second-best to getting updates by e-mail.
I managed to ignore all SBCL bug reports for a while, but
eventually I bit the bullet and signed up (having
refused to do so a good long while ago, when shortly after I
used Ubuntu's bugzilla
to report a bug they closed the bugzilla in favour of
launchpad without managing to transfer accounts across.)
A large motivation for signing up was the discovery that
launchpad does, in fact, have an email
interface to the bug tracker; as long as you can emit
GPG-signed mail (which I can), it seems to have all the
required functionality for doing things without needing to
go near a web browser; I can now receive bug reports and
reply to them, and in at least some cases the
References: headers in the mail I receive allows my client to thread the
discussion properly (I haven't really stress-tested this
yet, but it works at least well enough for now.)
If that were all, this would not be news (and not even
worthy of a blog post). But now I get to demonstrate my
Emacs lisp “scripting” ability, in much the same
way as Dan Barlow
did for me many
years ago: SBCL has a mailing
list for reporting bugs, for people who are unsure as to
whether their problem is a bug or not, or for people who
don't want to go to the trouble to get a launchpad account
just to report a bug. When such a report does describe a
new bug that we should be tracking, that report needs to
make its way to launchpad.
Without too much further ado, I present
sbcl-bugs-mail-forward, which constructs a message
(almost) ready to be sent:
(defun sbcl-bugs-mail-forward ()
(interactive)
(let ((message-forward-ignored-headers "")
from subject)
(gnus-summary-mail-forward 4)
(message-goto-to)
(insert "new@bugs.launchpad.net")
(message-goto-subject)
(message-beginning-of-line)
(re-search-forward
"\\[\\(.*\\)\\].*\\[\\(.*\\)\\] \\(.*\\)$")
(setq from (match-string 1) subject (match-string 3))
(message-beginning-of-line)
(let ((kill-whole-line nil))
(kill-line))
(insert subject)
(message-goto-body)
(insert "Report from " from "\n\n")
(insert " affects sbcl\n status confirmed\n importance ")
(save-excursion
(insert "\n tag \n done\n\n")
(message-goto-body)
(re-search-forward
"^\\(-\\)+ Start of forwarded message \\(-\\)+$")
(beginning-of-line)
(let ((kill-whole-line t))
(kill-line))
(re-search-forward "^\\(-\\)+$")
(beginning-of-line)
(end-of-buffer)
(kill-region (mark) (point)))
(mml-secure-message-sign-pgpmime)))
You can tell it's scripting, really: it's an odd mixture of
plausible and dubious ways of getting things done: regular
expressions to extract the original sender of the report,
and to remove the forwarded message information (and the
dull advert inserted in the footer by SourceForge's mailing
list system). On the other hand, that function, coupled
with something along the lines of
(setq gnus-parameters
'(("nnml\\+private:list.sbcl-bugs"
(gnus-summary-prepared-hook
'(lambda ()
(local-set-key (kbd "C-c C-f")
'sbcl-bugs-mail-forward)
(local-set-key (kbd "S o m")
'sbcl-bugs-mail-forward))))))
gives me exactly what I think I want: a simple way of
creating, tagging and classifying an entry in the bug
tracker from a mail report.
I couldn't find any convenient emacs/launchpad interfaces
(or any at all, in fact); I'm not sure this counts as one
either, but by all means use, adapt and improve on the above
for your purposes – I'll happily take criticism of and
improvements to this hack.