Gnus development mailing list
 help / color / mirror / Atom feed
From: Joakim Verona <joakim@verona.se>
Subject: bug in nnrss and solution!
Date: Thu, 01 Jul 2004 23:09:52 +0200	[thread overview]
Message-ID: <m3r7rvcu3j.fsf@naru.home> (raw)

Hello list,

I found a bug and a solution for it with nnrss.el.

The problem is that articles get marked as new all the time, so you
get multiple copies of the same article.

This happens when an article in the rss feed doesnt have a "link"
element. This is allowed.

There is a workaround in nnrss that uses the "description" element as
a hash instead, when the link element isnt present.

The description element isnt used consistently tough, in one function
its the "publish date" that is used, which I believe is wrong.


the tiny patch below fixes this. (it only changes "5" to "6" really)

Cheers,
/Joakim

diff --unified /home/joakim/.elisp/gnus/lisp/nnrss.el /net/builds/gnus/lisp/nnrss.el
--- /home/joakim/.elisp/gnus/lisp/nnrss.el	2004-07-01 20:42:04.000000000 +0200
+++ /net/builds/gnus/lisp/nnrss.el	2004-05-20 10:02:40.000000000 +0200
@@ -331,9 +331,7 @@
       (let ((coding-system-for-read 'binary))
 	(load file nil t t))
       (dolist (e nnrss-group-data)
-	(puthash (or (nth 2 e) ;JAVE "link"
-		     (nth 6 e) ;JAVE "pubdate" should be "description"
-		     ) t nnrss-group-hashtb)
+	(puthash (or (nth 2 e) (nth 5 e)) t nnrss-group-hashtb)
 	(when (and (car e) (> nnrss-group-min (car e)))
 	  (setq nnrss-group-min (car e)))
 	(when (and (car e) (< nnrss-group-max (car e)))




             reply	other threads:[~2004-07-01 21:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-01 21:09 Joakim Verona [this message]
2004-07-02  9:14 ` Jesper Harder

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3r7rvcu3j.fsf@naru.home \
    --to=joakim@verona.se \
    /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 NNTP newsgroup(s).