From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [org-feed] Remember the Milk - active timestamps Date: Thu, 4 Mar 2010 21:27:18 +0100 Message-ID: <964C7E01-5A9D-405C-8DBD-2E9E9C619FE7@gmail.com> References: <87635lrph5.fsf@gmx.ch> <2868792E-B273-48C1-BB4D-2F14568146B3@gmail.com> <873a0glyru.fsf@rub.de> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NnHdk-00062H-GK for emacs-orgmode@gnu.org; Thu, 04 Mar 2010 15:27:24 -0500 Received: from [140.186.70.92] (port=60299 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NnHdj-000623-LU for emacs-orgmode@gnu.org; Thu, 04 Mar 2010 15:27:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NnHdi-00059t-5Y for emacs-orgmode@gnu.org; Thu, 04 Mar 2010 15:27:23 -0500 Received: from ey-out-1920.google.com ([74.125.78.145]:17569) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NnHdh-00059i-Ok for emacs-orgmode@gnu.org; Thu, 04 Mar 2010 15:27:22 -0500 Received: by ey-out-1920.google.com with SMTP id 26so611860eyw.34 for ; Thu, 04 Mar 2010 12:27:20 -0800 (PST) In-Reply-To: <873a0glyru.fsf@rub.de> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Sven Bretfeld Cc: emacs-org On Mar 4, 2010, at 7:33 PM, Sven Bretfeld wrote: > Hi Carsten > > Carsten Dominik writes: > >> how is the appointment time visible in the RTM stream? Are they >> using >> a special tag for it or so? > > They have a really weak management for dates. Everything that exceeds > the due-time by more than one week, is awkward to insert (especially > on > a phone) and very buggy and unstable. Yes, they have a special tag > inside the stream, but in the meantime I think it's not worth worrying > how to grab and convert it. > > Now, I solved the case by inserting a couple of digits directly into > the > headline and change it with an org-feed-after-adding-hook: > > ,----RTM > | > | This is a date @@10030411:15-12:45 > | > `---- > > It will be converted into: > > ,----Orgmode > | > | ** This is a date > | <2010-03-04 11:15-12:45> > | > `---- > > by this function: > > --8<---------------cut here---------------start------------->8--- > (defun rtm-dateconvert () > (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)) > (save-buffer "mygtd.org")) > > (add-hook 'org-feed-after-adding-hook 'rtm-dateconvert) > --8<---------------cut here---------------end--------------->8--- This is a good solution! I think one could to a lot more smart reading in this way.... > > So far it works. But it's not very elegant to jump to the beginning of > the buffer in the first step. I couldn't find out how to restrict > re-search-forward to only the current line. If that is possible, one > could get rid of the necessity of the @@. Why only the current line? Are you sure that you are not dealing with a multi-line text? Anyway, yes you can: (goto-char (point-at-bol)) (looking-at ".*?AndThenYourRegexpHere") HTH - Carsten > > There are still some other problems in using RTM with org-feed. I will > start a new thread on them. If they can be solved, I can absolutely > recommend RTM for orgmode users who own an Android phone (there is a > RTM > app in the Market), especially since Reqall is not yet available in > most > parts of Europe and OrgMobile for Android is not yet fully usable. > > Greetings, > > Sven > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten