Gnus development mailing list
 help / color / mirror / Atom feed
* bug in nnrss and solution!
@ 2004-07-01 21:09 Joakim Verona
  2004-07-02  9:14 ` Jesper Harder
  0 siblings, 1 reply; 2+ messages in thread
From: Joakim Verona @ 2004-07-01 21:09 UTC (permalink / 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)))




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: bug in nnrss and solution!
  2004-07-01 21:09 bug in nnrss and solution! Joakim Verona
@ 2004-07-02  9:14 ` Jesper Harder
  0 siblings, 0 replies; 2+ messages in thread
From: Jesper Harder @ 2004-07-02  9:14 UTC (permalink / raw)


Joakim Verona <joakim@verona.se> writes:

> I found a bug and a solution for it with nnrss.el.
>
> the tiny patch below fixes this. (it only changes "5" to "6" really)

Thanks, applied.

-- 
Jesper Harder                                <http://purl.org/harder/>



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-07-02  9:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-01 21:09 bug in nnrss and solution! Joakim Verona
2004-07-02  9:14 ` Jesper Harder

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).