Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* rss shimbuns
@ 2010-02-10 19:37 Nigel Beck
  2010-02-11 13:09 ` David Engster
  0 siblings, 1 reply; 10+ messages in thread
From: Nigel Beck @ 2010-02-10 19:37 UTC (permalink / raw)
  To: info-gnus-english

I've been experimenting with the generic shimbun reader for rss and have
it mostly working, but a few things puzzle me:

1) Changing shimbun-rss-blogs-group-url-regexp requires a complete emacs
shutdown and restart to be recognized.  Even a gnus restart within emacs
doesn't work.  This seems like a bit of an onerous requirement to add a
new blog

2) Similar to #1 - if a name has ever been used - eg "Nigels Blog" - it
seems to "stick" even after total reset and can never be used again.
This means that if I give the wrong url (typo, stupidity, whatever) for
a blog, I need to rename it the next time.

3) How *does* one deal with atom feeds?  I've seen the stuff here
http://www.randomsample.de/dru5/node/8 for converting an atom feed to
rss, but I'm not clear on how/whether that plays nicely with the
nnshimbun rss-blogs facility. 

Any advice/pointers would be welcome!
-- 
Nigel Beck
http://www.nigelbeck.com

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

* Re: rss shimbuns
  2010-02-10 19:37 rss shimbuns Nigel Beck
@ 2010-02-11 13:09 ` David Engster
  2010-02-11 17:23   ` Nigel Beck
  0 siblings, 1 reply; 10+ messages in thread
From: David Engster @ 2010-02-11 13:09 UTC (permalink / raw)
  To: info-gnus-english

Nigel Beck <me@nigelbeck.com> writes:
> I've been experimenting with the generic shimbun reader for rss and have
> it mostly working, but a few things puzzle me:
>
> 1) Changing shimbun-rss-blogs-group-url-regexp requires a complete emacs
> shutdown and restart to be recognized.  Even a gnus restart within emacs
> doesn't work.  This seems like a bit of an onerous requirement to add a
> new blog

I agree. This is due to shimbun-rss-blogs-groups being defvar'ed. Adding

(luna-define-method shimbun-groups ((shimbun shimbun-rss-blogs))
  (mapcar 'car shimbun-rss-blogs-group-url-regexp))

to sb-rss-blogs.el (after the 'defvar' of shimbun-rss-blogs-groups)
should fix this. Please let me know if this works for you.

> 2) Similar to #1 - if a name has ever been used - eg "Nigels Blog" - it
> seems to "stick" even after total reset and can never be used again.
> This means that if I give the wrong url (typo, stupidity, whatever) for
> a blog, I need to rename it the next time.

I'm guessing you only tried to 'kill' the group? The verb is misleading
here; in Gnus, 'killing' only means 'unsubscribing'. You can actually
*delete* a group from the shimbun server by using 'C-u G DEL' on the
group. Alternatively, you can delete the remaining overview/marks files
manually in ~/News/shimbun/rss-blogs/FEEDNAME and restart Gnus.

> 3) How *does* one deal with atom feeds?  I've seen the stuff here
> http://www.randomsample.de/dru5/node/8 for converting an atom feed to
> rss, but I'm not clear on how/whether that plays nicely with the
> nnshimbun rss-blogs facility. 

The shimbun library uses w3m instead of mm-url for retrieving the feeds,
so this approach will not work. 

If you have atom feeds with fully published content, you can use the
atom-hash shimbun. For atom feeds without full content, I think
implementing a atom-blogs shimbun based on the rss-blogs code should be
straightforward. I'll eventually do that, but I'm currently pretty busy.

-David

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

* Re: rss shimbuns
  2010-02-11 13:09 ` David Engster
@ 2010-02-11 17:23   ` Nigel Beck
  2010-02-12 15:49     ` David Engster
  0 siblings, 1 reply; 10+ messages in thread
From: Nigel Beck @ 2010-02-11 17:23 UTC (permalink / raw)
  To: info-gnus-english

Thanks for the comments

David Engster <deng@randomsample.de> writes:

> Nigel Beck <me@nigelbeck.com> writes:
>> I've been experimenting with the generic shimbun reader for rss and have
>> it mostly working, but a few things puzzle me:
>>
>> 1) Changing shimbun-rss-blogs-group-url-regexp requires a complete emacs
>> shutdown and restart to be recognized.  Even a gnus restart within emacs
>> doesn't work.  This seems like a bit of an onerous requirement to add a
>> new blog
>
> I agree. This is due to shimbun-rss-blogs-groups being defvar'ed. Adding
>
> (luna-define-method shimbun-groups ((shimbun shimbun-rss-blogs))
>   (mapcar 'car shimbun-rss-blogs-group-url-regexp))
>
> to sb-rss-blogs.el (after the 'defvar' of shimbun-rss-blogs-groups)
> should fix this. Please let me know if this works for you.
>

Yes that seems to fix it.

>> 2) Similar to #1 - if a name has ever been used - eg "Nigels Blog" - it
>> seems to "stick" even after total reset and can never be used again.
>> This means that if I give the wrong url (typo, stupidity, whatever) for
>> a blog, I need to rename it the next time.
>
> I'm guessing you only tried to 'kill' the group? The verb is misleading
> here; in Gnus, 'killing' only means 'unsubscribing'. You can actually
> *delete* a group from the shimbun server by using 'C-u G DEL' on the
> group. Alternatively, you can delete the remaining overview/marks files
> manually in ~/News/shimbun/rss-blogs/FEEDNAME and restart Gnus.
>

Yes indeed. Thanks for the pointer.

>> 3) How *does* one deal with atom feeds?  I've seen the stuff here
>> http://www.randomsample.de/dru5/node/8 for converting an atom feed to
>> rss, but I'm not clear on how/whether that plays nicely with the
>> nnshimbun rss-blogs facility. 
>
> The shimbun library uses w3m instead of mm-url for retrieving the feeds,
> so this approach will not work. 
>
> If you have atom feeds with fully published content, you can use the
> atom-hash shimbun. For atom feeds without full content, I think
> implementing a atom-blogs shimbun based on the rss-blogs code should be
> straightforward. I'll eventually do that, but I'm currently pretty busy.
>

I'll play with atom-hash and also see if I can figure out how the rss-blogs
code could become atom-blogs code.  Probably its "obvious" but I've been
looking around for atom-hash usage examples and didn't come across any.
If anyone has one before I hack through it, it would be appreciated!

> -David

-- 
Nigel Beck
http://www.nigelbeck.com

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

* Re: rss shimbuns
  2010-02-11 17:23   ` Nigel Beck
@ 2010-02-12 15:49     ` David Engster
  2010-02-13  0:24       ` Nigel Beck
  0 siblings, 1 reply; 10+ messages in thread
From: David Engster @ 2010-02-12 15:49 UTC (permalink / raw)
  To: info-gnus-english

Nigel Beck <me@nigelbeck.com> writes:
> David Engster <deng@randomsample.de> writes:
>> I agree. This is due to shimbun-rss-blogs-groups being defvar'ed. Adding
>>
>> (luna-define-method shimbun-groups ((shimbun shimbun-rss-blogs))
>>   (mapcar 'car shimbun-rss-blogs-group-url-regexp))
>>
>> to sb-rss-blogs.el (after the 'defvar' of shimbun-rss-blogs-groups)
>> should fix this. Please let me know if this works for you.
>>
>
> Yes that seems to fix it.

OK, I'll see that this makes it into CVS. I guess this would also be
useful for rss-hash and atom-hash.

> I'll play with atom-hash and also see if I can figure out how the rss-blogs
> code could become atom-blogs code.  Probably its "obvious" but I've been
> looking around for atom-hash usage examples and didn't come across
> any.

Well, using atom-hash is as simple as putting

(setq shimbun-atom-hash-group-path-alist
      '(("PlanetEmacsen" "http://planet.emacsen.org/atom.xml" t)
	("Stackoverflow: Emacs" "http://stackoverflow.com/feeds/tag/emacs" t)))
      
in your .gnus and restarting Emacs. After that, you can subscribe to
those two groups by choosing the atom-hash shimbun. Since Planet Emacsen
and Stackoverflow publish the full content in their feed, atom-hash can
be used here.

For creating an atom-blogs shimbun for feeds without fully published
content, you would start with sb-rss-blogs and derive the main class
from shimbun-atom instead of shimbun-rss. However, the main task is to
get familiar with luna, which is an object system for Emacs Lisp and
used throughout the shimbun library.

Regards,
David

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

* Re: rss shimbuns
  2010-02-12 15:49     ` David Engster
@ 2010-02-13  0:24       ` Nigel Beck
  2010-02-13 10:40         ` David Engster
  0 siblings, 1 reply; 10+ messages in thread
From: Nigel Beck @ 2010-02-13  0:24 UTC (permalink / raw)
  To: info-gnus-english

Thanks for the followup and the example re atom hash.  I noticed the
luna stuff and will add it to the list of "things to get familiar with"!

While I'm on rss-blogs shimbuns... In a "normal" group, I enter the group, read
stuff, mark it with E, and quit.  Then I don't see those things again.
With my rss-blogs shimbuns, every type I type "g" in the *Group* buffer to
refresh, I get the same count and article subset.  For example, I might
get 4 articles for a particular blog, regardless of whether I've expired
them or not.  

Is there something I'm supposed to do differently when
dealing with shimbuns to get the articles to actually expire?  It works
well with, for example, the NY Times shimbun, so its not "all shimbuns",
simply (for me) "all rss-blogs shimbuns"

David Engster <deng@randomsample.de> writes:

> Nigel Beck <me@nigelbeck.com> writes:
>> David Engster <deng@randomsample.de> writes:
>>> I agree. This is due to shimbun-rss-blogs-groups being defvar'ed. Adding
>>>
>>> (luna-define-method shimbun-groups ((shimbun shimbun-rss-blogs))
>>>   (mapcar 'car shimbun-rss-blogs-group-url-regexp))
>>>
>>> to sb-rss-blogs.el (after the 'defvar' of shimbun-rss-blogs-groups)
>>> should fix this. Please let me know if this works for you.
>>>
>>
>> Yes that seems to fix it.
>
> OK, I'll see that this makes it into CVS. I guess this would also be
> useful for rss-hash and atom-hash.
>
>> I'll play with atom-hash and also see if I can figure out how the rss-blogs
>> code could become atom-blogs code.  Probably its "obvious" but I've been
>> looking around for atom-hash usage examples and didn't come across
>> any.
>
> Well, using atom-hash is as simple as putting
>
> (setq shimbun-atom-hash-group-path-alist
>       '(("PlanetEmacsen" "http://planet.emacsen.org/atom.xml" t)
> 	("Stackoverflow: Emacs" "http://stackoverflow.com/feeds/tag/emacs" t)))
>       
> in your .gnus and restarting Emacs. After that, you can subscribe to
> those two groups by choosing the atom-hash shimbun. Since Planet Emacsen
> and Stackoverflow publish the full content in their feed, atom-hash can
> be used here.
>
> For creating an atom-blogs shimbun for feeds without fully published
> content, you would start with sb-rss-blogs and derive the main class
> from shimbun-atom instead of shimbun-rss. However, the main task is to
> get familiar with luna, which is an object system for Emacs Lisp and
> used throughout the shimbun library.
>
> Regards,
> David

-- 
Nigel Beck
http://www.nigelbeck.com
+1-323-NDUGU-ME (323-638-4863)

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

* Re: rss shimbuns
  2010-02-13  0:24       ` Nigel Beck
@ 2010-02-13 10:40         ` David Engster
  2010-02-17  0:10           ` Nigel Beck
  0 siblings, 1 reply; 10+ messages in thread
From: David Engster @ 2010-02-13 10:40 UTC (permalink / raw)
  To: info-gnus-english

Nigel Beck <me@nigelbeck.com> writes:
> While I'm on rss-blogs shimbuns... In a "normal" group, I enter the group, read
> stuff, mark it with E, and quit.  Then I don't see those things again.
> With my rss-blogs shimbuns, every type I type "g" in the *Group* buffer to
> refresh, I get the same count and article subset.  For example, I might
> get 4 articles for a particular blog, regardless of whether I've expired
> them or not.  
>
> Is there something I'm supposed to do differently when
> dealing with shimbuns to get the articles to actually expire?  It works
> well with, for example, the NY Times shimbun, so its not "all shimbuns",
> simply (for me) "all rss-blogs shimbuns"

Hmm. Does is help to include

(defvar shimbun-rss-blogs-expiration-days 14)

somewhere in sb-rss-blogs.el ?

Regards,
David

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

* Re: rss shimbuns
  2010-02-13 10:40         ` David Engster
@ 2010-02-17  0:10           ` Nigel Beck
  2010-02-17 13:46             ` David Engster
  0 siblings, 1 reply; 10+ messages in thread
From: Nigel Beck @ 2010-02-17  0:10 UTC (permalink / raw)
  To: info-gnus-english

I eval'ed that and some of the blogs are now expiring. This one
"http://www.andrewbeck.ca/feeds/posts/default?alt=rss" isn't... Maybe
there is something strange about it?  I believe its hosted by blogger or
something like that, so it shouldn't be too abnormal

> Nigel Beck <me@nigelbeck.com> writes:
>> While I'm on rss-blogs shimbuns... In a "normal" group, I enter the group, read
>> stuff, mark it with E, and quit.  Then I don't see those things again.
>> With my rss-blogs shimbuns, every type I type "g" in the *Group* buffer to
>> refresh, I get the same count and article subset.  For example, I might
>> get 4 articles for a particular blog, regardless of whether I've expired
>> them or not.  
>>
>> Is there something I'm supposed to do differently when
>> dealing with shimbuns to get the articles to actually expire?  It works
>> well with, for example, the NY Times shimbun, so its not "all shimbuns",
>> simply (for me) "all rss-blogs shimbuns"
>
> Hmm. Does is help to include
>
> (defvar shimbun-rss-blogs-expiration-days 14)
>
> somewhere in sb-rss-blogs.el ?
>
> Regards,
> David

-- 
Nigel Beck
http://www.nigelbeck.com
+1-323-NDUGU-ME (323-638-4863)

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

* Re: rss shimbuns
  2010-02-17  0:10           ` Nigel Beck
@ 2010-02-17 13:46             ` David Engster
  2010-02-17 17:08               ` Nigel Beck
  0 siblings, 1 reply; 10+ messages in thread
From: David Engster @ 2010-02-17 13:46 UTC (permalink / raw)
  To: info-gnus-english

Nigel Beck <me@nigelbeck.com> writes:
> I eval'ed that and some of the blogs are now expiring. This one
> "http://www.andrewbeck.ca/feeds/posts/default?alt=rss" isn't... Maybe
> there is something strange about it?  I believe its hosted by blogger or
> something like that, so it shouldn't be too abnormal

Ah, OK. This happens when there are postings in the feed which are older
than the expiry-time. I think this can be considered a bug, but not in
rss-blogs but in sb-rss.el itself. I will have to take this to the
emacs-w3m mailing list.

For now, you can circumvent this problem by either not deleting/expiring
the articles (just mark them as read) or by setting a large expiry time
on the group. 

For doing the latter, completely delete the group (with 'C-u G DEL'),
restart Gnus and create it anew. Then do 'G p' on the group and set

((expiry-time . 300))

Regards,
David

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

* Re: rss shimbuns
  2010-02-17 13:46             ` David Engster
@ 2010-02-17 17:08               ` Nigel Beck
  2010-02-18 22:38                 ` David Engster
  0 siblings, 1 reply; 10+ messages in thread
From: Nigel Beck @ 2010-02-17 17:08 UTC (permalink / raw)
  To: info-gnus-english

David - tks, not expiring them seems to work.  I'll try the other
approach as well when I next restart Gnus


> Nigel Beck <me@nigelbeck.com> writes:
>> I eval'ed that and some of the blogs are now expiring. This one
>> "http://www.andrewbeck.ca/feeds/posts/default?alt=rss" isn't... Maybe
>> there is something strange about it?  I believe its hosted by blogger or
>> something like that, so it shouldn't be too abnormal
>
> Ah, OK. This happens when there are postings in the feed which are older
> than the expiry-time. I think this can be considered a bug, but not in
> rss-blogs but in sb-rss.el itself. I will have to take this to the
> emacs-w3m mailing list.
>
> For now, you can circumvent this problem by either not deleting/expiring
> the articles (just mark them as read) or by setting a large expiry time
> on the group. 
>
> For doing the latter, completely delete the group (with 'C-u G DEL'),
> restart Gnus and create it anew. Then do 'G p' on the group and set
>
> ((expiry-time . 300))
>
> Regards,
> David

-- 
Nigel Beck
http://www.nigelbeck.com
+1-323-NDUGU-ME (323-638-4863)

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

* Re: rss shimbuns
  2010-02-17 17:08               ` Nigel Beck
@ 2010-02-18 22:38                 ` David Engster
  0 siblings, 0 replies; 10+ messages in thread
From: David Engster @ 2010-02-18 22:38 UTC (permalink / raw)
  To: info-gnus-english

Nigel Beck <me@nigelbeck.com> writes:
> David - tks, not expiring them seems to work.  I'll try the other
> approach as well when I next restart Gnus

All those issues should now hopefully be fixed in CVS. Please update
emacs-w3m and let me know if you encounter problems.

-David

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

end of thread, other threads:[~2010-02-18 22:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-10 19:37 rss shimbuns Nigel Beck
2010-02-11 13:09 ` David Engster
2010-02-11 17:23   ` Nigel Beck
2010-02-12 15:49     ` David Engster
2010-02-13  0:24       ` Nigel Beck
2010-02-13 10:40         ` David Engster
2010-02-17  0:10           ` Nigel Beck
2010-02-17 13:46             ` David Engster
2010-02-17 17:08               ` Nigel Beck
2010-02-18 22:38                 ` David Engster

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