emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [PATCH] Trouble updating some RSS feeds with org-feed


From: Hiroshi Saito
Subject: [O] [PATCH] Trouble updating some RSS feeds with org-feed
Date: Wed, 23 Sep 2015 21:46:44 +0900

Hi all,

I noticed that the org-feed could not properly handle RSS feeds which do not
contain <guid> element. The value of <guid> element is used as a key of an
association list to manage entry statuses. The keys become `nil' when a <guid>
element not found. Then no entries are added anymore after first update since a
key of new entry (`nil') is already included in the association list.


Here is an example .emacs:
----------------------------------------------------------------------
(setq org-feed-alist
      '(("Hacker News"
         "https://news.ycombinator.com/rss";
         "~/feed.org" "Hacker News"
         )))
----------------------------------------------------------------------

After running `org-feed-update-all', keys of feed status in ~/feed.org
are `nil' like this:
----------------------------------------------------------------------
:FEEDSTATUS:
((nil t "4e939ac25cb5b7c825c0894c364a220d5a98a7bf")
 (nil t "2eac7fd17ae277ba6ad6fd658da663bdf2a28586")
 (nil t "4939903fe5796ea1b5132209c5ab983e0558b5fd")
 ...
:END:
----------------------------------------------------------------------

After that, `org-feed-update-all' no longer adds new entries in above reason.


It is possible to work around this issue via `:parse_feed' option. But, I think
it would be reasonable that org-feed handles <guid>-less RSS feeds.

So, I wrote a small patch that uses a value of <link> as a key if <guid> is
missing. It's simple and not too bad since there's certain consistency to
<guid> and <link> except <link> is also optional. Another option could be using
a hash of <title> or <description> but I feel it's excessive.

--
Sincerely,
Hiroshi Saito

Attachment: 0001-org-feed.el-Use-a-value-of-link-as-guid-if-guid-is-m.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]