From: Lars Ingebrigtsen Date: Thu, 26 Sep 2019 22:33:40 +0000 (+0200) Subject: Don't hard-code the RSS structure so much in nnrss X-Git-Tag: emacs-27.0.90~1414 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8e36ddfd44488e5194d26b34ad7405f92f838767;p=emacs.git 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). --- 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