[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] [org-feed] Some problems with Remember the Milk and org-feed
From: |
Sven Bretfeld |
Subject: |
[Orgmode] [org-feed] Some problems with Remember the Milk and org-feed |
Date: |
4 Mar 2010 20:36:37 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) |
Hi to all
As I have said before, I can recommend www.rememberthemilk.com (RTM) to
capture tasks and dates on an Android phone as long as MobileOrg for
Android is still under development.
I will post my setup at the bottom of this posting. Maybe it's of use
for others.
There are still two problems I encountered:
1. Emacs needs login information to access the RTM feed. I have not
figured out yet, how to automatize that. At the moment I type in
username and password once after I started a new Emacs session.
2. I start org-feed every hour with a run-at-time function. Every 2nd or
3rd time, Emacs is unable to read the feed and hangs forever, the
minibuffer saying something like "Reading 18 bytes". I haven't
figured out the reason for this problem yet. It might have something
to do with the creation of the feed by the RTM page. Usually it works
again after I have accessed the feed with another feedreader. The
problem also seems to occur every time when the feed is completely
empty. All I can say is that the freezing occurs before Emacs even
had asked for the login information, i.e. directly after hitting C-c
C-x g in a new Emacs session. However, sometimes it works well even
in a new session. The message buffer says nothing. How can I make
Emacs more verbose to track the problem?
Thanks for help,
Sven
Here is my setup for org-feed with RTM. After the above problems will be
solved, I will also publish this and my way of using Android together
with orgmode on Worg.
--8<---------------cut here---------------start------------->8---
(if (string-equal system-name "kamaloka")
;; Because I want only one of my (always running) computers to insert
;; the feeds. If you don't need that, delete the first line and the last
;; bracket.
(setq org-feed-alist
'(("RTM"
;; The 1st feed is for tasks. I use the Inbox of RTM for that.
;; You have to insert @@h for :HOME: or @@o for :OFFICE:
;; so that the RTM entry looks like this:
;; `Do your laundry @@h' or
;; `Read Sam's report @@o'.
"https://www.rememberthemilk.com/atom/[username]/[number_of_the_feed]/"
"~/aktuell/myconf/mygtd.org"
"New Tasks"
:template "* NEXT %title"
:parse-feed org-feed-parse-atom-feed
:parse-entry org-feed-parse-atom-entry)
("RTM-Termine"
;; The 2nd feed is for dates. I use a RTM folder called `dates'
;; for that.
;; You have to insert @@ and the date and time without any
;; format, so that the RTM entry looks like this:
;; `Meeting with Sam @@10030411:15-12:45' or
;; `Lunch @@10030413:00.
;; It will be converted to <2010-03-04 11:15-12:45>
"https://www.rememberthemilk.com/atom/[username]/[number_of_the_feed]"
"~/aktuell/myconf/mygtd.org"
"Termine"
:template "* APPT %title"
:parse-feed org-feed-parse-atom-feed
:parse-entry org-feed-parse-atom-entry)
)))
(defun rtm-dateconf ()
"This function converts the RTM feeds into the orgmode format."
(interactive)
(beginning-of-buffer)
(while (re-search-forward
"@@\\([0-9][0-9]\\)\\([0-9][0-9]\\)\\([0-9][0-9]\\)\\([0-9]*[0-9]+:[0-9][0-9]\\)\\([-]*[0-9]*[0-9]*[:]*[0-9]*[0-9]*\\)"
nil t)
(replace-match "\n <20\\1-\\2-\\3 \\4\\5>" nil nil))
(beginning-of-buffer)
(while (re-search-forward "@@h" nil t)
(replace-match ":HOME:" nil nil))
(beginning-of-buffer)
(while (re-search-forward "@@o" nil t)
(replace-match ":OFFICE:" nil nil))
(save-buffer "mygtd.org")
)
(add-hook 'org-feed-after-adding-hook 'rtm-dateconf)
;; Run org-feed once every hour.
(if (string-equal system-name "kamaloka")
(run-at-time 3600 3600 'org-feed-update-all))
--8<---------------cut here---------------end--------------->8---
- [Orgmode] [org-feed] Some problems with Remember the Milk and org-feed,
Sven Bretfeld <=