From: Lars Ingebrigtsen <larsi@gnus.org>
To: Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net>
Cc: 34685@debbugs.gnu.org, wenbushi <wenbushi@gmail.com>,
Noam Postavsky <npostavs@gmail.com>
Subject: bug#34685: 26.1; function nnrss-get-namespace-prefix always returns nil
Date: Mon, 09 Aug 2021 14:13:29 +0200 [thread overview]
Message-ID: <877dgu6ck6.fsf@gnus.org> (raw)
In-Reply-To: <877dgx76x0.fsf@arrian.i-did-not-set--mail-host-address--so-tickle-me> (Benjamin Riefenstahl's message of "Sat, 07 Aug 2021 15:00:59 +0200")
Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net> writes:
> LS09LT0tPQpDb250ZW50LVR5cGU6IHRleHQvcGxhaW4KCkhpIExhcnMsCgpMYXJzIEluZ2Vicmln
> dHNlbiB3cml0ZXM6Cj4gSSd2ZSBub3cgZml4ZWQgdGhpcyBtb3JlIGdlbmVyYWxseSBieSBzZWFy
Your message arrived kinda destroyed, but I used my decoder ring:
> This doesn't seem to work. I encountered the problem just now on Emacs
> master with https://sql-ledger.com/userforum/index.php?mode=rss . The
> attached patch fixes it for me.
[...]
> - (let* ((prefix (car (rassoc uri (dom-attributes
> + (let* ((prefix (car (or (rassoc uri (dom-attributes el))
> + (rassoc uri
> + (dom-attributes
[...]
> +(defconst test-nnrss-xml
> + '((rss
> + ((version . "2.0")
> + (xmlns:dc . "http://purl.org/dc/elements/1.1/"))
> + (channel
> + ((xmlns:content . "http://purl.org/rss/1.0/modules/content/"))))))
The problem here is that this test XML isn't a valid DOM -- it's a
list of DOMs. A valid DOM would be
(defconst test-nnrss-xml
'(rss
((version . "2.0")
(xmlns:dc . "http://purl.org/dc/elements/1.1/"))
(channel
((xmlns:content . "http://purl.org/rss/1.0/modules/content/")))))
and in this case the test works fine. So if EL is a list of nodes, then
it's the caller of nnrss-get-namespace-prefix here that should be
adjusted to pass in the car of the list instead? Could you try that and
see whether that works? (And send a new patch; I've applied your test
(adjusted).)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2021-08-09 12:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAF6JJ+AzMnvHrh8bPnjyoK+TyTaO3AWO3ZBLAfeTPTUqVWZF1w@mail.gmail.com>
2019-04-05 0:50 ` bug#34685: 26.1; function nnrss-get-namespace-prefix always returns nil Noam Postavsky
2019-04-12 10:21 ` Noam Postavsky
2019-04-12 11:55 ` Noam Postavsky
2019-09-26 22:34 ` Lars Ingebrigtsen
[not found] ` <877dgx76x0.fsf@arrian.i-did-not-set--mail-host-address--so-tickle-me>
2021-08-09 12:13 ` Lars Ingebrigtsen [this message]
2021-08-09 16:30 ` Benjamin Riefenstahl
2021-08-10 13:48 ` Lars Ingebrigtsen
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877dgu6ck6.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=34685@debbugs.gnu.org \
--cc=b.riefenstahl@turtle-trading.net \
--cc=npostavs@gmail.com \
--cc=wenbushi@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).