bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#36433: gnus-read-ephemeral-bug-group does not handle errors, leaving


From: Basil L. Contovounesios
Subject: bug#36433: gnus-read-ephemeral-bug-group does not handle errors, leaving temporary files behind
Date: Sun, 30 Jun 2019 03:47:02 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

tags 36433 + patch
quit

Attachment: 0001-Improve-Gnus-ephemeral-bug-group-browsing.patch
Description: Text Data

Tim Landscheidt <tim@tim-landscheidt.de> writes:

> With Emacs 26.1, M-x gnus-read-ephemeral-bug-group RET
> foobar RET gives "gnus-list-of-unread-articles: Group
> nndoc+ephemeral:bug#0 couldn’t be activated", while leaving
> a temporary file with the contents:
>
> | <HTML>
> | <HEAD><TITLE>Error</TITLE></HEAD>
> | <BODY>
> | An error occurred.
> | Error was: No bug number
> | </BODY></HTML>
>
> behind in /tmp.
>
> This also happens with gnus-read-ephemeral-emacs-bug-group
> and gnus-read-ephemeral-debian-bug-group.

The attached patch fixes this for Emacs 27.  It also improves the
reading and handling of multiple string/numeric bug IDs, which is
currently quite brittle, and extends some of the relevant documentation.
WDYT?

> For GNU bugs, fixing this might be made easier by updating
> debbugs.gnu.org as it currently returns 200 OK for non-ex-
> isting bugs:
>
> | [tim@passepartout ~]$ curl -is 
> 'https://debbugs.gnu.org/cgi/bugreport.cgi?bug=foobar;mboxmaint=yes;mboxstat=yes'
>  | head -1
> | HTTP/1.1 200 OK
> | [tim@passepartout ~]$
>
> while bugs.debian.org gives a status code that can be used
> for diagnostics:
>
> | [tim@passepartout ~]$ curl -is 
> 'https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=595256;mboxmaint=yes;mboxstat=yes'
>  | head -1
> | HTTP/1.1 200 OK
> | [tim@passepartout ~]$ curl -is 
> 'https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=4711;mboxmaint=yes;mboxstat=yes'
>  | head -1
> | HTTP/1.1 404 Not Found
> | [tim@passepartout ~]$

I think the attached patch is as good as gnus-read-ephemeral-bug-group
can do for now, without fixing several known deficiencies of the url.el
library and debbugs.gnu.org instance (each of which deserves its own bug
ticket if it doesn't already have one).

Thanks,

-- 
Basil

reply via email to

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