From: Noam Postavsky <npostavs@users.sourceforge.net>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 28831@debbugs.gnu.org, Tino Calancha <tino.calancha@gmail.com>
Subject: bug#28831: 27.0.50; debbugs: funny address in To field
Date: Fri, 20 Oct 2017 08:55:52 -0400 [thread overview]
Message-ID: <87zi8mdllz.fsf@users.sourceforge.net> (raw)
In-Reply-To: <m3bml2f9gt.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 20 Oct 2017 11:35:14 +0200")
[-- Attachment #1: Type: text/plain, Size: 375 bytes --]
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Noam Postavsky <npostavs@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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 1292 bytes --]
From 992b5b8a33eab5ea0afa020030408f76dcfd4330 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@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
next prev parent reply other threads:[~2017-10-20 12:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-14 9:45 bug#28831: 27.0.50; debbugs: funny address in To field Tino Calancha
2017-10-20 0:29 ` Noam Postavsky
2017-10-20 2:14 ` Tino Calancha
2017-10-20 9:35 ` Lars Ingebrigtsen
2017-10-20 12:55 ` Noam Postavsky [this message]
2017-10-20 13:53 ` Lars Ingebrigtsen
2017-10-21 19:52 ` Noam Postavsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zi8mdllz.fsf@users.sourceforge.net \
--to=npostavs@users.sourceforge.net \
--cc=28831@debbugs.gnu.org \
--cc=larsi@gnus.org \
--cc=tino.calancha@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.