From 82a8ad04d22cee5291657f2888c0899c235d3d00 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Tue, 22 Feb 2005 23:15:11 +0000 Subject: [PATCH] Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-124 Merge from gnus--rel--5.10 Patches applied: * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-27 Update from CVS 2005-02-21 Reiner Steib * lisp/gnus/gnus-art.el (gnus-parse-news-url, gnus-button-handle-news): Handle news URL with given port correctly. --- lisp/gnus/ChangeLog | 5 +++++ lisp/gnus/gnus-art.el | 14 +++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 3cf7292deac..3a9a24b57ce 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2005-02-21 Reiner Steib + + * gnus-art.el (gnus-parse-news-url, gnus-button-handle-news): + Handle news URL with given port correctly. + 2005-02-19 Katsumi Yamaoka * gnus-msg.el (gnus-copy-article-buffer): Quote decoded words diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 0d0da23ea58..0cfc433bd5e 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -6648,15 +6648,18 @@ specified by `gnus-button-alist'." (cons fun args))))))) (defun gnus-parse-news-url (url) - (let (scheme server group message-id articles) + (let (scheme server port group message-id articles) (with-temp-buffer (insert url) (goto-char (point-min)) (when (looking-at "\\([A-Za-z]+\\):") (setq scheme (match-string 1)) (goto-char (match-end 0))) - (when (looking-at "//\\([^/]+\\)/") + (when (looking-at "//\\([^:/]+\\)\\(:?\\)\\([0-9]+\\)?/") (setq server (match-string 1)) + (setq port (if (stringp (match-string 3)) + (string-to-number (match-string 3)) + (match-string 3))) (goto-char (match-end 0))) (cond @@ -6669,18 +6672,19 @@ specified by `gnus-button-alist'." (setq group (match-string 1))) (t (error "Unknown news URL syntax")))) - (list scheme server group message-id articles))) + (list scheme server port group message-id articles))) (defun gnus-button-handle-news (url) "Fetch a news URL." - (destructuring-bind (scheme server group message-id articles) + (destructuring-bind (scheme server port group message-id articles) (gnus-parse-news-url url) (cond (message-id (save-excursion (set-buffer gnus-summary-buffer) (if server - (let ((gnus-refer-article-method (list (list 'nntp server)))) + (let ((gnus-refer-article-method (list (list 'nntp server))) + (nntp-port-number (or port "nntp"))) (gnus-summary-refer-article message-id)) (gnus-summary-refer-article message-id)))) (group -- 2.39.2