unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Alex Kost <alezost@gmail.com>
To: Sharon Kimble <boudiccas@skimble.plus.com>
Cc: help-emacs <help-gnu-emacs@gnu.org>
Subject: Re: error when trying to add a new rss feed
Date: Sat, 14 Nov 2015 21:49:20 +0300	[thread overview]
Message-ID: <87oaewl8lr.fsf@gmail.com> (raw)
In-Reply-To: <87vb94o9uo.fsf@skimble.plus.com> (Sharon Kimble's message of "Sat, 14 Nov 2015 15:54:07 +0000")

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	other threads:[~2015-11-14 18:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-12 19:22 error when trying to add a new rss feed Sharon Kimble
2015-11-12 20:27 ` tomas
2015-11-12 21:08   ` Sharon Kimble
2015-11-12 21:56     ` tomas
2015-11-12 22:18     ` Jeffrey DeLeo
2015-11-12 23:41 ` Emanuel Berg
2015-11-13  6:32   ` Sharon Kimble
2015-11-13 21:20     ` Emanuel Berg
2015-11-14  8:14       ` Alex Kost
2015-11-14 15:29         ` Sharon Kimble
2015-11-14 18:48           ` Alex Kost
2015-11-14 16:53         ` Sharon Kimble
2015-11-14  8:15 ` Alex Kost
2015-11-14 15:54   ` Sharon Kimble
2015-11-14 18:49     ` Alex Kost [this message]
2015-11-14 19:57       ` Sharon Kimble
2015-11-14 16:56   ` Sharon Kimble
2015-11-15  7:48 ` SOLVED - " Sharon Kimble

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=87oaewl8lr.fsf@gmail.com \
    --to=alezost@gmail.com \
    --cc=boudiccas@skimble.plus.com \
    --cc=help-gnu-emacs@gnu.org \
    /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.
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).