emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Lineone <g.fella@lineone.net>
To: emacs-orgmode@gnu.org
Subject: Patch for script to import feeds from Remember the Milk
Date: Tue, 28 Jan 2014 05:30:03 +0000	[thread overview]
Message-ID: <279974487.124338.1390887003197.JavaMail.sas1@[172.29.252.247]> (raw)

Hi,

I have used this script

http://lists.gnu.org/archive/html/emacs-orgmode/2012-03/msg00197.html

to import my RTM Atom feeds into org.

The execution fails (no feed is downloaded) whenever the "Due:" field in at least one entry contains a time in addition to the date.

The following patch seems to solve the problem

-   (string-match "^\\([a-zA-Z]*\\) \\([0-9]*\\) \\([a-zA-Z]*\\) \\([0-9]*\\)$" mydate)
-   (setq mydate (concat "20" (match-string 4 mydate) " " (match-string 3 mydate) " " (match-string 2 mydate) " 00:00:01"))

+  (string-match "\\([0-9]*\\) \\([a-zA-Z]*\\) \\([0-9]*\\)" mydate)
+  (setq mydate (concat "20" (match-string 3 mydate) " " (match-string 2 mydate) " " (match-string 1 mydate) " 00:00:01"))

Thanks to Arun Persaud for the original script.
Giulio

                 reply	other threads:[~2014-01-28  5:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='279974487.124338.1390887003197.JavaMail.sas1@[172.29.252.247]' \
    --to=g.fella@lineone.net \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).