[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Proposal to change shimbun-rss-build-message-id
- From: David Engster <deng@xxxxxxxxxxxxxxx>
- Date: Wed, 13 May 2009 14:27:57 +0200
- X-ml-name: emacs-w3m
- X-mail-count: 10881
- References: <m2tz3qtslj.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <b4mab5hmji1.fsf@xxxxxxx> <m2my9hco5a.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <b4mzldhjmdw.fsf@xxxxxxx>
Katsumi Yamaoka <yamaoka@xxxxxxx> writes:
(B>>>>>> In [emacs-w3m : No.10876] David Engster wrote:
(B>> Maybe we are talking about different things here.
(B>> I thought shimbun-rss-build-message-id takes URLs which are published
(B>> through RSS feeds. Those do not contain session IDs.
(B> Tsuyoshi CHO wrote in [emacs-w3m:10063] that there will likely
(B> be not only session IDs but also meaningless queries or the ones
(B> for tracking ?rss, etc. Those cause different IDs for a single
(B> article. So, he agreed that the default behavior of
(B> `shimbun-rss-build-message-id' is that of sb-rss.el.
(BThank you for the explanation.
(B>> I have the problem that I read RSS feeds through rss-hash which publish
(B>> URLs like
(B>> and so on. This is a feed generated by tt_news, a widely used plugin for
(B>> Typo3. With the current default implemention of
(B>> shimbun-rss-build-message-id, the generated MIDs are not unique.
(B>>> So, I implemented the version of `shimbun-rss-build-message-id'
(B>>> that strips nothing in sb-mainichi.el, and in sb-nytimes.el
(B>> OK. Then I would suggest to override shimbun-rss-build-message-id for
(B>> rss-hash (and probably also atom-hash) with the version that doesn't
(B>> strip everything after '?'.
(B> Though I'm not an expert for that, I believe it's harmless.
(BIf that is the case and nobody objects, maybe the attached patch could
(B(sb-atom-hash is not affected by this, since it already contains its own
(BRCS file: /storage/cvsroot/emacs-w3m/shimbun/ChangeLog,v
(Bretrieving revision 1.192
(Bdiff -u -r1.192 ChangeLog
(B--- ChangeLog 11 May 2009 10:53:03 -0000 1.192
(B+++ ChangeLog 13 May 2009 12:24:23 -0000
(B@@ -1,3 +1,8 @@
(B+2009-05-13 David Engster <dengste@xxxxxx>
(B+ * sb-rss-hash.el (shimbun-rss-build-message-id): New override so that
(B+ URL is not stripped at question mark.
(B 2009-05-11 Katsumi Yamaoka <yamaoka@xxxxxxx>
(B * sb-yahoo.el (shimbun-yahoo-content-end): Update.
(BRCS file: /storage/cvsroot/emacs-w3m/shimbun/sb-rss-hash.el,v
(Bretrieving revision 1.5
(Bdiff -u -r1.5 sb-rss-hash.el
(B--- sb-rss-hash.el 5 Apr 2009 11:56:05 -0000 1.5
(B+++ sb-rss-hash.el 13 May 2009 12:24:23 -0000
(B@@ -144,6 +144,17 @@
(B (content-hash-shimbun-article (luna-slot-value shimbun 'content)
(B shimbun header outbuf))
(B+(luna-define-method shimbun-rss-build-message-id ((shimbun
(B+ url &optional date)
(B+ (let* ((group (shimbun-current-group-internal shimbun)))
(B+ (when (string-match "#" url)
(B+ (setq url (substring url 0 (match-beginning 0))))
(B+ (when (stringp date)
(B+ (setq url (concat url date)))
(B+ (concat "<" (md5 (concat url)) "." group "@rss-blogs>")))
(B (provide 'sb-rss-hash)
(B ;;; sb-rss-hash.el ends here