GNU bug report logs - #28831
27.0.50; debbugs: funny address in To field

Previous Next

Package: emacs;

Reported by: Tino Calancha <tino.calancha <at> gmail.com>

Date: Sat, 14 Oct 2017 09:47:02 UTC

Severity: minor

Tags: fixed, patch

Found in version 27.0.50

Fixed in version 26.1

Done: Noam Postavsky <npostavs <at> users.sourceforge.net>

Bug is archived. No further changes may be made.

Full log


Message #19 received at 28831 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 28831 <at> debbugs.gnu.org, Tino Calancha <tino.calancha <at> gmail.com>
Subject: Re: bug#28831: 27.0.50; debbugs: funny address in To field
Date: Fri, 20 Oct 2017 08:55:52 -0400
[Message part 1 (text/plain, inline)]
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Noam Postavsky <npostavs <at> users.sourceforge.net> writes:
>
>> -			(replace-regexp-in-string "^http://" "" mbox-url)))))
>> +			(replace-regexp-in-string "^https://" "" mbox-url)))))
>
> Perhaps that should be
>
>> +			(replace-regexp-in-string "^https?://" "" mbox-url)))))

Or maybe we could use url-parse?  Seems a bit neater.

[v2-0001-Handle-https-url-for-debbugs-mbox-Bug-28831.patch (text/x-diff, inline)]
From 992b5b8a33eab5ea0afa020030408f76dcfd4330 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs <at> gmail.com>
Date: Thu, 19 Oct 2017 20:07:05 -0400
Subject: [PATCH v2] Handle https url for debbugs mbox (Bug#28831)

In 2017-09-13 "Prefer HTTPS to FTP and HTTP in documentation",
gnus-bug-group-download-format-alist was updated to use https for the
debbugs.gnu.org mbox links, but gnus-read-ephemeral-bug-group assumed
http links.
* lisp/gnus/gnus-group.el (gnus-read-ephemeral-bug-group): Use
url-parse functions to get the host name, instead of ad-hoc regexps.
---
 lisp/gnus/gnus-group.el | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index 985efe6272..4a41c49590 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -2467,9 +2467,7 @@ gnus-read-ephemeral-bug-group
 	;; Add the debbugs address so that we can respond to reports easily.
 	(let ((address
 	       (format "%s@%s" (car ids)
-		       (replace-regexp-in-string
-			"/.*$" ""
-			(replace-regexp-in-string "^http://" "" mbox-url)))))
+                       (url-host (url-generic-parse-url mbox-url)))))
 	  (goto-char (point-min))
 	  (while (re-search-forward (concat "^" message-unix-mail-delimiter)
 				    nil t)
-- 
2.11.0


This bug report was last modified 7 years and 216 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.