From 8e36ddfd44488e5194d26b34ad7405f92f838767 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 27 Sep 2019 00:33:40 +0200 Subject: [PATCH] Don't hard-code the RSS structure so much in nnrss * lisp/gnus/nnrss.el (nnrss-get-namespace-prefix): Find the URL in any section in the RSS (bug#34685). --- lisp/gnus/nnrss.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/gnus/nnrss.el b/lisp/gnus/nnrss.el index 955432764e6..1eca46220f1 100644 --- a/lisp/gnus/nnrss.el +++ b/lisp/gnus/nnrss.el @@ -39,6 +39,7 @@ (require 'iso8601) (require 'mml) (require 'xml) +(require 'dom) (defgroup nnrss nil "RSS access for Gnus." @@ -1008,7 +1009,11 @@ Simply ensures that the first element is rss or rdf." "Given EL (containing a parsed element) and URI (containing a string that gives the URI for which you want to retrieve the namespace prefix), return the prefix." - (let* ((prefix (car (rassoc uri (cadar el)))) + (let* ((prefix (car (rassoc uri (dom-attributes + (dom-search + el + (lambda (node) + (rassoc uri (dom-attributes node)))))))) (nslist (if prefix (split-string (symbol-name prefix) ":"))) (ns (cond ((eq (length nslist) 1) ; no prefix given -- 2.39.2