From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#34685: 26.1; function nnrss-get-namespace-prefix always returns nil Date: Mon, 09 Aug 2021 14:13:29 +0200 Message-ID: <877dgu6ck6.fsf@gnus.org> References: <87a7gva5hy.fsf@gmail.com> <877ebza15d.fsf@gmail.com> <87y2yahel4.fsf@gnus.org> <877dgx76x0.fsf@arrian.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31639"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 34685@debbugs.gnu.org, wenbushi , Noam Postavsky To: Benjamin Riefenstahl Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 09 14:14:15 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mD4AY-00081c-Pl for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 09 Aug 2021 14:14:14 +0200 Original-Received: from localhost ([::1]:39938 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mD4AX-00015v-OS for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 09 Aug 2021 08:14:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53258) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mD4AN-00015i-3z for bug-gnu-emacs@gnu.org; Mon, 09 Aug 2021 08:14:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44627) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mD4AM-0000OF-HO for bug-gnu-emacs@gnu.org; Mon, 09 Aug 2021 08:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mD4AM-0001Wg-D0; Mon, 09 Aug 2021 08:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Mon, 09 Aug 2021 12:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34685 X-GNU-PR-Package: emacs,gnus Original-Received: via spool by 34685-submit@debbugs.gnu.org id=B34685.16285112275834 (code B ref 34685); Mon, 09 Aug 2021 12:14:02 +0000 Original-Received: (at 34685) by debbugs.gnu.org; 9 Aug 2021 12:13:47 +0000 Original-Received: from localhost ([127.0.0.1]:56172 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mD4A3-0001Vz-9j for submit@debbugs.gnu.org; Mon, 09 Aug 2021 08:13:46 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:36828) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mD4A0-0001Vl-Iu for 34685@debbugs.gnu.org; Mon, 09 Aug 2021 08:13:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=UtgZrCnqq4cV80y4W/5ff/J+6FxfLpat8xF1OdHsGUI=; b=BdT9kljW4+HPjgXqTvKg1t0oh/ kK7bpXzbG9Egw5ARKlWLr3IWRiBfYSZree4MQKp/XATShHYWtod8dXeqgECbFpBhmFG5Oit/LvCUj ecFxBw8Tox9yTQ4AYFGJvZD4kAGp6UJjbTBrzY58+vOi2Dt7t+UifrqUzpCowdBJeM6s=; Original-Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mD49r-0005Bs-A5; Mon, 09 Aug 2021 14:13:34 +0200 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") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:211431 Archived-At: Benjamin Riefenstahl 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