help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: error when trying to add a new rss feed


From: Alex Kost
Subject: Re: error when trying to add a new rss feed
Date: Sat, 14 Nov 2015 21:49:20 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Sharon Kimble (2015-11-14 18:54 +0300) wrote:

> Alex Kost <alezost@gmail.com> writes:
>
>> Sharon Kimble (2015-11-12 22:22 +0300) wrote:
>>
>>> I'm trying to install a new rss feed in gnus, but am consistently
>>> getting this error message -
>>>
>>>
>>> (error "www.syndic8.com/80 Name or service not known") in 
>>> open-network-stream
>>>
>>> How can I get rid of this so that I can add a new feed please?
>>
>> Hello, I remember I also had this error.  "www.syndic8.com" thing came
>> from emacs itself.  It is a fallback or something like it (look at
>> "M-x find-function nnrss-find-rss-via-syndic8").
>
>
> nnrss-find-rss-via-syndic8 is a compiled Lisp function in `nnrss.el'.
>
> (nnrss-find-rss-via-syndic8 URL)
>
> Query syndic8 for the rss feeds it has for URL.
>
> In which case, maybe it would work better if I just commented that line
> out? We shall see.

I'm sure it wouldn't help.

And now I know what the real problem is.  I have downloaded an atom-file
you mentioned
<http://karl-voit.at/feeds/lazyblorg-all.atom_1.0.links-and-content.xml>
and it is a *malformed* xml file.  I manually called 'xsltproc' with
'atom2rss.xsl' on this xml-file and got the following output:

--8<---------------cut here---------------start------------->8---
$ xsltproc /path/to/atom2rss.xsl 
/home/alexx/downloads/lazyblorg-all.atom_1.0.links-and-content.xml > f1
/home/alexx/downloads/lazyblorg-all.atom_1.0.links-and-content.xml:1032: parser 
error : EntityRef: expecting ';'
d. <a href="http://www.amazon.de/gp/product/B00L7W8BGU/ref=as_li_tl?ie=UTF8&camp
                                                                               ^
/home/alexx/downloads/lazyblorg-all.atom_1.0.links-and-content.xml:1032: parser 
error : EntityRef: expecting ';'
en <a href="http://www.amazon.de/gp/product/B00KT2WVLA/ref=as_li_tl?ie=UTF8&camp
                                                                               ^
/home/alexx/downloads/lazyblorg-all.atom_1.0.links-and-content.xml:2508: parser 
error : EntityRef: expecting ';'
iltered" source of information to <a href="http://www.essene.com/History&Essenes
                                                                               ^
unable to parse 
/home/alexx/downloads/lazyblorg-all.atom_1.0.links-and-content.xml
--8<---------------cut here---------------end--------------->8---

So as you can see, there are 3 places in this file where instead of a
proper "&amp;" sequence, a simple "&" is used (which is incorrect).  If
these errors will be fixed, I almost sure your original code will work.

>> I don't recall in details, but I think I faced this error when I wanted
>> to use Atom feeds in gnus.  So I used the same code from the wiki to
>> convert Atom to RSS as you do, and it worked for me.  Make sure you have
>> "atom2rss.xsl" as described in the wiki.  Good luck!
>>
>>
>> P.S.  It is probably of no interest for you, but a code I use for
>> converting Atom to RSS is placed here:
>>
>> https://github.com/alezost/emacs-utils/blob/master/utl-gnus.el#L199-L238
>>
>> And in my emacs config I have:
>>
>> (setq utl-atom2rss-file "/path/to/atom2rss.xsl")
>> (advice-add 'mm-url-insert :after #'utl-convert-atom-to-rss)
>
> Thanks, I've incorporated both snippets into my "init.org" and will
> shortly try it out.

No need to do it, your initial code should work (for a proper atom file).

-- 
Alex



reply via email to

[Prev in Thread] Current Thread [Next in Thread]